From 76105c280fb3b834c3a741d6c077cde7d7868673 Mon Sep 17 00:00:00 2001 From: lenemter Date: Sat, 2 Sep 2023 19:51:06 +0900 Subject: [PATCH] Use dark style in greeter session --- src/Application.vala | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Application.vala b/src/Application.vala index 8706b9a2..d3585509 100644 --- a/src/Application.vala +++ b/src/Application.vala @@ -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));