From 7ab755c54027f658210a21058a860cf7c2b9890c Mon Sep 17 00:00:00 2001 From: Alexander Gehrke Date: Mon, 23 May 2022 23:12:53 +0200 Subject: [PATCH] Put default theme into companion object --- copret/src/Theme.scala | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/copret/src/Theme.scala b/copret/src/Theme.scala index bc260bf..f208f7a 100644 --- a/copret/src/Theme.scala +++ b/copret/src/Theme.scala @@ -15,12 +15,13 @@ case class Theme(styles: Map[String, fansi.Attrs], figletFonts: Map[String, Stri def extend(newFonts: Map[String, String])(implicit d: DummyImplicit) = copy(figletFonts = figletFonts ++ newFonts) def ++(newFonts: Map[String, String])(implicit d: DummyImplicit) = copy(figletFonts = figletFonts ++ newFonts) -given default: Theme = Theme(Map( - "titleLine" -> (fansi.Bold.On ++ fansi.Color.DarkGray), - "code" -> fansi.Color.Yellow - ), - Map("titleLine" -> "pagga") - ) +object Theme: + given default: Theme = Theme(Map( + "titleLine" -> (fansi.Bold.On ++ fansi.Color.DarkGray), + "code" -> fansi.Color.Yellow + ), + Map("titleLine" -> "smbraille") + ) object Format: def alignRight(str: String, padding: Int = 2) =" " * (columns - str.length - padding) + str + " " * padding