[gtk+/gtk-3-22] HC: Add border/hilight when hovering flat buttons



commit fa04eb26d7c0a551aec37ce657be7c237482c7b7
Author: Daniel Boles <dboles src gnome org>
Date:   Fri Oct 6 02:32:37 2017 +0100

    HC: Add border/hilight when hovering flat buttons
    
    The border and icon highlight are useful feedback that was defeated by
    CSS precedence. It worked for .titlebuttons due to their implementation,
    but the same was not true for custom .flat buttons. This makes it so.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=788580

 gtk/theme/HighContrast/_common.scss              |    3 ++-
 gtk/theme/HighContrast/gtk-contained-inverse.css |    2 +-
 gtk/theme/HighContrast/gtk-contained.css         |    2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/gtk/theme/HighContrast/_common.scss b/gtk/theme/HighContrast/_common.scss
index caeb73a..50b082a 100644
--- a/gtk/theme/HighContrast/_common.scss
+++ b/gtk/theme/HighContrast/_common.scss
@@ -421,7 +421,8 @@ button {
       }
     }
 
-    &:hover {
+    &:hover,
+    &.flat:hover {
       @include button(hover);
       -gtk-icon-effect: highlight;
     }
diff --git a/gtk/theme/HighContrast/gtk-contained-inverse.css 
b/gtk/theme/HighContrast/gtk-contained-inverse.css
index 1e58466..66e196c 100644
--- a/gtk/theme/HighContrast/gtk-contained-inverse.css
+++ b/gtk/theme/HighContrast/gtk-contained-inverse.css
@@ -178,7 +178,7 @@ button.sidebar-button:hover:active, button.titlebutton:hover:active, button.flat
 
 button.sidebar-button:backdrop, button.titlebutton:backdrop, button.sidebar-button:disabled, 
button.titlebutton:disabled, button.sidebar-button:backdrop:disabled, button.titlebutton:backdrop:disabled, 
button.flat:backdrop, button.flat:disabled, button.flat:backdrop:disabled { border-width: 2px; border-style: 
solid; color: gray; background-color: transparent; background-image: none; border-color: transparent; }
 
-button.titlebutton:hover, button:hover { border-width: 2px; border-style: solid; color: #fff; 
background-color: #000; border-color: gray; background-image: none; -gtk-icon-effect: highlight; }
+button.titlebutton:hover, button.sidebar-button:hover, button.titlebutton:hover, button:hover, 
button.flat:hover { border-width: 2px; border-style: solid; color: #fff; background-color: #000; 
border-color: gray; background-image: none; -gtk-icon-effect: highlight; }
 
 button.titlebutton:active, button.titlebutton:checked, button:active, button:checked { border-width: 2px; 
border-style: solid; background-image: none; color: black; background-color: white; border-color: gray; 
transition-duration: 50ms; }
 
diff --git a/gtk/theme/HighContrast/gtk-contained.css b/gtk/theme/HighContrast/gtk-contained.css
index a2d5fff..e818e27 100644
--- a/gtk/theme/HighContrast/gtk-contained.css
+++ b/gtk/theme/HighContrast/gtk-contained.css
@@ -178,7 +178,7 @@ button.sidebar-button:hover:active, button.titlebutton:hover:active, button.flat
 
 button.sidebar-button:backdrop, button.titlebutton:backdrop, button.sidebar-button:disabled, 
button.titlebutton:disabled, button.sidebar-button:backdrop:disabled, button.titlebutton:backdrop:disabled, 
button.flat:backdrop, button.flat:disabled, button.flat:backdrop:disabled { border-width: 2px; border-style: 
solid; color: gray; background-color: transparent; background-image: none; border-color: transparent; }
 
-button.titlebutton:hover, button:hover { border-width: 2px; border-style: solid; color: #000; 
background-color: #fff; border-color: gray; background-image: none; -gtk-icon-effect: highlight; }
+button.titlebutton:hover, button.sidebar-button:hover, button.titlebutton:hover, button:hover, 
button.flat:hover { border-width: 2px; border-style: solid; color: #000; background-color: #fff; 
border-color: gray; background-image: none; -gtk-icon-effect: highlight; }
 
 button.titlebutton:active, button.titlebutton:checked, button:active, button:checked { border-width: 2px; 
border-style: solid; background-image: none; color: white; background-color: black; border-color: gray; 
transition-duration: 50ms; }
 


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