[gnome-builder/wip/gtk4-port] plugins/editorui: fix focus rings on scheme previews



commit 9cc2fb2e91764288d94e699b20437497159118b4
Author: Christian Hergert <chergert redhat com>
Date:   Mon Apr 4 16:01:04 2022 -0700

    plugins/editorui: fix focus rings on scheme previews

 src/plugins/editorui/editorui.gresource.xml           | 1 +
 src/plugins/editorui/gbp-editorui-preferences-addin.c | 1 +
 src/plugins/editorui/style.css                        | 6 ++++++
 3 files changed, 8 insertions(+)
---
diff --git a/src/plugins/editorui/editorui.gresource.xml b/src/plugins/editorui/editorui.gresource.xml
index 0a3b863de..4e1907b17 100644
--- a/src/plugins/editorui/editorui.gresource.xml
+++ b/src/plugins/editorui/editorui.gresource.xml
@@ -2,6 +2,7 @@
 <gresources>
   <gresource prefix="/plugins/editorui">
     <file>editorui.plugin</file>
+    <file>style.css</file>
     <file preprocess="xml-stripblanks">gtk/menus.ui</file>
     <file preprocess="xml-stripblanks">gbp-editorui-position-label.ui</file>
   </gresource>
diff --git a/src/plugins/editorui/gbp-editorui-preferences-addin.c 
b/src/plugins/editorui/gbp-editorui-preferences-addin.c
index a9156eeea..6a75777bc 100644
--- a/src/plugins/editorui/gbp-editorui-preferences-addin.c
+++ b/src/plugins/editorui/gbp-editorui-preferences-addin.c
@@ -182,6 +182,7 @@ ide_preferences_builtin_add_schemes (const char                   *page_name,
                           "row-spacing", 6,
                           "max-children-per-line", 4,
                           NULL);
+  gtk_widget_add_css_class (GTK_WIDGET (flowbox), "style-schemes");
 
   for (guint i = 0; scheme_ids[i]; i++)
     {
diff --git a/src/plugins/editorui/style.css b/src/plugins/editorui/style.css
new file mode 100644
index 000000000..9059ff9ec
--- /dev/null
+++ b/src/plugins/editorui/style.css
@@ -0,0 +1,6 @@
+window.preferences preferencesgroup flowbox.style-schemes flowboxchild {
+  outline-offset: -3px;
+  border-radius: 14px;
+  outline-width: 2px;
+}
+


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