From bf48dd9d7c4bbf825a0540bfaf1f52c64738ac4e Mon Sep 17 00:00:00 2001 From: Lapo Calamandrei Date: Sat, 9 Jan 2016 10:19:47 +0100 Subject: [PATCH] Adwaita: add vertical margins to headerbar buttons to avoid them spanning the whole headerbar height with the changes introduced in my last commit. --- gtk/theme/Adwaita/_common.scss | 7 +++++++ gtk/theme/Adwaita/gtk-contained-dark.css | 8 ++++++++ gtk/theme/Adwaita/gtk-contained.css | 8 ++++++++ 3 files changed, 23 insertions(+) diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss index 8fe4f85fbe..b3093c6fc0 100644 --- a/gtk/theme/Adwaita/_common.scss +++ b/gtk/theme/Adwaita/_common.scss @@ -1143,6 +1143,7 @@ headerbar { @extend .dim-label; } + // FIXME: we need a safer way to select this separator & > GtkBox > separator.vertical { border-width: 0 1px; border-image: linear-gradient(to bottom, @@ -1285,6 +1286,12 @@ headerbar { padding: 0 5px; } } + + // add vertical margins to headerbar buttons to avoid them spanning the whole height + button { + margin-top: 6px; + margin-bottom: 6px; + } } .titlebar { diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css index a39fbd29f5..6ce7d46cb9 100644 --- a/gtk/theme/Adwaita/gtk-contained-dark.css +++ b/gtk/theme/Adwaita/gtk-contained-dark.css @@ -1927,6 +1927,14 @@ headerbar { .titlebar headerbar.default-decoration button.titlebutton { min-height: 26px; padding: 0 5px; } + .titlebar:not(headerbar) button, + .titlebar:not(headerbar) button.titlebutton, + headerbar button, + headerbar button.titlebutton, + headerbar .titlebar button.titlebutton, + .titlebar headerbar button.titlebutton { + margin-top: 6px; + margin-bottom: 6px; } .titlebar, .titlebar:backdrop { border-top-left-radius: 7px; diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css index ec03ad264f..d7538fff1d 100644 --- a/gtk/theme/Adwaita/gtk-contained.css +++ b/gtk/theme/Adwaita/gtk-contained.css @@ -1931,6 +1931,14 @@ headerbar { .titlebar headerbar.default-decoration button.titlebutton { min-height: 26px; padding: 0 5px; } + .titlebar:not(headerbar) button, + .titlebar:not(headerbar) button.titlebutton, + headerbar button, + headerbar button.titlebutton, + headerbar .titlebar button.titlebutton, + .titlebar headerbar button.titlebutton { + margin-top: 6px; + margin-bottom: 6px; } .titlebar, .titlebar:backdrop { border-top-left-radius: 7px;