[gtk: 1/2] Adwaita: Simplify stackswitcher button styling
- From: Jakub Steiner <jimmac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk: 1/2] Adwaita: Simplify stackswitcher button styling
- Date: Fri, 2 Oct 2020 15:09:09 +0000 (UTC)
commit 68379c3ff71628cbb53589cc764446b919631c62
Author: nana-4 <hnmaigo gmail com>
Date: Fri Aug 28 22:06:44 2020 +0900
Adwaita: Simplify stackswitcher button styling
Simply use negative margins against the padding.
Also remove the indicator only when the .needs-attention style class is
removed.
gtk/theme/Adwaita/_common.scss | 32 ++++----------------------------
1 file changed, 4 insertions(+), 28 deletions(-)
---
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index 1b03c4d16f..bc09b12dcf 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -719,42 +719,18 @@ button {
// padding added too.
> label {
- padding-left: 6px; // label padding
- padding-right: 6px; //
+ padding: 0 6px;
+ margin: 0 -6px;
}
> image {
- padding-left: 6px; // image padding
- padding-right: 6px; //
- padding-top: 3px; //
- padding-bottom: 3px; //
- }
-
- &.text-button {
- // compensate text-button paddings
- padding-left: 10px;
- padding-right: 10px;
- }
-
- &.image-button {
- // we want image buttons to have a 1:1 aspect ratio, so compensation
- // of the padding added to the GtkImage is needed
- padding-left: 2px;
- padding-right: 2px;
+ padding: 3px 6px;
+ margin: -3px -6px;
}
&.needs-attention {
> label,
> image { @extend %needs_attention; }
-
- &:active,
- &:checked {
- > label,
- > image {
- animation: none;
- background-image: none;
- }
- }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]