[libadwaita/wip/exalm/stylesheet2: 48/103] stylesheet: Rework modelbutton style




commit 2c023186c84c3de9c7d9a73391a2d134ea1c4136
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Thu Apr 8 20:17:21 2021 +0500

    stylesheet: Rework modelbutton style
    
    Inline .flat styles, deduplicate them. Model buttons are always flat, so
    there's no need to distinguish them.

 src/stylesheet/_common.scss | 55 +++++++++++++++++----------------------------
 1 file changed, 21 insertions(+), 34 deletions(-)
---
diff --git a/src/stylesheet/_common.scss b/src/stylesheet/_common.scss
index a77beb8..ebf8ce9 100644
--- a/src/stylesheet/_common.scss
+++ b/src/stylesheet/_common.scss
@@ -805,36 +805,6 @@ button {
   &:not(:last-child) > button { @extend %linked_not_bottom; }
 }
 
-/* menu buttons */
-
-modelbutton.flat {
-  min-height: 26px;
-  padding-left: 5px;
-  padding-right: 5px;
-  border-radius: $button_radius;
-
-  @extend %undecorated_button;
-
-  &:hover { background-color: $menu_selected_color; }
-
-  &:disabled { color: $insensitive_fg_color; }
-
-  &:selected { @extend %selected_items; }
-
-  arrow {
-    background: none;
-    min-width: 16px;
-    min-height: 16px;
-    opacity: 0.3; // dim icon
-
-    &:hover { background: none; }
-
-    &.left { -gtk-icon-source: -gtk-icontheme("go-previous-symbolic"); }
-
-    &.right { -gtk-icon-source: -gtk-icontheme("go-next-symbolic"); }
-  }
-}
-
 /* oldstyle toolbar buttons */
 
 .toolbar button {
@@ -1870,14 +1840,31 @@ popover.menu {
     padding: 0 $_menu-padding;
     border-radius: $menu-margin;
 
+    @extend %undecorated_button;
+
+    &:hover,
     &:selected {
       color: $text-color;
       background-color: $menu_selected_color;
+
+      &:active {
+        background-color: darken($bg_color,14%); // matching buttons
+      }
     }
-    &:selected:active {
-      //@extend %selected_items;
-      //color: $selected_fg_color;
-      background-color: darken($bg_color,14%); // matching buttons
+
+    &:disabled { color: $insensitive_fg_color; }
+
+    arrow {
+      background: none;
+      min-width: 16px;
+      min-height: 16px;
+      opacity: 0.3; // dim icon
+
+      &:hover { background: none; }
+
+      &.left { -gtk-icon-source: -gtk-icontheme("go-previous-symbolic"); }
+
+      &.right { -gtk-icon-source: -gtk-icontheme("go-next-symbolic"); }
     }
   }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]