[dconf-editor] Add padding in HighContrast.



commit 472d028f8686f21c60a2795f64148e1c0779a139
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Thu Nov 23 06:51:15 2017 +0100

    Add padding in HighContrast.

 editor/dconf-editor.css  |    3 +++
 editor/dconf-window.vala |   14 ++++++++++++++
 2 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/editor/dconf-editor.css b/editor/dconf-editor.css
index 7761674..0d73fd6 100644
--- a/editor/dconf-editor.css
+++ b/editor/dconf-editor.css
@@ -47,6 +47,9 @@
              .small-keys-list-rows              .keys-list          > row         { margin:0; padding-top:0; 
padding-bottom:0; }
 .large-window.small-keys-list-rows              .keys-list          > row         { margin:0; padding-top:0; 
padding-bottom:0; }
 
+                                  .hc-theme     .keys-list          > row         { padding-top:0.5em; 
padding-bottom:0.5em; }
+             .small-keys-list-rows.hc-theme     .keys-list          > row         { padding-top:0.4em; 
padding-bottom:0.4em; }
+
                                                 .bookmarks     list > row { min-height:2.6rem; }
                           .small-bookmarks-rows .bookmarks     list > row { min-height:1.3rem; }
 
diff --git a/editor/dconf-window.vala b/editor/dconf-window.vala
index 0dfeb7c..65f2def 100644
--- a/editor/dconf-window.vala
+++ b/editor/dconf-window.vala
@@ -58,6 +58,19 @@ class DConfWindow : ApplicationWindow
     [GtkChild] private Revealer notification_revealer;
     [GtkChild] private Label notification_label;
 
+    private bool _highcontrast = false;
+    private bool highcontrast {
+        set {
+            if (_highcontrast == value)
+                return;
+            _highcontrast = value;
+            if (value)
+                get_style_context ().add_class ("hc-theme");
+            else
+                get_style_context ().remove_class ("hc-theme");
+        }
+    }
+
     private ulong behaviour_changed_handler = 0;
 /*    private ulong theme_changed_handler = 0; */
     private ulong small_keys_list_rows_handler = 0;
@@ -227,6 +240,7 @@ class DConfWindow : ApplicationWindow
     private void request_path (string full_name)
     {
         registry_view.set_search_mode (false);  // TODO not useful when called from bookmark
+        highcontrast = ("HighContrast" in Gtk.Settings.get_default ().gtk_theme_name);
         registry_view.path_requested (full_name, pathbar.get_selected_child (full_name));
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]