From a03a3c3af9ba210787370222c95e8d4a23d6ceb5 Mon Sep 17 00:00:00 2001 From: Daniel Boles Date: Tue, 31 Oct 2017 19:57:45 +0000 Subject: [PATCH] HighContrast: Fix GtkEntry:has-frame not working MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • 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 8d22b73ed9..792d21835d 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 3bb3b92abc..42195f587e 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 0b5b24a2bb..e275d28567 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; }