[gtk+] Adwaita: Make selector more specific



commit 34941efc3a481cff8f81224f67d65b73c34df055
Author: Benjamin Otte <otte redhat com>
Date:   Thu Aug 27 20:18:40 2015 +0200

    Adwaita: Make selector more specific
    
    A * selector applies to all widgets, so even GtkBox or GtkGrid - and
    most importantly GtkListBoxRow - need to recompute their style because
    of the * selector.
    
    By using a more specific one, these common cases aren't affected
    anymore.
    
    Fixes slowdowns in gtk3-demo's listbox demo and in gnome-software.

 gtk/theme/Adwaita/_common.scss           |    7 ++++++-
 gtk/theme/Adwaita/gtk-contained-dark.css |    2 +-
 gtk/theme/Adwaita/gtk-contained.css      |    2 +-
 3 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index 74a8a7f..39c3d4d 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -263,7 +263,12 @@ GtkTextView { // This will get overridden by .view, needed by gedit line numbers
 
   .linked:not(.vertical) > & { @extend %linked; }
 
-  .linked:not(.vertical) > &:focus + * { border-left-color: entry_focus_border(); } // colors the border of 
the widget following a focused entry
+  .linked:not(.vertical) > &:focus + .entry,
+  .linked:not(.vertical) > &:focus + .button,
+  .linked:not(.vertical) > &:focus + GtkComboBox > .the-button-in-the-combobox,
+  .linked:not(.vertical) > &:focus + GtkComboBoxText > .the-button-in-the-combobox {
+    border-left-color: entry_focus_border(); // colors the border of the widget following a focused entry
+  }
 
   // entry error and warning style
   @each $e_type, $e_color in (error, $error_color),
diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css
index 2b97646..8edec16 100644
--- a/gtk/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/theme/Adwaita/gtk-contained-dark.css
@@ -212,7 +212,7 @@ GtkTextView {
     box-shadow: none; }
     .entry.progressbar:backdrop {
       background-color: transparent; }
-  .linked:not(.vertical) > .entry:focus + * {
+  .linked:not(.vertical) > .entry:focus + .entry, .linked:not(.vertical) > .entry:focus + .button, 
.linked:not(.vertical) > .entry:focus + GtkComboBox > .the-button-in-the-combobox, .linked:not(.vertical) > 
.entry:focus + GtkComboBoxText > .the-button-in-the-combobox {
     border-left-color: #0f2b48; }
   .entry.error {
     color: #cc0000;
diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css
index 7d802ed..b878181 100644
--- a/gtk/theme/Adwaita/gtk-contained.css
+++ b/gtk/theme/Adwaita/gtk-contained.css
@@ -212,7 +212,7 @@ GtkTextView {
     box-shadow: none; }
     .entry.progressbar:backdrop {
       background-color: transparent; }
-  .linked:not(.vertical) > .entry:focus + * {
+  .linked:not(.vertical) > .entry:focus + .entry, .linked:not(.vertical) > .entry:focus + .button, 
.linked:not(.vertical) > .entry:focus + GtkComboBox > .the-button-in-the-combobox, .linked:not(.vertical) > 
.entry:focus + GtkComboBoxText > .the-button-in-the-combobox {
     border-left-color: #4a90d9; }
   .entry.error {
     color: #cc0000;


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