From 33d2f8d0461314c5eeaab2c74b10b545906e1491 Mon Sep 17 00:00:00 2001 From: Mihai Moldovan Date: Tue, 6 Dec 2022 05:10:29 +0100 Subject: misc src/: completely rework high contrast mode, add stub for big font mode. This is a work-in-progress. The reworked high contrast mode adds support for a configurable high contrast GTK theme and changes a lot of widgets to change their color. The big font mode is a stub currently. --- src/dash-box.vala | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'src/dash-box.vala') diff --git a/src/dash-box.vala b/src/dash-box.vala index d8fe6fd..1073aa5 100644 --- a/src/dash-box.vala +++ b/src/dash-box.vala @@ -221,10 +221,25 @@ public class DashBox : Gtk.Box CairoUtils.rounded_rectangle (c, 0, box_y, box_w, box_h, box_r); - c.set_source_rgba (0.1, 0.1, 0.1, 0.4); + var agsettings = new AGSettings (); + if (agsettings.high_contrast) + { + c.set_source_rgba (1.0, 1.0, 1.0, 1.0); + } + else + { + c.set_source_rgba (0.1, 0.1, 0.1, 0.4); + } c.fill_preserve (); - c.set_source_rgba (0.4, 0.4, 0.4, 0.4); + if (agsettings.high_contrast) + { + c.set_source_rgba (0.0, 0.0, 0.0, 1.0); + } + else + { + c.set_source_rgba (0.4, 0.4, 0.4, 0.4); + } c.set_line_width (1); c.stroke (); -- cgit v1.2.3