@@ -35,6 +35,7 @@ init_all_themes()
3535namespace jorts.Themer {
3636
3737 // Here we go
38+ // Take up a elementary OS color name and gurgle back a CSS string
3839 public static string generate_css (string theme ) {
3940 debug(" Generating css" );
4041 string style = " " ;
@@ -119,15 +120,15 @@ namespace jorts.Themer {
119120 }
120121
121122 window.${accent_color}:backdrop editablelabel {
122- color: alpha(@${accent_color}_900, 0.88 );
123+ color: alpha(@${accent_color}_900, 0.75 );
123124 }
124125
125126 window.${accent_color}:backdrop editablelabel,
126127 window.${accent_color}:backdrop actionbar,
127128 window.${accent_color}:backdrop actionbar image,
128129 window.${accent_color}:backdrop windowcontrols,
129130 window.${accent_color}:backdrop windowcontrols image {
130- color: alpha(@${accent_color}_900, 0.88 );
131+ color: alpha(@${accent_color}_900, 0.75 );
131132 }
132133
133134 " " " ));
@@ -137,9 +138,12 @@ namespace jorts.Themer {
137138 return style;
138139 }
139140
141+ // Called once, at the start of the app
142+ // Loads the standard sheet, then do all the different themes
140143 public static void init_all_themes () {
144+ debug(" Init all themes" );
141145
142- // Also the standard sheet
146+ // Use standard sheet
143147 var app_provider = new Gtk .CssProvider ();
144148 app_provider. load_from_resource (" /io/github/ellie_commons/jorts/Application.css" );
145149 Gtk . StyleContext . add_provider_for_display (
@@ -148,23 +152,18 @@ namespace jorts.Themer {
148152 Gtk . STYLE_PROVIDER_PRIORITY_APPLICATION + 1
149153 );
150154
151- debug( " Init all themes " );
155+ // Then generate all theme classes
152156 foreach (unowned var theme in jorts. Constants . themearray) {
153- // Palette color
154- var theme_provider = new Gtk .CssProvider ();
155- var style = jorts. Themer . generate_css (theme);
156-
157- // for the move away from stylecontext
158- // print(style);
157+ var theme_provider = new Gtk .CssProvider ();
158+ var style = jorts. Themer . generate_css (theme);
159159
160160 theme_provider. load_from_string (style);
161161
162-
163- Gtk . StyleContext . add_provider_for_display (
164- Gdk . Display . get_default (),
165- theme_provider,
166- Gtk . STYLE_PROVIDER_PRIORITY_APPLICATION
167- );
168- }
162+ Gtk . StyleContext . add_provider_for_display (
163+ Gdk . Display . get_default (),
164+ theme_provider,
165+ Gtk . STYLE_PROVIDER_PRIORITY_APPLICATION
166+ );
167+ }
169168 }
170169}
0 commit comments