[gtk+] HighContrast: Fix GtkEntry:has-frame not working



commit a58a5219b9e85a6209f658d637a34bd6cc745c94
Author: Daniel Boles <dboles src gnome org>
Date:   Tue Oct 31 19:57:45 2017 +0000

    HighContrast: Fix GtkEntry:has-frame not working
    
    • Remove the box-shadow at the top when the entry is in the foreground
    • Bump precedence so that :disabled entries do not have .flat overridden
    • Also add :backdrop to stop HCInverse getting a lighter BG in :backdrop
    
    https://bugzilla.gnome.org/show_bug.cgi?id=789733

 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 06d78cf..249cc42 100644
--- a/gtk/theme/HighContrast/_common.scss
+++ b/gtk/theme/HighContrast/_common.scss
@@ -208,12 +208,13 @@ entry {
     }
 
     &.flat {
-      &:focus, & {
+      &:focus, &:backdrop, &:disabled, & {
         min-height: 0;
         padding: 2px;
         background-image: none;
         border-color: transparent;
         border-radius: 0;
+        box-shadow: none;
       }
     }
 
diff --git a/gtk/theme/HighContrast/gtk-contained-inverse.css 
b/gtk/theme/HighContrast/gtk-contained-inverse.css
index f451e22..c9ee7c8 100644
--- a/gtk/theme/HighContrast/gtk-contained-inverse.css
+++ b/gtk/theme/HighContrast/gtk-contained-inverse.css
@@ -90,7 +90,7 @@ spinbutton:not(.vertical) undershoot.left, entry undershoot.left { background-co
 
 spinbutton:not(.vertical) undershoot.right, entry undershoot.right { background-color: transparent; 
background-image: linear-gradient(to top, rgba(255, 255, 255, 0.2) 50%, rgba(0, 0, 0, 0.2) 50%); 
padding-right: 1px; background-size: 1px 10px; background-repeat: repeat-y; background-origin: content-box; 
background-position: right center; border: none; box-shadow: none; }
 
-spinbutton.flat:focus:not(.vertical), spinbutton.flat:not(.vertical), entry.flat:focus, entry.flat { 
min-height: 0; padding: 2px; background-image: none; border-color: transparent; border-radius: 0; }
+spinbutton.flat:focus:not(.vertical), spinbutton.flat:backdrop:not(.vertical), 
spinbutton.flat:disabled:not(.vertical), spinbutton.flat:not(.vertical), entry.flat:focus, 
entry.flat:backdrop, entry.flat:disabled, entry.flat { min-height: 0; padding: 2px; background-image: none; 
border-color: transparent; border-radius: 0; box-shadow: none; }
 
 spinbutton:focus:not(.vertical), entry:focus { background-color: transparent; border-style: solid; 
background-image: linear-gradient(to bottom, #090909, #111 90%); border-color: #ddd; box-shadow: inset 0 2px 
2px -2px #090909, inset 0 0 0 1px #ddd; }
 
diff --git a/gtk/theme/HighContrast/gtk-contained.css b/gtk/theme/HighContrast/gtk-contained.css
index 5c30e18..24a1f08 100644
--- a/gtk/theme/HighContrast/gtk-contained.css
+++ b/gtk/theme/HighContrast/gtk-contained.css
@@ -90,7 +90,7 @@ spinbutton:not(.vertical) undershoot.left, entry undershoot.left { background-co
 
 spinbutton:not(.vertical) undershoot.right, entry undershoot.right { background-color: transparent; 
background-image: linear-gradient(to top, rgba(255, 255, 255, 0.2) 50%, rgba(0, 0, 0, 0.2) 50%); 
padding-right: 1px; background-size: 1px 10px; background-repeat: repeat-y; background-origin: content-box; 
background-position: right center; border: none; box-shadow: none; }
 
-spinbutton.flat:focus:not(.vertical), spinbutton.flat:not(.vertical), entry.flat:focus, entry.flat { 
min-height: 0; padding: 2px; background-image: none; border-color: transparent; border-radius: 0; }
+spinbutton.flat:focus:not(.vertical), spinbutton.flat:backdrop:not(.vertical), 
spinbutton.flat:disabled:not(.vertical), spinbutton.flat:not(.vertical), entry.flat:focus, 
entry.flat:backdrop, entry.flat:disabled, entry.flat { min-height: 0; padding: 2px; background-image: none; 
border-color: transparent; border-radius: 0; box-shadow: none; }
 
 spinbutton:focus:not(.vertical), entry:focus { background-color: transparent; border-style: solid; 
background-image: linear-gradient(to bottom, #f7f7f7, #fff 90%); border-color: #000; box-shadow: inset 0 2px 
2px -2px gray, inset 0 0 0 1px #000; }
 


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