From fa1f2c0df612c8063eb9e6dcd0fc459ddcdd169c Mon Sep 17 00:00:00 2001 From: Lapo Calamandrei Date: Wed, 22 Apr 2015 16:09:29 +0200 Subject: [PATCH] Adwaita: vertically linked entries fix. I was axing the edge hilight on the last linked entry which needs to be there, fixed. --- gtk/theme/Adwaita/_common.scss | 18 +++++++++++------- gtk/theme/Adwaita/gtk-contained-dark.css | 6 ++++-- gtk/theme/Adwaita/gtk-contained.css | 6 ++++-- 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss index 64798a7e46..3cdd06ab6a 100644 --- a/gtk/theme/Adwaita/_common.scss +++ b/gtk/theme/Adwaita/_common.scss @@ -313,11 +313,10 @@ GtkTextView { // This will get overridden by .view, needed by gedit line numbers .linked.vertical { > .entry { @extend %linked_vertical; } - // remove the edge hilight + // remove the edge hilight and the focus shadow (unfortunatelly) > .entry:not(:last-child) { box-shadow: none; } - // add back the focus shadow on focused entries - > .entry:focus:not(last-child) { box-shadow: entry_focus_shadow(); } - + // add back the focus shadow + > .entry:focus:not(:last-child) { box-shadow: entry_focus_shadow(); } // brighter border between linked entries > .entry:not(:insensitive) + .entry:not(:insensitive) { @@ -330,13 +329,18 @@ GtkTextView { // This will get overridden by .view, needed by gedit line numbers } // color back the top border of a linked focused entry following another entry and add back the focus shadow. - // :not(:only-child) is a specificity bump hack. - > .entry:not(:only-child) + .entry:focus { + > .entry + .entry:focus:not(:last-child) { border-top-color: entry_focus_border(); box-shadow: entry_focus_shadow(); } + // just recolor the top border on the last focused entry, since we don't reset the shadow here letting that be + // inherited by the entry styling. + > .entry + .entry:focus:last-child { + border-top-color: entry_focus_border(); + } - // this takes care of coloring the top border of the focused entry subsequent widget + // this takes care of coloring the top border of the focused entry subsequent widget. + // :not(:only-child) is a specificity bump hack. > .entry:focus:not(:only-child) + .entry, > .entry:focus:not(:only-child) + .button, > .entry:focus:not(:only-child) + GtkComboBox > .button, diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css index 4351b155ec..08ffc2337c 100644 --- a/gtk/theme/Adwaita/gtk-contained-dark.css +++ b/gtk/theme/Adwaita/gtk-contained-dark.css @@ -296,7 +296,7 @@ GtkTextView { .linked.vertical > .entry:not(:last-child) { box-shadow: none; } -.linked.vertical > .entry:focus:not(last-child) { +.linked.vertical > .entry:focus:not(:last-child) { box-shadow: inset 0 0 0 1px #215d9c; } .linked.vertical > .entry:not(:insensitive) + .entry:not(:insensitive) { border-top-color: #252626; @@ -304,9 +304,11 @@ GtkTextView { .linked.vertical > .entry:not(:insensitive) + .entry:not(:insensitive):backdrop { border-top-color: #272929; background-image: linear-gradient(to bottom, #2c2c2c); } -.linked.vertical > .entry:not(:only-child) + .entry:focus { +.linked.vertical > .entry + .entry:focus:not(:last-child) { border-top-color: #0f2b48; box-shadow: inset 0 0 0 1px #215d9c; } +.linked.vertical > .entry + .entry:focus:last-child { + border-top-color: #0f2b48; } .linked.vertical > .entry:focus:not(:only-child) + .entry, .linked.vertical > .entry:focus:not(:only-child) + .button, .linked.vertical > .entry:focus:not(:only-child) + GtkComboBox > .button, diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css index 817b4db3d8..052bfd35e6 100644 --- a/gtk/theme/Adwaita/gtk-contained.css +++ b/gtk/theme/Adwaita/gtk-contained.css @@ -296,7 +296,7 @@ GtkTextView { .linked.vertical > .entry:not(:last-child) { box-shadow: none; } -.linked.vertical > .entry:focus:not(last-child) { +.linked.vertical > .entry:focus:not(:last-child) { box-shadow: inset 0 0 0 1px #4a90d9; } .linked.vertical > .entry:not(:insensitive) + .entry:not(:insensitive) { border-top-color: #e2e2e2; @@ -304,9 +304,11 @@ GtkTextView { .linked.vertical > .entry:not(:insensitive) + .entry:not(:insensitive):backdrop { border-top-color: #e4e4e4; background-image: linear-gradient(to bottom, white); } -.linked.vertical > .entry:not(:only-child) + .entry:focus { +.linked.vertical > .entry + .entry:focus:not(:last-child) { border-top-color: #4a90d9; box-shadow: inset 0 0 0 1px #4a90d9; } +.linked.vertical > .entry + .entry:focus:last-child { + border-top-color: #4a90d9; } .linked.vertical > .entry:focus:not(:only-child) + .entry, .linked.vertical > .entry:focus:not(:only-child) + .button, .linked.vertical > .entry:focus:not(:only-child) + GtkComboBox > .button,