[gtk+/gtk-3-14] Adwaita: fix stack-switcher button outline offset
- From: Lapo Calamandrei <lapo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-14] Adwaita: fix stack-switcher button outline offset
- Date: Thu, 16 Oct 2014 18:26:31 +0000 (UTC)
commit c25e8cefaed903db119c239390022f6d6912df39
Author: Lapo Calamandrei <calamandrei gmail com>
Date: Thu Oct 16 20:26:12 2014 +0200
Adwaita: fix stack-switcher button outline offset
See https://bugzilla.gnome.org/show_bug.cgi?id=738636
gtk/resources/theme/Adwaita/_common.scss | 3 +
gtk/resources/theme/Adwaita/gtk-contained-dark.css | 66 ++++++++++---------
gtk/resources/theme/Adwaita/gtk-contained.css | 66 ++++++++++---------
3 files changed, 73 insertions(+), 62 deletions(-)
---
diff --git a/gtk/resources/theme/Adwaita/_common.scss b/gtk/resources/theme/Adwaita/_common.scss
index 5e0b45f..6cf2a2f 100644
--- a/gtk/resources/theme/Adwaita/_common.scss
+++ b/gtk/resources/theme/Adwaita/_common.scss
@@ -520,6 +520,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 overridden by GtkRadioButton outline-offset
+
> GtkLabel {
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 d8b242b..2169964 100644
--- a/gtk/resources/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/resources/theme/Adwaita/gtk-contained-dark.css
@@ -832,37 +832,41 @@ GtkCalendar.header .button.titlebutton {
.titlebar .text-button.titlebutton.button GtkLabel:last-child,
GtkCalendar.header .text-button.titlebutton.button GtkLabel:last-child {
padding-right: 8px; }
- .stack-switcher > .button > GtkLabel, .header-bar .stack-switcher > .button.titlebutton > GtkLabel,
- .titlebar .stack-switcher > .button.titlebutton > GtkLabel,
- GtkCalendar.header .stack-switcher > .button.titlebutton > GtkLabel {
- 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 > GtkLabel, .stack-switcher > .button.needs-attention > GtkImage
{
- animation: needs_attention 150ms ease-in;
- background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(#3583d5),
to(transparent)), -gtk-gradient(radial, center center, 0, center center, 0.45, to(rgba(0, 0, 0, 0.81176)),
to(transparent));
- background-size: 6px 6px, 6px 6px;
- background-repeat: no-repeat;
- background-position: right 3px, right 2px; }
- .stack-switcher > .button.needs-attention > GtkLabel:backdrop, .stack-switcher > .button.needs-attention
GtkImage:backdrop {
- background-size: 6px 6px, 0 0; }
- .stack-switcher > .button.needs-attention > GtkLabel:dir(rtl), .stack-switcher > .button.needs-attention
GtkImage:dir(rtl) {
- background-position: left 3px, left 2px; }
- .stack-switcher > .button.needs-attention:active > GtkLabel, .stack-switcher >
.button.needs-attention:active > GtkImage, .stack-switcher > .button.needs-attention:checked > GtkLabel,
.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 > GtkLabel, .header-bar .stack-switcher > .button.titlebutton > GtkLabel,
+ .titlebar .stack-switcher > .button.titlebutton > GtkLabel,
+ GtkCalendar.header .stack-switcher > .button.titlebutton > GtkLabel {
+ 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 > GtkLabel, .stack-switcher > .button.needs-attention >
GtkImage {
+ animation: needs_attention 150ms ease-in;
+ background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(#3583d5),
to(transparent)), -gtk-gradient(radial, center center, 0, center center, 0.45, to(rgba(0, 0, 0, 0.81176)),
to(transparent));
+ background-size: 6px 6px, 6px 6px;
+ background-repeat: no-repeat;
+ background-position: right 3px, right 2px; }
+ .stack-switcher > .button.needs-attention > GtkLabel:backdrop, .stack-switcher >
.button.needs-attention > GtkImage:backdrop {
+ background-size: 6px 6px, 0 0; }
+ .stack-switcher > .button.needs-attention > GtkLabel:dir(rtl), .stack-switcher >
.button.needs-attention > GtkImage:dir(rtl) {
+ background-position: left 3px, left 2px; }
+ .stack-switcher > .button.needs-attention:active > GtkLabel, .stack-switcher >
.button.needs-attention:active > GtkImage, .stack-switcher > .button.needs-attention:checked > GtkLabel,
.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 add4c1c..e81b376 100644
--- a/gtk/resources/theme/Adwaita/gtk-contained.css
+++ b/gtk/resources/theme/Adwaita/gtk-contained.css
@@ -824,37 +824,41 @@ GtkCalendar.header .button.titlebutton {
.titlebar .text-button.titlebutton.button GtkLabel:last-child,
GtkCalendar.header .text-button.titlebutton.button GtkLabel:last-child {
padding-right: 8px; }
- .stack-switcher > .button > GtkLabel, .header-bar .stack-switcher > .button.titlebutton > GtkLabel,
- .titlebar .stack-switcher > .button.titlebutton > GtkLabel,
- GtkCalendar.header .stack-switcher > .button.titlebutton > GtkLabel {
- 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 > GtkLabel, .stack-switcher > .button.needs-attention > GtkImage
{
- animation: needs_attention 150ms ease-in;
- background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(#4a90d9),
to(transparent)), -gtk-gradient(radial, center center, 0, center center, 0.5, to(rgba(255, 255, 255,
0.76923)), to(transparent));
- background-size: 6px 6px, 6px 6px;
- background-repeat: no-repeat;
- background-position: right 3px, right 4px; }
- .stack-switcher > .button.needs-attention > GtkLabel:backdrop, .stack-switcher > .button.needs-attention
GtkImage:backdrop {
- background-size: 6px 6px, 0 0; }
- .stack-switcher > .button.needs-attention > GtkLabel:dir(rtl), .stack-switcher > .button.needs-attention
GtkImage:dir(rtl) {
- background-position: left 3px, left 4px; }
- .stack-switcher > .button.needs-attention:active > GtkLabel, .stack-switcher >
.button.needs-attention:active > GtkImage, .stack-switcher > .button.needs-attention:checked > GtkLabel,
.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 > GtkLabel, .header-bar .stack-switcher > .button.titlebutton > GtkLabel,
+ .titlebar .stack-switcher > .button.titlebutton > GtkLabel,
+ GtkCalendar.header .stack-switcher > .button.titlebutton > GtkLabel {
+ 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 > GtkLabel, .stack-switcher > .button.needs-attention >
GtkImage {
+ animation: needs_attention 150ms ease-in;
+ background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(#4a90d9),
to(transparent)), -gtk-gradient(radial, center center, 0, center center, 0.5, to(rgba(255, 255, 255,
0.76923)), to(transparent));
+ background-size: 6px 6px, 6px 6px;
+ background-repeat: no-repeat;
+ background-position: right 3px, right 4px; }
+ .stack-switcher > .button.needs-attention > GtkLabel:backdrop, .stack-switcher >
.button.needs-attention > GtkImage:backdrop {
+ background-size: 6px 6px, 0 0; }
+ .stack-switcher > .button.needs-attention > GtkLabel:dir(rtl), .stack-switcher >
.button.needs-attention > GtkImage:dir(rtl) {
+ background-position: left 3px, left 4px; }
+ .stack-switcher > .button.needs-attention:active > GtkLabel, .stack-switcher >
.button.needs-attention:active > GtkImage, .stack-switcher > .button.needs-attention:checked > GtkLabel,
.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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]