[gnome-shell] style: Add generic .icon-button class
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] style: Add generic .icon-button class
- Date: Tue, 2 Aug 2022 18:07:34 +0000 (UTC)
commit d87950da550b2250e22207e028aab45f94fc4d11
Author: Florian Müllner <fmuellner gnome org>
Date: Tue Aug 2 19:26:53 2022 +0200
style: Add generic .icon-button class
The class is meant for buttons that only contain an icon, as
found in many GTK apps.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2397>
data/theme/gnome-shell-sass/_common.scss | 18 ++++++++++++++++++
data/theme/gnome-shell-sass/widgets/_buttons.scss | 4 ++++
2 files changed, 22 insertions(+)
---
diff --git a/data/theme/gnome-shell-sass/_common.scss b/data/theme/gnome-shell-sass/_common.scss
index 0b89700b43..6372af49e3 100644
--- a/data/theme/gnome-shell-sass/_common.scss
+++ b/data/theme/gnome-shell-sass/_common.scss
@@ -102,6 +102,24 @@ stage {
&:checked { @include button(checked);}
}
+// normal icon-only button
+%icon_button {
+ border-radius: 99px;
+ border-style: solid;
+ border-width: 1px;
+ font-weight: bold;
+ padding: $base_padding*2;
+
+ @include button(normal);
+ &:focus { @include button(focus);}
+ &:hover { @include button(hover);}
+ &:insensitive { @include button(insensitive);}
+ &:active { @include button(active);}
+ &:checked { @include button(checked);}
+
+ & > StIcon { icon-size: $base_icon_size; }
+}
+
// buttons in dialogs/notifications
// lighter in color and have a greater radius
diff --git a/data/theme/gnome-shell-sass/widgets/_buttons.scss
b/data/theme/gnome-shell-sass/widgets/_buttons.scss
index 6a72c07966..df99524552 100644
--- a/data/theme/gnome-shell-sass/widgets/_buttons.scss
+++ b/data/theme/gnome-shell-sass/widgets/_buttons.scss
@@ -4,3 +4,7 @@
@extend %button; // that's it
min-height: 22px;
}
+
+.icon-button {
+ @extend %icon_button; // that's it
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]