Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use dark style in greeter session #499

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions src/Application.vala
Original file line number Diff line number Diff line change
Expand Up @@ -82,21 +82,21 @@ public class Wingpanel.Application : Gtk.Application {
IndicatorManager.get_default ().initialize (IndicatorManager.ServerType.GREETER);
} else {
IndicatorManager.get_default ().initialize (IndicatorManager.ServerType.SESSION);
}

var granite_settings = Granite.Settings.get_default ();
var gtk_settings = Gtk.Settings.get_default ();
gtk_settings.gtk_icon_theme_name = "elementary";
var granite_settings = Granite.Settings.get_default ();
var gtk_settings = Gtk.Settings.get_default ();
gtk_settings.gtk_icon_theme_name = "elementary";

if (!gtk_settings.gtk_theme_name.has_prefix ("io.elementary")) {
gtk_settings.gtk_theme_name = "io.elementary.stylesheet.blueberry";
}
if (!gtk_settings.gtk_theme_name.has_prefix ("io.elementary")) {
gtk_settings.gtk_theme_name = "io.elementary.stylesheet.blueberry";
}

gtk_settings.gtk_application_prefer_dark_theme = granite_settings.prefers_color_scheme == DARK;
gtk_settings.gtk_application_prefer_dark_theme = granite_settings.prefers_color_scheme == DARK;

granite_settings.notify["prefers-color-scheme"].connect (() => {
gtk_settings.gtk_application_prefer_dark_theme = granite_settings.prefers_color_scheme == DARK;
});
}
granite_settings.notify["prefers-color-scheme"].connect (() => {
gtk_settings.gtk_application_prefer_dark_theme = granite_settings.prefers_color_scheme == DARK;
});

if (options.contains (OPEN_INDICATOR_ACTION_NAME)) {
activate_action (OPEN_INDICATOR_ACTION_NAME, options.lookup_value (OPEN_INDICATOR_ACTION_NAME, VariantType.STRING));
Expand Down
Loading