From b7f00fe17d6b9ea98c20f86a0948603a3f734ddc Mon Sep 17 00:00:00 2001 From: Komer Date: Sun, 13 Feb 2022 17:13:06 +0100 Subject: [PATCH] BUGfix: GTK3&4: cut text in Gnome header-bar buttons --- gtk-3.0/gtk-dark.css | 9 +++++++++ gtk-3.0/gtk.css | 9 +++++++++ gtk-3.0/widgets/_header-bars.scss | 15 ++++++++++++++- gtk-4.0/gtk-dark.css | 9 +++++++++ gtk-4.0/gtk.css | 9 +++++++++ gtk-4.0/widgets/_header-bars.scss | 14 ++++++++++++++ 6 files changed, 64 insertions(+), 1 deletion(-) diff --git a/gtk-3.0/gtk-dark.css b/gtk-3.0/gtk-dark.css index bc2778a..e3d18ea 100755 --- a/gtk-3.0/gtk-dark.css +++ b/gtk-3.0/gtk-dark.css @@ -2783,6 +2783,15 @@ headerbar switch { headerbar separator { background: transparent; } +headerbar viewswitcher > box.horizontal > button.radio, headerbar switcher > box.horizontal > button.radio { + margin: 0; + padding: 0; + border-radius: 0; } + headerbar viewswitcher > box.horizontal > button.radio image, headerbar switcher > box.horizontal > button.radio image { + margin-left: 7px; } + headerbar viewswitcher > box.horizontal > button.radio label, headerbar switcher > box.horizontal > button.radio label { + margin-right: 7px; } + .background:not(.tiled):not(.maximized) .titlebar { box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), inset 0 -1px rgba(0, 0, 0, 0.1); } .background:not(.tiled):not(.maximized) .titlebar:backdrop, .background:not(.tiled):not(.maximized) .titlebar { diff --git a/gtk-3.0/gtk.css b/gtk-3.0/gtk.css index bc2778a..e3d18ea 100755 --- a/gtk-3.0/gtk.css +++ b/gtk-3.0/gtk.css @@ -2783,6 +2783,15 @@ headerbar switch { headerbar separator { background: transparent; } +headerbar viewswitcher > box.horizontal > button.radio, headerbar switcher > box.horizontal > button.radio { + margin: 0; + padding: 0; + border-radius: 0; } + headerbar viewswitcher > box.horizontal > button.radio image, headerbar switcher > box.horizontal > button.radio image { + margin-left: 7px; } + headerbar viewswitcher > box.horizontal > button.radio label, headerbar switcher > box.horizontal > button.radio label { + margin-right: 7px; } + .background:not(.tiled):not(.maximized) .titlebar { box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), inset 0 -1px rgba(0, 0, 0, 0.1); } .background:not(.tiled):not(.maximized) .titlebar:backdrop, .background:not(.tiled):not(.maximized) .titlebar { diff --git a/gtk-3.0/widgets/_header-bars.scss b/gtk-3.0/widgets/_header-bars.scss index 155c4dc..40a406f 100755 --- a/gtk-3.0/widgets/_header-bars.scss +++ b/gtk-3.0/widgets/_header-bars.scss @@ -182,7 +182,8 @@ headerbar { } } } - .linked > button:hover, .linked > button:backdrop { + .linked > button:hover, + .linked > button:backdrop { @extend %linked-header; } // End reset style @@ -241,6 +242,18 @@ headerbar { margin-bottom: 10px; } separator { background: transparent; } + + viewswitcher, switcher { + > box.horizontal { + > button.radio { + image { margin-left: 7px; } + label { margin-right: 7px; } + margin: 0; + padding: 0; + border-radius: 0; + } + } + } } .background:not(.tiled):not(.maximized) .titlebar { diff --git a/gtk-4.0/gtk-dark.css b/gtk-4.0/gtk-dark.css index 2371cea..9f054c6 100755 --- a/gtk-4.0/gtk-dark.css +++ b/gtk-4.0/gtk-dark.css @@ -2721,6 +2721,15 @@ headerbar switch { headerbar separator { background: transparent; } +headerbar viewswitcher > box.horizontal > button.radio, headerbar switcher > box.horizontal > button.radio { + margin: 0; + padding: 0; + border-radius: 0; } + headerbar viewswitcher > box.horizontal > button.radio image, headerbar switcher > box.horizontal > button.radio image { + margin-left: 7px; } + headerbar viewswitcher > box.horizontal > button.radio label, headerbar switcher > box.horizontal > button.radio label { + margin-right: 7px; } + .background:not(.tiled):not(.maximized) .titlebar { box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), inset 0 -1px rgba(0, 0, 0, 0.1); } .background:not(.tiled):not(.maximized) .titlebar:backdrop, .background:not(.tiled):not(.maximized) .titlebar { diff --git a/gtk-4.0/gtk.css b/gtk-4.0/gtk.css index 2371cea..9f054c6 100755 --- a/gtk-4.0/gtk.css +++ b/gtk-4.0/gtk.css @@ -2721,6 +2721,15 @@ headerbar switch { headerbar separator { background: transparent; } +headerbar viewswitcher > box.horizontal > button.radio, headerbar switcher > box.horizontal > button.radio { + margin: 0; + padding: 0; + border-radius: 0; } + headerbar viewswitcher > box.horizontal > button.radio image, headerbar switcher > box.horizontal > button.radio image { + margin-left: 7px; } + headerbar viewswitcher > box.horizontal > button.radio label, headerbar switcher > box.horizontal > button.radio label { + margin-right: 7px; } + .background:not(.tiled):not(.maximized) .titlebar { box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), inset 0 -1px rgba(0, 0, 0, 0.1); } .background:not(.tiled):not(.maximized) .titlebar:backdrop, .background:not(.tiled):not(.maximized) .titlebar { diff --git a/gtk-4.0/widgets/_header-bars.scss b/gtk-4.0/widgets/_header-bars.scss index 08e8240..9a678b1 100755 --- a/gtk-4.0/widgets/_header-bars.scss +++ b/gtk-4.0/widgets/_header-bars.scss @@ -3,6 +3,7 @@ ***************/ %titlebar, headerbar { + // margin-top: 2px; // FIXIT: added to get rounded borders. What's that light line on top of titlebar/header padding: 0px 13px; min-height: 34px; background: $headerbar_color; @@ -138,6 +139,7 @@ headerbar { } } } + %linked-header { border-radius: 1em; // 23px; border-right-style: none; @@ -240,6 +242,18 @@ headerbar { margin-bottom: 10px; } separator { background: transparent; } + + viewswitcher, switcher { + > box.horizontal { + > button.radio { + image { margin-left: 7px; } + label { margin-right: 7px; } + margin: 0; + padding: 0; + border-radius: 0; + } + } + } } .background:not(.tiled):not(.maximized) .titlebar {