diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2025-03-24 12:11:47 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2025-03-24 17:59:30 +0100 |
commit | 15fc13dde4466d3b18ffc589d6a221a894d433c7 (patch) | |
tree | d62cbbe8a1ef2548ef90b7e474414eb56811264c | |
parent | 41eb8e952531ea981118787e33e8e2d14696c47c (diff) | |
download | arctica-greeter-15fc13dde4466d3b18ffc589d6a221a894d433c7.tar.gz arctica-greeter-15fc13dde4466d3b18ffc589d6a221a894d433c7.tar.bz2 arctica-greeter-15fc13dde4466d3b18ffc589d6a221a894d433c7.zip |
src/menubar.vala: Render the menubar always white (background is always black) and use black font for the hostname if shown.
-rw-r--r-- | src/menubar.vala | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/menubar.vala b/src/menubar.vala index 5d193dd..63e3557 100644 --- a/src/menubar.vala +++ b/src/menubar.vala @@ -179,6 +179,20 @@ public class MenuBar : Gtk.MenuBar { add_style_class (this); + /* Handle high contrast background color */ + var menubar_style = new Gtk.CssProvider (); + + try + { + menubar_style.load_from_data ("*.high_contrast { background-color: #ffffff; }", -1); + } + catch (Error pError) + { + error ("Panic: Failed adding high contrast background-color: %s", pError.message); + } + this.get_style_context ().add_provider (menubar_style, + Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION); + /* Add shadow. */ var shadow_style = new Gtk.CssProvider (); @@ -232,7 +246,8 @@ public class MenuBar : Gtk.MenuBar var sensitive_color = hostname_item_ctx.get_color (Gtk.StateFlags.NORMAL); debug ("Directly fetched sensitive color: %s", sensitive_color.to_string ()); - insensitive_override_style.load_from_data ("*:disabled { color: %s; }".printf(sensitive_color.to_string ()), -1); + insensitive_override_style.load_from_data ("*:disabled { color: %s; } + *.high_contrast:disabled { color: #000000; }".printf(sensitive_color.to_string ()), -1); } catch (Error e) { |