aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2025-04-01 08:48:05 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2025-04-01 08:48:05 +0200
commite6e3fbea7dccb5bd8b56b913271472f42297a1d8 (patch)
tree9571bb623f13ccbecac4d75158201b02a4effb94
parentfc8c76da3e760e178b612ecd63601634c50483c2 (diff)
parent4cdc2e0213fd419be61c2868225c7fb7d186466d (diff)
downloadarctica-greeter-e6e3fbea7dccb5bd8b56b913271472f42297a1d8.tar.gz
arctica-greeter-e6e3fbea7dccb5bd8b56b913271472f42297a1d8.tar.bz2
arctica-greeter-e6e3fbea7dccb5bd8b56b913271472f42297a1d8.zip
Merge branch 'tari01-pr/datetime-high-contrast-label'
Attributes GH PR #113: https://github.com/ArcticaProject/arctica-greeter/pull/113
-rw-r--r--src/menubar.vala15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/menubar.vala b/src/menubar.vala
index 90c1b00..8ce73d7 100644
--- a/src/menubar.vala
+++ b/src/menubar.vala
@@ -2,7 +2,7 @@
*
* Copyright (C) 2011,2012 Canonical Ltd
* Copyright (C) 2015-2017 Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
- * Copyright (C) 2023 Robert Tari
+ * Copyright (C) 2023-2025 Robert Tari
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3 as
@@ -40,6 +40,19 @@ private class IndicatorMenuItem : Gtk.MenuItem
{
entry.label.show.connect (this.visibility_changed_cb);
entry.label.hide.connect (this.visibility_changed_cb);
+ var pContext = entry.label.get_style_context ();
+ var pProvider = new Gtk.CssProvider ();
+
+ try
+ {
+ pProvider.load_from_data ("*.high_contrast {color: #000000; font-size: 12pt; text-shadow: none;}", -1);
+ }
+ catch (Error pError)
+ {
+ error ("Panic: Failed adding indicator label colour: %s", pError.message);
+ }
+
+ pContext.add_provider (pProvider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
hbox.pack_start (entry.label, false, false, 0);
}
if (entry.image != null)