Skip to content

Commit

Permalink
Remove stylesheet retrofit
Browse files Browse the repository at this point in the history
  • Loading branch information
stsdc committed Oct 10, 2024
1 parent 4071055 commit d628989
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 23 deletions.
2 changes: 0 additions & 2 deletions data/css.gresource.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@
<gresource prefix="/com/github/stsdc/monitor">
<file alias="monitor-light.css" compressed="true">monitor-light.css</file>
<file alias="monitor-dark.css" compressed="true">monitor-dark.css</file>
<file alias="monitor-retrofit.css" compressed="true">monitor-retrofit.css</file>

</gresource>
</gresources>
10 changes: 1 addition & 9 deletions data/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -75,19 +75,11 @@ stylesheet_dark = custom_target(
build_by_default: true
)

stylesheet_retrofit = custom_target(
'theme-monitor-retrofit',
input : './stylesheet/monitor-retrofit.scss',
output : 'monitor-retrofit.css',
command : sass_command,
build_by_default: true
)

css_gresource = gnome.compile_resources(
'gresource_css',
'css.gresource.xml',
source_dir: 'stylesheet',
c_name: 'as2',
dependencies: [stylesheet_dark, stylesheet_light, stylesheet_retrofit],
dependencies: [stylesheet_dark, stylesheet_light],

)
1 change: 0 additions & 1 deletion src/Monitor.vala
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ namespace Monitor {
});

Appearance.set_prefered_style ();
Appearance.retrofit ();


// Controls the direction of the sort indicators
Expand Down
11 changes: 0 additions & 11 deletions src/Services/Appearance.vala
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,4 @@ public class Monitor.Appearance : Object {
}
});
}

public static void retrofit () {
if (Gtk.Settings.get_default ().gtk_theme_name.has_prefix ("io.elementary") ) {
debug ("Chewie, We are home.");
} else {
debug ("Retrofitting styles to make Monitor usable with a current theme.");
var provider = new Gtk.CssProvider ();
provider.load_from_resource ("/com/github/stsdc/monitor/monitor-retrofit.css");
Gtk.StyleContext.add_provider_for_screen (Gdk.Screen.get_default (), provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
}
}
}

0 comments on commit d628989

Please sign in to comment.