From fd4f7cef1b1fe13c22f0b0330cb894ff4e5b1269 Mon Sep 17 00:00:00 2001 From: eoan Date: Tue, 3 Sep 2019 19:17:51 +0200 Subject: [PATCH 1/3] theme: Fix entry height jumping on focus changes Currently only the overview's search entry avoids size changes when its border width changes due to a focus change by adjusting its padding accordingly. Fix this for all entries by moving that style to the global entry styling. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/701 --- data/theme/gnome-shell-sass/_common.scss | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/data/theme/gnome-shell-sass/_common.scss b/data/theme/gnome-shell-sass/_common.scss index 8731ba48d9..4ca421f884 100644 --- a/data/theme/gnome-shell-sass/_common.scss +++ b/data/theme/gnome-shell-sass/_common.scss @@ -85,12 +85,17 @@ stage { /* Entries */ StEntry { border-radius: $button_radius; - padding: 4px; + padding: 7px 9px; border-width: 1px; color: $fg_color; @include entry(normal); - //&:hover { @include entry(hover);} - &:focus { @include entry(focus,$fc:transparentize($fg_color,0.5));} + &:hover { @include entry(hover);} + &:focus { + @include entry(focus,$fc:transparentize($fg_color,0.5)); + padding: 6px 8px; + border-width: 2px; + border-color: $selected_bg_color; + } &:insensitive { @include entry(insensitive);} selection-background-color: $selected_bg_color; selected-color: $selected_fg_color; @@ -1356,16 +1361,10 @@ StScrollBar { //search entry .search-entry, %search_entry { width: 320px; - padding: 7px 9px; border-radius: 18px; color: $fg_color; background-color: $base_color; border-color: $borders_color; - &:focus { - padding: 6px 8px; - border-width: 2px; - border-color: $selected_bg_color; - } .search-entry-icon { icon-size: 1em; padding: 0 4px; color: $fg_color; } -- GitLab From 540f724c17b67c58c1827937753347989a7715d8 Mon Sep 17 00:00:00 2001 From: eoan Date: Tue, 3 Sep 2019 19:17:51 +0200 Subject: [PATCH 2/3] theme: Increase the minimum entry height Some entries currently grow vertically depending on the font metrics, for example when using an input method for non-latin scripts or when entering a password while using a non-default font (with bigger bullet points than Cantarell). Fix this by giving all entries a minimum height that should cover all those variations. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/701 --- data/theme/gnome-shell-sass/_common.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/data/theme/gnome-shell-sass/_common.scss b/data/theme/gnome-shell-sass/_common.scss index 4ca421f884..10f0b2ae50 100644 --- a/data/theme/gnome-shell-sass/_common.scss +++ b/data/theme/gnome-shell-sass/_common.scss @@ -84,6 +84,7 @@ stage { /* Entries */ StEntry { + min-height: 1.5em; border-radius: $button_radius; padding: 7px 9px; border-width: 1px; -- GitLab From e8f969508e3d5da1454525cabad69a43ea253a97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Sat, 7 Sep 2019 00:58:49 +0200 Subject: [PATCH 3/3] lookingGlass: Center-align chevron We currently assume that label and entry have roughly the same height. This is no longer the case after we increased the minimum height of all entries, so make sure the label aligns properly. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/701 --- js/ui/lookingGlass.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/ui/lookingGlass.js b/js/ui/lookingGlass.js index a53fd90db7..8c50b8e8bc 100644 --- a/js/ui/lookingGlass.js +++ b/js/ui/lookingGlass.js @@ -847,7 +847,10 @@ var LookingGlass = class LookingGlass { this._entryArea = new St.BoxLayout({ name: 'EntryArea' }); this._evalBox.add_actor(this._entryArea); - let label = new St.Label({ text: CHEVRON }); + let label = new St.Label({ + text: CHEVRON, + y_align: Clutter.ActorAlign.CENTER, + }); this._entryArea.add(label); this._entry = new St.Entry({ can_focus: true }); -- GitLab