[libadwaita/wip/exalm/menu-split-buttons: 19/19] stylesheet: Make any arrow buttons and split buttons flat as well
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/menu-split-buttons: 19/19] stylesheet: Make any arrow buttons and split buttons flat as well
- Date: Fri, 10 Sep 2021 14:26:40 +0000 (UTC)
commit 62728c89d45534a12e77781389cf7ec1709f4453
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Fri Sep 10 19:20:14 2021 +0500
stylesheet: Make any arrow buttons and split buttons flat as well
The arrow there is already an icon, so there's no ambiguity.
Update the migration guide as well.
doc/migrating-libhandy-1-4-to-libadwaita.md | 4 ++--
src/stylesheet/widgets/_toolbars.scss | 35 +++++++++++++++++------------
2 files changed, 23 insertions(+), 16 deletions(-)
---
diff --git a/doc/migrating-libhandy-1-4-to-libadwaita.md b/doc/migrating-libhandy-1-4-to-libadwaita.md
index 77a09505..d30a77b1 100644
--- a/doc/migrating-libhandy-1-4-to-libadwaita.md
+++ b/doc/migrating-libhandy-1-4-to-libadwaita.md
@@ -318,8 +318,8 @@ The following buttons get flat appearance:
* Icon-only buttons;
* Buttons with an icon and a label (using [class@Adw.ButtonContent]);
-* Menu buttons containing an arrow and either an icon or [class@Adw.ButtonContent];
-* [class@Adw.SplitButton] containing either an icon or [class@Adw.ButtonContent];
+* Menu buttons containing an arrow;
+* [class@Adw.SplitButton];
* Any other button with the `.flat` style class.
The following buttons keep default appearance:
diff --git a/src/stylesheet/widgets/_toolbars.scss b/src/stylesheet/widgets/_toolbars.scss
index 07c0e193..f308dd03 100644
--- a/src/stylesheet/widgets/_toolbars.scss
+++ b/src/stylesheet/widgets/_toolbars.scss
@@ -1,19 +1,24 @@
%toolbar {
- button.image-button:not(.raised):not(.suggested-action):not(.destructive-action),
- button.image-text-button:not(.raised):not(.suggested-action):not(.destructive-action) {
- @extend %button_basic_flat;
+ button:not(.raised):not(.suggested-action):not(.destructive-action) {
+ &.arrow-button,
+ &.image-button,
+ &.image-text-button {
+ @extend %button_basic_flat;
+ }
}
- .linked button {
- &.image-button:not(.raised):not(.suggested-action):not(.destructive-action),
- &.image-text-button:not(.raised):not(.suggested-action):not(.destructive-action) {
+ .linked button:not(.raised):not(.suggested-action):not(.destructive-action) {
+ &.arrow-button,
+ &.image-button,
+ &.image-text-button {
@extend %button_basic_raised;
}
}
- menubutton.raised {
- > button.image-button,
- > button.image-text-button {
+ menubutton.raised > button {
+ &.arrow-button,
+ &.image-button,
+ &.image-text-button {
@extend %button_basic_raised;
}
}
@@ -25,8 +30,7 @@
margin-bottom: 6px;
}
- &.image-button:not(.raised):not(.suggested-action):not(.destructive-action),
- &.image-text-button:not(.raised):not(.suggested-action):not(.destructive-action) {
+ &:not(.raised):not(.suggested-action):not(.destructive-action) {
@extend %flat_split_button;
}
}
@@ -58,9 +62,12 @@
// Reset styles for popovers
popover {
- button.image-button:not(.raised):not(.suggested-action):not(.destructive-action),
- button.image-text-button:not(.raised):not(.suggested-action):not(.destructive-action) {
- @extend %button_basic_raised;
+ button:not(.raised):not(.suggested-action):not(.destructive-action) {
+ &.arrow-button,
+ &.image-button,
+ &.image-text-button {
+ @extend %button_basic_raised;
+ }
}
entry,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]