[libadwaita/wip/exalm/buttons-again-2: 4/4] stylesheet: Remove button.outline




commit 15bb6db269fdeb70f5e5171ff4269d0aa3e2bf84
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Mon Nov 15 12:21:14 2021 +0500

    stylesheet: Remove button.outline
    
    We haven't been using it lately, let's remove it.
    
    Update docs and the last instance in the demo as well.
    
    Inline this style for the circular buttons inside menus instead.
    
    Fixes https://gitlab.gnome.org/GNOME/libadwaita/-/issues/198

 demo/adw-style-demo-window.ui                 | 11 +---------
 doc/migrating-between-development-versions.md |  7 ++++++
 doc/migrating-libhandy-1-4-to-libadwaita.md   |  8 ++++---
 src/stylesheet/widgets/_buttons.scss          | 31 ---------------------------
 src/stylesheet/widgets/_menus.scss            | 11 ++++++++--
 src/stylesheet/widgets/_toolbars.scss         |  4 ++--
 6 files changed, 24 insertions(+), 48 deletions(-)
---
diff --git a/demo/adw-style-demo-window.ui b/demo/adw-style-demo-window.ui
index 30a7d8ef..814acd6e 100644
--- a/demo/adw-style-demo-window.ui
+++ b/demo/adw-style-demo-window.ui
@@ -88,7 +88,7 @@
                 <child>
                   <object class="AdwPreferencesGroup">
                     <property name="title" translatable="yes">Buttons</property>
-                    <property name="description" translatable="yes">The "flat", "outline", 
"suggested-action" and "destructive" style classes action can be used together with "pill" or "circular".
+                    <property name="description" translatable="yes">The "flat", "suggested-action" and 
"destructive" style classes action can be used together with "pill" or "circular".
 
 The "opaque" style class allows to create buttons with custom colors that look similar to 
"suggested-action".</property>
                     <child>
@@ -114,15 +114,6 @@ The "opaque" style class allows to create buttons with custom colors that look s
                                     <property name="label" translatable="yes">Regular</property>
                                   </object>
                                 </child>
-                                <child>
-                                  <object class="GtkButton">
-                                    <property name="label" translatable="yes">Outline</property>
-                                    <property name="tooltip-text">outline</property>
-                                    <style>
-                                      <class name="outline"/>
-                                    </style>
-                                  </object>
-                                </child>
                                 <child>
                                   <object class="GtkButton">
                                     <property name="label" translatable="yes">Flat</property>
diff --git a/doc/migrating-between-development-versions.md b/doc/migrating-between-development-versions.md
index 0debe527..5a24ba4c 100644
--- a/doc/migrating-between-development-versions.md
+++ b/doc/migrating-between-development-versions.md
@@ -295,3 +295,10 @@ The `can-swipe-back` property have been renamed to
 [property@AdwPreferencesWindow:can-navigate-back], along with its accessors.
 The new properties also handle keyboard and mouse shortcuts in addition to
 swipes.
+
+### Adapt to Stylesheet Changes
+
+### Adapt to the `button.outline` style removal
+
+The `.outline` style class has been removed with no replacement. The regular
+button style should be used instead.
diff --git a/doc/migrating-libhandy-1-4-to-libadwaita.md b/doc/migrating-libhandy-1-4-to-libadwaita.md
index 27df35c1..6efdcc66 100644
--- a/doc/migrating-libhandy-1-4-to-libadwaita.md
+++ b/doc/migrating-libhandy-1-4-to-libadwaita.md
@@ -366,9 +366,6 @@ colors have been removed:
 * `@unfocused_insensitive_color`
 * `@unfocused_borders`
 
-The `.list-button` style class has been renamed to the more accurate name
-`.outline`.
-
 The public colors `@theme_selected_bg_color` and `@theme_selected_fg_color` have
 been renamed to `@accent_bg_color` and `@accent_fg_color`.
 
