[libadwaita/wip/exalm/exclusive-toggles: 5/6] stylesheet: Use toggle group 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 toggle group style for GtkStackSwitcher
- Date: Sat, 11 Sep 2021 22:14:05 +0000 (UTC)
commit 76c0ebe44470240d49b317c22a7211463cbb5ea1
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Sun Sep 12 00:26:03 2021 +0500
stylesheet: Use toggle group style for GtkStackSwitcher
src/stylesheet/widgets/_buttons.scss | 21 ---------------------
src/stylesheet/widgets/_toggle-group.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/_toggle-group.scss b/src/stylesheet/widgets/_toggle-group.scss
index 584e2864..739e41f1 100644
--- a/src/stylesheet/widgets/_toggle-group.scss
+++ b/src/stylesheet/widgets/_toggle-group.scss
@@ -1,3 +1,4 @@
+stackswitcher,
.toggle-group {
background-color: gtkalpha(currentColor, .1);
padding: 3px;
@@ -49,3 +50,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 feba0e60..838e3d59 100644
--- a/src/stylesheet/widgets/_toolbars.scss
+++ b/src/stylesheet/widgets/_toolbars.scss
@@ -24,7 +24,8 @@
}
}
- .toggle-group {
+ .toggle-group,
+ stackswitcher {
button:not(.raised):not(.suggested-action):not(.destructive-action).toggle {
&.arrow-button,
&.image-button,
@@ -79,7 +80,8 @@
margin-bottom: 10px;
}
- .toggle-group {
+ .toggle-group,
+ stackswitcher {
margin-top: 6px;
margin-bottom: 6px;
@@ -112,7 +114,8 @@
button,
menubutton,
switch,
- .toggle-group {
+ .toggle-group,
+ stackswitcher {
margin-top: 0;
margin-bottom: 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]