From ed25153f2dfc4e406b0da98c21ceeb451e96f66d Mon Sep 17 00:00:00 2001 From: Lapo Calamandrei Date: Thu, 16 Oct 2014 20:04:04 +0200 Subject: [PATCH] Adwaita: fix stack-switcher button outline offset See https://bugzilla.gnome.org/show_bug.cgi?id=738636 --- gtk/resources/theme/Adwaita/_common.scss | 3 ++ .../theme/Adwaita/gtk-contained-dark.css | 42 ++++++++++--------- gtk/resources/theme/Adwaita/gtk-contained.css | 42 ++++++++++--------- 3 files changed, 49 insertions(+), 38 deletions(-) diff --git a/gtk/resources/theme/Adwaita/_common.scss b/gtk/resources/theme/Adwaita/_common.scss index 086556707f..dda9176222 100644 --- a/gtk/resources/theme/Adwaita/_common.scss +++ b/gtk/resources/theme/Adwaita/_common.scss @@ -637,6 +637,9 @@ $_dot_color: if($variant=='light', $selected_bg_color, // to position the needs attention dot, padding is added to the button // child, a label needs just lateral padding while an icon needs vertical // padding added too. + + outline-offset: -3px; // needs to be set or it gets overriden by GtkRadioButton outline-offset + > .label { padding-left: 6px; // label padding padding-right: 6px; // diff --git a/gtk/resources/theme/Adwaita/gtk-contained-dark.css b/gtk/resources/theme/Adwaita/gtk-contained-dark.css index e86a4a2d26..6394f7378b 100644 --- a/gtk/resources/theme/Adwaita/gtk-contained-dark.css +++ b/gtk/resources/theme/Adwaita/gtk-contained-dark.css @@ -956,25 +956,29 @@ GtkCalendar.header .button.titlebutton { .titlebar .text-button.titlebutton.button .label:last-child, GtkCalendar.header .text-button.titlebutton.button .label:last-child { padding-right: 8px; } - .stack-switcher > .button > .label { - padding-left: 6px; - padding-right: 6px; } - .stack-switcher > .button > GtkImage, .header-bar .stack-switcher > .button.titlebutton > GtkImage, - .titlebar .stack-switcher > .button.titlebutton > GtkImage, - GtkCalendar.header .stack-switcher > .button.titlebutton > GtkImage { - padding-left: 6px; - padding-right: 6px; - padding-top: 3px; - padding-bottom: 3px; } - .stack-switcher > .button.text-button { - padding: 5px 10px 6px; } - .stack-switcher > .button.image-button, .header-bar .stack-switcher > .titlebutton.button, - .titlebar .stack-switcher > .titlebutton.button, - GtkCalendar.header .stack-switcher > .titlebutton.button { - padding: 5px 2px; } - .stack-switcher > .button.needs-attention:active > .label, .stack-switcher > .button.needs-attention:active > GtkImage, .stack-switcher > .button.needs-attention:checked > .label, .stack-switcher > .button.needs-attention:checked > GtkImage { - animation: none; - background-image: none; } + .stack-switcher > .button, .header-bar .stack-switcher > .button.titlebutton, + .titlebar .stack-switcher > .button.titlebutton, + GtkCalendar.header .stack-switcher > .button.titlebutton { + outline-offset: -3px; } + .stack-switcher > .button > .label { + padding-left: 6px; + padding-right: 6px; } + .stack-switcher > .button > GtkImage, .header-bar .stack-switcher > .button.titlebutton > GtkImage, + .titlebar .stack-switcher > .button.titlebutton > GtkImage, + GtkCalendar.header .stack-switcher > .button.titlebutton > GtkImage { + padding-left: 6px; + padding-right: 6px; + padding-top: 3px; + padding-bottom: 3px; } + .stack-switcher > .button.text-button { + padding: 5px 10px 6px; } + .stack-switcher > .button.image-button, .header-bar .stack-switcher > .titlebutton.button, + .titlebar .stack-switcher > .titlebutton.button, + GtkCalendar.header .stack-switcher > .titlebutton.button { + padding: 5px 2px; } + .stack-switcher > .button.needs-attention:active > .label, .stack-switcher > .button.needs-attention:active > GtkImage, .stack-switcher > .button.needs-attention:checked > .label, .stack-switcher > .button.needs-attention:checked > GtkImage { + animation: none; + background-image: none; } .inline-toolbar .button, .inline-toolbar .header-bar .button.titlebutton, .header-bar .inline-toolbar .button.titlebutton, .inline-toolbar .titlebar .button.titlebutton, .titlebar .inline-toolbar .button.titlebutton, diff --git a/gtk/resources/theme/Adwaita/gtk-contained.css b/gtk/resources/theme/Adwaita/gtk-contained.css index fe037ba5e4..82b2bf95c0 100644 --- a/gtk/resources/theme/Adwaita/gtk-contained.css +++ b/gtk/resources/theme/Adwaita/gtk-contained.css @@ -948,25 +948,29 @@ GtkCalendar.header .button.titlebutton { .titlebar .text-button.titlebutton.button .label:last-child, GtkCalendar.header .text-button.titlebutton.button .label:last-child { padding-right: 8px; } - .stack-switcher > .button > .label { - padding-left: 6px; - padding-right: 6px; } - .stack-switcher > .button > GtkImage, .header-bar .stack-switcher > .button.titlebutton > GtkImage, - .titlebar .stack-switcher > .button.titlebutton > GtkImage, - GtkCalendar.header .stack-switcher > .button.titlebutton > GtkImage { - padding-left: 6px; - padding-right: 6px; - padding-top: 3px; - padding-bottom: 3px; } - .stack-switcher > .button.text-button { - padding: 5px 10px 6px; } - .stack-switcher > .button.image-button, .header-bar .stack-switcher > .titlebutton.button, - .titlebar .stack-switcher > .titlebutton.button, - GtkCalendar.header .stack-switcher > .titlebutton.button { - padding: 5px 2px; } - .stack-switcher > .button.needs-attention:active > .label, .stack-switcher > .button.needs-attention:active > GtkImage, .stack-switcher > .button.needs-attention:checked > .label, .stack-switcher > .button.needs-attention:checked > GtkImage { - animation: none; - background-image: none; } + .stack-switcher > .button, .header-bar .stack-switcher > .button.titlebutton, + .titlebar .stack-switcher > .button.titlebutton, + GtkCalendar.header .stack-switcher > .button.titlebutton { + outline-offset: -3px; } + .stack-switcher > .button > .label { + padding-left: 6px; + padding-right: 6px; } + .stack-switcher > .button > GtkImage, .header-bar .stack-switcher > .button.titlebutton > GtkImage, + .titlebar .stack-switcher > .button.titlebutton > GtkImage, + GtkCalendar.header .stack-switcher > .button.titlebutton > GtkImage { + padding-left: 6px; + padding-right: 6px; + padding-top: 3px; + padding-bottom: 3px; } + .stack-switcher > .button.text-button { + padding: 5px 10px 6px; } + .stack-switcher > .button.image-button, .header-bar .stack-switcher > .titlebutton.button, + .titlebar .stack-switcher > .titlebutton.button, + GtkCalendar.header .stack-switcher > .titlebutton.button { + padding: 5px 2px; } + .stack-switcher > .button.needs-attention:active > .label, .stack-switcher > .button.needs-attention:active > GtkImage, .stack-switcher > .button.needs-attention:checked > .label, .stack-switcher > .button.needs-attention:checked > GtkImage { + animation: none; + background-image: none; } .inline-toolbar .button, .inline-toolbar .header-bar .button.titlebutton, .header-bar .inline-toolbar .button.titlebutton, .inline-toolbar .titlebar .button.titlebutton, .titlebar .inline-toolbar .button.titlebutton,