@@ -391,6 +388,11 @@ The `.combo` popover style class has been removed. Use `.menu` instead. You may
 need to remove manually added margins, padding or minimum height from the list
 items inside while doing it.
 
+### Adapt to the `button.outline` style removal
+
+The `.list-button` style class has been removed with no replacement. The regular
+button style should be used instead.
+
 #### Adapt to Header Bar, Action Bar, Search Bar and Toolbar Style Changes
 
 When possible, buttons in [class@Gtk.HeaderBar], [class@Gtk.ActionBar] and
diff --git a/src/stylesheet/widgets/_buttons.scss b/src/stylesheet/widgets/_buttons.scss
index 7b4708a2..abb3fa33 100644
--- a/src/stylesheet/widgets/_buttons.scss
+++ b/src/stylesheet/widgets/_buttons.scss
@@ -356,29 +356,6 @@ button.color {
   }
 }
 
-/* list buttons */
-/* tone down as per new designs, see issue #1473 */
-%outline_button,
-button.outline {
-  @extend %button_basic_flat;
-
-  @if $contrast == 'high' {
-    box-shadow: inset 0 0 0 1px $border_color;
-  }
-  @else {
-    box-shadow: inset 0 0 0 1px gtkalpha(currentColor, .15);
-
-    &:hover, &:active, &:checked {
-      box-shadow: none;
-    }
-  }
-
-  // Specificity bump
-  &:drop(active) {
-    @extend %button_basic_drop_active;
-  }
-}
-
 menubutton {
   &.osd {
     background: none;
@@ -389,7 +366,6 @@ menubutton {
 
   &.circular > button { @extend %circular_button; }
   &.flat > button { @extend %button_basic_flat; }
-  &.outline > button { @extend %outline_button; }
   &.pill > button { @extend %pill_button; }
 
   &.suggested-action {
@@ -537,13 +513,6 @@ splitbutton {
     }
   }
 
-  &.outline {
-    > button,
-    > menubutton > button {
-      @extend %outline_button;
-    }
-  }
-
   &.suggested-action {
     background-color: $accent_bg_color;
     color: $accent_fg_color;
diff --git a/src/stylesheet/widgets/_menus.scss b/src/stylesheet/widgets/_menus.scss
index f773379b..b71c3daf 100644
--- a/src/stylesheet/widgets/_menus.scss
+++ b/src/stylesheet/widgets/_menus.scss
@@ -26,12 +26,19 @@ popover.menu {
     padding: $menu_padding $menu_padding 6px;
 
     button.circular.image-button.model {
-      @extend %outline_button;
+      @extend %button_basic_flat;
 
       outline: none;
       padding: 11px;
+
+      box-shadow: inset 0 0 0 1px $border_color;
+
       &:selected {
-        background-color: $view_selected_color;
+        background-color: $view_selected_hover_color;
+
+        @if $contrast != 'high' {
+          box-shadow: none;
+        }
 
         &:active {
           background-color: $view_selected_active_color;
diff --git a/src/stylesheet/widgets/_toolbars.scss b/src/stylesheet/widgets/_toolbars.scss
index 3e14afcf..8e081334 100644
--- a/src/stylesheet/widgets/_toolbars.scss
+++ b/src/stylesheet/widgets/_toolbars.scss
@@ -81,7 +81,7 @@
 
   // Reset styles for popovers
   popover {
-    
button:not(.flat):not(.outline):not(.raised):not(.suggested-action):not(.destructive-action):not(.opaque) {
+    button:not(.flat):not(.raised):not(.suggested-action):not(.destructive-action):not(.opaque) {
       &.arrow-button,
       &.image-button,
       &.image-text-button {
@@ -89,7 +89,7 @@
       }
     }
 
-    
menubutton:not(.flat):not(.outline):not(.raised):not(.suggested-action):not(.destructive-action):not(.opaque) 
{
+    menubutton:not(.flat):not(.raised):not(.suggested-action):not(.destructive-action):not(.opaque) {
       &.image-button > button {
         @extend %button_basic_raised;
       }


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