[libadwaita/wip/exalm/exclusive-toggles: 5/6] stylesheet: Use exclusive toggle style for GtkStackSwitcher
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/exclusive-toggles: 5/6] stylesheet: Use exclusive toggle style for GtkStackSwitcher
- Date: Sat, 11 Sep 2021 19:28:10 +0000 (UTC)
commit 3a76f0d1eb99effe276d1262a58ca80f8d5225de
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Sun Sep 12 00:26:03 2021 +0500
stylesheet: Use exclusive toggle style for GtkStackSwitcher
src/stylesheet/widgets/_buttons.scss | 21 -------------------
src/stylesheet/widgets/_exclusive-toggles.scss | 28 ++++++++++++++++++++++++++
src/stylesheet/widgets/_toolbars.scss | 9 ++++++---
3 files changed, 34 insertions(+), 24 deletions(-)
---
diff --git a/src/stylesheet/widgets/_buttons.scss b/src/stylesheet/widgets/_buttons.scss
index c56d97ce..ebc978a0 100644
--- a/src/stylesheet/widgets/_buttons.scss
+++ b/src/stylesheet/widgets/_buttons.scss
@@ -240,27 +240,6 @@ button {
}
}
- stackswitcher > & {
- // 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.
-
- > label {
- padding: 0 6px;
- margin: 0 -6px;
- }
-
- > image {
- padding: 3px 6px;
- margin: -3px -6px;
- }
-
- &.needs-attention {
- > label,
- > image { @extend %needs_attention; }
- }
- }
-
// hide separators
&.font {
separator { background-color: transparent; }
diff --git a/src/stylesheet/widgets/_exclusive-toggles.scss b/src/stylesheet/widgets/_exclusive-toggles.scss
index 862f5f03..89ac41fe 100644
--- a/src/stylesheet/widgets/_exclusive-toggles.scss
+++ b/src/stylesheet/widgets/_exclusive-toggles.scss
@@ -1,3 +1,4 @@
+stackswitcher,
.exclusive {
background-color: gtkalpha(currentColor, .1);
padding: 3px;
@@ -50,3 +51,30 @@
}
}
}
+
+/********************
+ * GtkStackSwitcher *
+ ********************/
+
+stackswitcher {
+ > button {
+ // 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.
+
+ > label {
+ padding: 0 6px;
+ margin: 0 -6px;
+ }
+
+ > image {
+ padding: 3px 6px;
+ margin: -3px -6px;
+ }
+
+ &.needs-attention {
+ > label,
+ > image { @extend %needs_attention; }
+ }
+ }
+}
diff --git a/src/stylesheet/widgets/_toolbars.scss b/src/stylesheet/widgets/_toolbars.scss
index bbb78720..f8c49243 100644
--- a/src/stylesheet/widgets/_toolbars.scss
+++ b/src/stylesheet/widgets/_toolbars.scss
@@ -24,7 +24,8 @@
}
}
- .exclusive {
+ .exclusive,
+ stackswitcher {
button:not(.raised):not(.suggested-action):not(.destructive-action).toggle {
&.arrow-button,
&.image-button,
@@ -79,7 +80,8 @@
margin-bottom: 10px;
}
- .exclusive {
+ .exclusive,
+ stackswitcher {
margin-top: 6px;
margin-bottom: 6px;
@@ -112,7 +114,8 @@
button,
menubutton,
switch,
- .exclusive {
+ .exclusive,
+ stackswitcher {
margin-top: 0;
margin-bottom: 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]