aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2025-03-24 12:12:39 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2025-03-24 17:59:30 +0100
commit21ec1e765413ee195d4f2612e84d7b728f6feb11 (patch)
tree275777a7f00c4e2e5533bd9705bac3eaf2ab83c8
parent15fc13dde4466d3b18ffc589d6a221a894d433c7 (diff)
downloadarctica-greeter-21ec1e765413ee195d4f2612e84d7b728f6feb11.tar.gz
arctica-greeter-21ec1e765413ee195d4f2612e84d7b728f6feb11.tar.bz2
arctica-greeter-21ec1e765413ee195d4f2612e84d7b728f6feb11.zip
src/prompt-box.vala: Prompt box messages are always white in normal mode, always black in high-contrast mode (except from errors).
-rw-r--r--src/prompt-box.vala10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/prompt-box.vala b/src/prompt-box.vala
index 071c34a..1254d14 100644
--- a/src/prompt-box.vala
+++ b/src/prompt-box.vala
@@ -576,7 +576,8 @@ public class PromptBox : FadableBox
try
{
var font_provider = new Gtk.CssProvider ();
- var css = "* {font-family: %s; font-size: %dpt;}".printf (font_family, font_size-1);
+ var css = "* {font-family: %s; font-size: %dpt; color: white}
+ *.high_contrast {color: black; }".printf (font_family, font_size-1);
font_provider.load_from_data (css, -1);
style_ctx.add_provider (font_provider,
Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
@@ -586,8 +587,10 @@ public class PromptBox : FadableBox
debug ("Internal error loading font style (%s, %dpt): %s", font_family, font_size-1, e.message);
}
- Gdk.RGBA color = { 1.0f, 1.0f, 1.0f, 1.0f };
if (is_error) {
+
+ /* red */
+ Gdk.RGBA color = { 1.0f, 1.0f, 1.0f, 1.0f };
color.parse ("#820900");
/*
@@ -598,9 +601,8 @@ public class PromptBox : FadableBox
*/
Gdk.RGBA bg_color = { 1.0f, 1.0f, 1.0f, 1.0f };
label.override_background_color (Gtk.StateFlags.NORMAL, bg_color);
+ label.override_color (Gtk.StateFlags.NORMAL, color);
}
- label.override_color (Gtk.StateFlags.NORMAL, color);
-
label.xalign = 0.0f;
label.set_data<bool> ("prompt-box-is-error", is_error);