[gnome-shell/wip/snwh/light-theme-fixes] css/quick-settings: Update icon-button styles




commit 2402d7a095dac9ba6e1f1945d947643cde8864e1
Author: Sam Hewitt <sam snwh org>
Date:   Thu Oct 13 14:21:17 2022 -0230

    css/quick-settings: Update icon-button styles
    
    - add an entire flat style to button drawing function
    - clean up the icon button css in quick settings
    - adjust padding in QS sliders
    - fixes #5918
    
    Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2510>

 data/theme/gnome-shell-sass/_colors.scss           | 41 +++++++++++-----------
 data/theme/gnome-shell-sass/_common.scss           |  1 +
 data/theme/gnome-shell-sass/_drawing.scss          | 39 +++++++++++---------
 data/theme/gnome-shell-sass/widgets/_app-grid.scss |  7 ++--
 data/theme/gnome-shell-sass/widgets/_calendar.scss |  4 +--
 data/theme/gnome-shell-sass/widgets/_dash.scss     |  5 +--
 .../gnome-shell-sass/widgets/_login-dialog.scss    | 12 ++++---
 .../gnome-shell-sass/widgets/_message-list.scss    | 16 ++++-----
 data/theme/gnome-shell-sass/widgets/_misc.scss     |  2 +-
 .../gnome-shell-sass/widgets/_quick-settings.scss  |  7 ++--
 .../gnome-shell-sass/widgets/_screenshot.scss      |  2 +-
 data/theme/gnome-shell-sass/widgets/_slider.scss   |  2 +-
 .../gnome-shell-sass/widgets/_switcher-popup.scss  |  6 ++--
 13 files changed, 81 insertions(+), 63 deletions(-)
---
diff --git a/data/theme/gnome-shell-sass/_colors.scss b/data/theme/gnome-shell-sass/_colors.scss
index b83b1edf1d..276b00b4c5 100644
--- a/data/theme/gnome-shell-sass/_colors.scss
+++ b/data/theme/gnome-shell-sass/_colors.scss
@@ -5,38 +5,38 @@
 
 $is_highcontrast: "false";
 
-$_dark_base_color: darken(desaturate(#241f31, 100%), 2%);
+$_dark_base_color: darken(desaturate($dark_4, 100%), 2%);
 
-$base_color: if($variant == 'light', #fff, $_dark_base_color);
-$bg_color: if($variant == 'light', #f6f5f4, lighten($base_color, 5%));
-$fg_color: if($variant == 'light', transparentize(black, .2), white);
+$base_color: if($variant == 'light', $light_2, $_dark_base_color);
+$bg_color: if($variant == 'light', $light_3, lighten($base_color, 5%));
+$fg_color: if($variant == 'light', $_dark_base_color, white);
 
-$selected_fg_color: #fff;
-$selected_bg_color: #3584e4;
-$selected_borders_color: if($variant== 'light', darken($selected_bg_color, 15%), darken($selected_bg_color, 
30%));
+$selected_fg_color: $light_1;
+$selected_bg_color: $blue_3;
+$selected_borders_color: if($variant == 'light', darken($selected_bg_color, 15%), darken($selected_bg_color, 
30%));
 
-$borders_color: if($variant == 'light', transparentize($fg_color, .5), transparentize($fg_color, .9));
-$borders_edge: if($variant == 'light', rgba(255,255,255,0.8), lighten($bg_color, 5%));
+$borders_color: if($variant == 'light', transparentize($fg_color, .85), transparentize($fg_color, .9));
+$borders_edge: if($variant == 'light', darken($bg_color, 2%), lighten($bg_color, 5%));
 
 $link_color: if($variant == 'light', darken($selected_bg_color, 10%), lighten($selected_bg_color, 20%));
 $link_visited_color: if($variant == 'light', darken($selected_bg_color, 20%), lighten($selected_bg_color, 
10%));
 
-$warning_color: if($variant == 'light', $yellow_5, #cd9309);
+$warning_color: if($variant == 'light', $yellow_5, $yellow_3);
 $error_color: if($variant == 'light', $red_3, $red_4);
 $success_color: if($variant == 'light', $green_4, $green_5);
 $destructive_color: $error_color;
 
-$osd_fg_color: white;
-$osd_bg_color: $_dark_base_color; //hardcoded for both light & dark
+$osd_fg_color: $light_1;
+$osd_bg_color: mix($_dark_base_color, $osd_fg_color, 95%); //hardcoded for both light & dark
 $osd_insensitive_bg_color: transparentize(mix($osd_fg_color, opacify($osd_bg_color, 1), 10%), 0.5);
 $osd_insensitive_fg_color: if($variant == 'light', mix($osd_fg_color, $osd_bg_color, 80%),  
mix($osd_fg_color, $osd_bg_color, 70%));
-$osd_borders_color: transparentize(black, 0.3);
+$osd_borders_color: transparentize($osd_fg_color, 0.9);
 $osd_outer_borders_color: transparentize($osd_fg_color, 0.98);
 
-$shadow_color: if($variant == 'light', rgba(0,0,0,0.1), rgba(0,0,0,0.2));
+$shadow_color: if($variant == 'light', rgba(0,0,0,.05), rgba(0,0,0,0.2));
 
 // button
-$button_mix_factor: 5%;
+$button_mix_factor: 8%;
 
 // cards
 $card_bg_color: if($variant == 'light', darken($bg_color, 5%), lighten($bg_color, 2%));
@@ -46,7 +46,7 @@ $card_outer_borders_color: transparentize($fg_color, 0.98);
 $bubble_buttons_color: if($variant == 'light', darken($bg_color, 12%), lighten($bg_color, 10%));
 
 // overview background color
-$system_bg_color: $base_color;
+$system_bg_color: $_dark_base_color; // always dark
 
 //insensitive state derived colors
 $insensitive_fg_color: mix($fg_color, $bg_color, 50%);
@@ -61,15 +61,14 @@ $backdrop_insensitive_color: if($variant =='light', darken($backdrop_bg_color,15
 $backdrop_borders_color: mix($borders_color, $bg_color, 90%);
 $backdrop_dark_fill: mix($backdrop_borders_color,$backdrop_bg_color, 35%);
 
-
 // derived checked colors
 $checked_bg_color: if($variant=='light', darken($bg_color, 7%), lighten($bg_color, 7%));
 $checked_fg_color: if($variant=='light', darken($fg_color, 7%), lighten($fg_color, 7%));
 
 // derived hover colors
-$hover_bg_color: if($variant=='light', darken($bg_color, 3%), lighten($bg_color, 10%));
-$hover_fg_color: if($variant=='light', darken($fg_color, 5%), lighten($fg_color, 10%));
+$hover_bg_color: if($variant=='light', darken($bg_color,9%), lighten($bg_color, 10%));
+$hover_fg_color: if($variant=='light', darken($fg_color,9%), lighten($fg_color, 10%));
 
 // derived active colors
-$active_bg_color: if($variant=='light', darken($bg_color, 5%), lighten($bg_color, 12%));
-$active_fg_color: if($variant=='light', darken($fg_color, 5%), lighten($fg_color, 12%));
+$active_bg_color: if($variant=='light', darken($bg_color, 11%), lighten($bg_color, 12%));
+$active_fg_color: if($variant=='light', darken($fg_color, 11%), lighten($fg_color, 12%));
diff --git a/data/theme/gnome-shell-sass/_common.scss b/data/theme/gnome-shell-sass/_common.scss
index 9ca89d182b..f96f622b15 100644
--- a/data/theme/gnome-shell-sass/_common.scss
+++ b/data/theme/gnome-shell-sass/_common.scss
@@ -81,6 +81,7 @@ stage {
   border: 2px solid transparent;
   transition-duration: 200ms;
   text-align: center;
+  color: inherit;
 }
 
 // dialogs
diff --git a/data/theme/gnome-shell-sass/_drawing.scss b/data/theme/gnome-shell-sass/_drawing.scss
index 7c8959e2cf..b7d6245b61 100644
--- a/data/theme/gnome-shell-sass/_drawing.scss
+++ b/data/theme/gnome-shell-sass/_drawing.scss
@@ -25,33 +25,33 @@
 
 // entries
 
-@mixin entry($t, $fc:$selected_bg_color) {
+@mixin entry($t) {
 //
 // Entries drawing function
 //
 // $t: entry type
-// $fc: focus color
 //
-// possible $t values:
-// normal, focus, insensitive
+// possible $t values: normal, focus, insensitive
 //
 
+  $_entry_bg_color: if($variant == 'light', darken($bg_color, 7%), lighten($bg_color, 7%));
   @if $t==normal {
-    background-color: lighten($bg_color, 5%);
+    background-color: $_entry_bg_color;
     color: transparentize($fg_color,0.3);
-    border: 2px solid lighten($bg_color, 5%);
+    border: 2px solid $_entry_bg_color
   }
 
   @if $t==focus {
-    background-color: mix(lighten($bg_color, 5%), $selected_bg_color, 95%);
-    border-color: $fc;
+    background-color: mix($_entry_bg_color, $selected_bg_color, 95%);
+    border-color: $selected_bg_color;
     color: $fg_color;
     &:hover {}
   }
 
+  $_entry_hover_bg_color: if($variant == 'light', darken($hover_bg_color, 5%), lighten($hover_bg_color, 5%));
   @if $t==hover {
-    background-color:lighten($hover_bg_color, 5%);
-    border-color:lighten($hover_bg_color, 5%);
+    background-color:$_entry_hover_bg_color;
+    border-color:$_entry_hover_bg_color;
     color: transparentize($fg_color,0.3);
   }
 
@@ -178,7 +178,7 @@
   // hover button
   @else if $t==hover {
     color: $tc;
-    background-color: lighten($button_bg_color, 3%);
+    background-color: if($variant == 'light', darken($button_bg_color, 3%), lighten($button_bg_color, 3%));
 
     @if $is_highcontrast == "true" {
       box-shadow: inset 0 0 0 1px lighten($button_inset_color, 3%);
@@ -189,7 +189,7 @@
   // active button
   @else if $t==active {
     color: $tc;
-    background-color:  lighten($button_bg_color, 6%);
+    background-color: if($variant == 'light', darken($button_bg_color, 6%), lighten($button_bg_color, 6%));
     @if $is_highcontrast == "true" {
       box-shadow: inset 0 0 0 1px lighten($button_inset_color, 6%);
       background-color: mix(lighten($button_bg_color, 6%), $button_inset_color, 10%);
@@ -199,7 +199,7 @@
   // checked button
   @else if $t==checked {
     color: $tc;
-    background-color: lighten($button_bg_color, 9%);
+    background-color: if($variant == 'light', darken($button_bg_color, 9%), lighten($button_bg_color, 9%));
     @if $is_highcontrast == "true" {
       box-shadow: inset 0 0 0 1px lighten($button_inset_color, 9%);
       background-color: mix(lighten($button_bg_color, 9%), $button_inset_color, 10%);
@@ -225,7 +225,7 @@
     &:focus {
       box-shadow: inset 0 0 0 2px lighten($selected_bg_color, 10%);
     }
-    &:hover, &:focus { 
+    &:hover, &:focus {
       background-color: lighten($selected_bg_color, 5%);
       color: lighten($selected_fg_color, 5%);
     }
@@ -286,9 +286,9 @@
   @if $flat {
     .overview-icon { background-color: transparent;}
   } @else {
-    .overview-icon { background-color: transparentize($color, .81);}
+    .overview-icon { background-color: transparentize($color, .9);}
   }
-  &:hover .overview-icon { background-color: transparentize($color, .9);}
+  &:hover .overview-icon { background-color: transparentize($color, .87);}
 
   &:selected .overview-icon,
   &:focus .overview-icon {
@@ -333,4 +333,11 @@
   &:active {
     @include button(active, $c:$card_bg_color);
   }
+
+  &:insensitive {
+    @include button(insensitive, $c:$card_bg_color);
+    @if $flat {
+     background-color: transparent;
+    }
+  }
 }
diff --git a/data/theme/gnome-shell-sass/widgets/_app-grid.scss 
b/data/theme/gnome-shell-sass/widgets/_app-grid.scss
index 9da650cf9c..b282614a4a 100644
--- a/data/theme/gnome-shell-sass/widgets/_app-grid.scss
+++ b/data/theme/gnome-shell-sass/widgets/_app-grid.scss
@@ -20,7 +20,10 @@ $app_icon_size: 96px;
 .app-well-app {
   @include overview_icon($osd_fg_color);
 
-  .overview-icon { padding: $base_padding*2;}
+  .overview-icon {
+    padding: $base_padding*2;
+    color: $osd_fg_color;
+  }
   .overview-icon.overview-icon-with-label {
     > StBoxLayout {
       spacing: $base_padding;
@@ -35,8 +38,8 @@ $app_icon_size: 96px;
 
 // expanded folder
 .app-folder-dialog {
+  @extend %osd_panel;
   border-radius: $modal_radius*2;
-  background-color: $dash_background_color;
 
   & .folder-name-container {
     padding: 24px 36px 0;
diff --git a/data/theme/gnome-shell-sass/widgets/_calendar.scss 
b/data/theme/gnome-shell-sass/widgets/_calendar.scss
index fa7080b44c..c549a4eeb0 100644
--- a/data/theme/gnome-shell-sass/widgets/_calendar.scss
+++ b/data/theme/gnome-shell-sass/widgets/_calendar.scss
@@ -72,11 +72,11 @@
     transition-duration: 100ms;
     @extend %numeric;
     @extend %smaller;
-    
+
     &:hover {background-color: $hover_bg_color;}
     &:focus {
       background-color: mix($bg_color, $selected_bg_color, 80%);
-      color: $selected_fg_color;
+      color: inherit;
       box-shadow:inset 0 0 0 2px transparentize($selected_bg_color, 0.4);
     }
 
diff --git a/data/theme/gnome-shell-sass/widgets/_dash.scss b/data/theme/gnome-shell-sass/widgets/_dash.scss
index 8f5d5f939b..222b355ecc 100644
--- a/data/theme/gnome-shell-sass/widgets/_dash.scss
+++ b/data/theme/gnome-shell-sass/widgets/_dash.scss
@@ -1,6 +1,6 @@
 /* Dash */
 
-$dash_background_color: lighten($system_bg_color, 5%);
+$dash_background_color: $osd_bg_color;
 $dash_placeholder_size: 32px;
 $dash_padding: $base_padding*2; // 12px
 $dash_border_radius: $modal_radius + $dash_padding;
@@ -53,6 +53,7 @@ $dash_border_radius: $modal_radius + $dash_padding;
 
   .show-apps, .app-well-app {
     padding-bottom: $dash_padding;
+    color: $osd_fg_color;
   }
 }
 
@@ -60,7 +61,7 @@ $dash_border_radius: $modal_radius + $dash_padding;
 .dash-separator {
   width: 1px;
   margin: 0 $base_margin;
-  background-color: $borders_color;
+  background-color: $osd_borders_color;
   margin-bottom: $dash_padding;
 }
 
diff --git a/data/theme/gnome-shell-sass/widgets/_login-dialog.scss 
b/data/theme/gnome-shell-sass/widgets/_login-dialog.scss
index 208165d127..ff35428ef0 100644
--- a/data/theme/gnome-shell-sass/widgets/_login-dialog.scss
+++ b/data/theme/gnome-shell-sass/widgets/_login-dialog.scss
@@ -16,8 +16,8 @@
   .modal-dialog-button-box { spacing: 3px; }
   .modal-dialog-button {
     padding: 4px 18px;
-    background-color: darken($system_bg_color, 3%);
-    border-color: darken($system_bg_color, 3%);
+    background-color: darken($_gdm_bg, 3%);
+    border-color: darken($_gdm_bg, 3%);
     color: $osd_fg_color;
 
     $_hover_c: lighten($_gdm_bg, 5%);
@@ -25,11 +25,13 @@
       background-color: $_hover_c;
       border-color: $_hover_c;
     }
+
+    $_active_c: darken($_gdm_bg, 5%);
     &:active {
-      $_active_c: darken($_gdm_bg, 5%);
       background-color: $_active_c;
       border-color: $_active_c;
     }
+
     &:insensitive {
       @include button(insensitive);
       border-color: darken($_gdm_bg, 5%);
@@ -183,14 +185,16 @@
 .unlock-dialog {
   StEntry {
     border:none !important;
+    color: $osd_fg_color;
     &:focus {
       background-color: if($variant == 'light', transparentize(white, 0.9), transparentize($fg_color, 0.9));
     }
-    &:insensitive { 
+    &:insensitive {
       color: if($variant == 'light', transparentize(white, 0.5), transparentize($fg_color, 0.5));
       background-color: if($variant == 'light', transparentize(white, 0.95), transparentize($fg_color, 
0.95));
     }
   }
+  StEntry.hint-text {color: transparentize($osd_fg_color, 0.3);}
 
   .cancel-button,
   .switch-user-button,
diff --git a/data/theme/gnome-shell-sass/widgets/_message-list.scss 
b/data/theme/gnome-shell-sass/widgets/_message-list.scss
index 5196661c14..d872bfd953 100644
--- a/data/theme/gnome-shell-sass/widgets/_message-list.scss
+++ b/data/theme/gnome-shell-sass/widgets/_message-list.scss
@@ -10,7 +10,7 @@
   &:ltr {margin-left: 0; margin-right: $base_margin; padding-right: $base_padding; border-right-width: 1px; }
   &:rtl {margin-right: 0; margin-left: $base_margin; padding-left: $base_padding; border-left-width: 1px; }
 
-  .message-list-placeholder { 
+  .message-list-placeholder {
     @extend %title_2;
     color: transparentize($insensitive_fg_color, .5);
 
@@ -25,7 +25,7 @@
 
 .message-list-sections {
   spacing: $base_padding;
-  margin: 0; 
+  margin: 0;
   padding-bottom: $base_padding;
 
   // to account for scrollbar
@@ -117,14 +117,14 @@
   // close button
   .message-close-button {
     color: $fg_color;
-    background-color: transparentize($fg_color, 0.9);
+    background-color: transparentize($fg_color, 0.8);
     border-radius: 99px;
     padding: $base_padding - 1px;
     margin: 1px;
-    &:hover {background-color: transparentize($fg_color, 0.8);}
-    &:active {background-color: transparentize($fg_color, 0.9);}
+    &:hover {background-color: transparentize($fg_color, 0.7);}
+    &:active {background-color: transparentize($fg_color, 0.8);}
 
-    & StIcon { icon-size: $base_icon_size; }
+    > StIcon { icon-size: $base_icon_size; }
   }
 
   // body
@@ -149,13 +149,13 @@
     color: $fg_color;
   }
 
-  &:active { 
+  &:active {
     background-color: lighten($active_bg_color, 5%);
     color: $fg_color;
   }
 
   &:insensitive { color: lighten($insensitive_fg_color, 5%); }
-  
+
   // fix margin for last button
   &:last-child:ltr { margin-right: $base_margin*3; }
   &:last-child:rtl { margin-left: $base_margin*3; }
diff --git a/data/theme/gnome-shell-sass/widgets/_misc.scss b/data/theme/gnome-shell-sass/widgets/_misc.scss
index 740927824c..2cbf1b728c 100644
--- a/data/theme/gnome-shell-sass/widgets/_misc.scss
+++ b/data/theme/gnome-shell-sass/widgets/_misc.scss
@@ -42,7 +42,7 @@
 
 
 // Hidden
-.hidden { color: rgba(0,0,0,0);}
+.hidden { color: transparent;}
 
 // Caps-lock warning
 .caps-lock-warning-label {
diff --git a/data/theme/gnome-shell-sass/widgets/_quick-settings.scss 
b/data/theme/gnome-shell-sass/widgets/_quick-settings.scss
index b429a2dc50..c94ac48b77 100644
--- a/data/theme/gnome-shell-sass/widgets/_quick-settings.scss
+++ b/data/theme/gnome-shell-sass/widgets/_quick-settings.scss
@@ -81,9 +81,12 @@
       icon-size: $base_icon_size*1.5; // a non-standard symbolic size but ok
       border-radius: 999px;
       padding: 1.5 * $base_padding;
-      background-color: lighten($bg_color, 10%);
+      background-color: transparentize($fg_color, 0.9);
 
-      &.active { background-color: $selected_bg_color; }
+      &.active { 
+        background-color: $selected_bg_color;
+        color: $selected_fg_color;
+      }
     }
 
     & .title {
diff --git a/data/theme/gnome-shell-sass/widgets/_screenshot.scss 
b/data/theme/gnome-shell-sass/widgets/_screenshot.scss
index 150f273b42..fc735b0f38 100644
--- a/data/theme/gnome-shell-sass/widgets/_screenshot.scss
+++ b/data/theme/gnome-shell-sass/widgets/_screenshot.scss
@@ -129,7 +129,7 @@ $screenshot_ui_button_red: $error_color;
 .screenshot-ui-area-selector-handle {
   border-radius: 99px;
   background-color: white;
-  box-shadow: 0 1px 3px 2px rgba(0,0,0,0.2);
+  box-shadow: 0 1px 3px 2px $shadow_color;
   width: 24px;
   height: 24px;
 }
diff --git a/data/theme/gnome-shell-sass/widgets/_slider.scss 
b/data/theme/gnome-shell-sass/widgets/_slider.scss
index 500249aa52..40ac34652a 100644
--- a/data/theme/gnome-shell-sass/widgets/_slider.scss
+++ b/data/theme/gnome-shell-sass/widgets/_slider.scss
@@ -5,7 +5,7 @@ $slider_size: 16px;
 .slider {
   // slider trough
   -barlevel-height: 4px;
-  -barlevel-background-color: if($variant == 'light', transparentize($fg_color, 0.6), 
transparentize($fg_color, 0.8)); //background of the trough
+  -barlevel-background-color: transparentize($fg_color, 0.8); //background of the trough
   -barlevel-border-width: 2px; 
   -barlevel-border-color: transparent; // trough border color
   // fill style
diff --git a/data/theme/gnome-shell-sass/widgets/_switcher-popup.scss 
b/data/theme/gnome-shell-sass/widgets/_switcher-popup.scss
index cec6c9aab8..1c9eff0d67 100644
--- a/data/theme/gnome-shell-sass/widgets/_switcher-popup.scss
+++ b/data/theme/gnome-shell-sass/widgets/_switcher-popup.scss
@@ -13,10 +13,10 @@ $switcher_border_radius: $modal_radius + 8px;
 
 // switcher onscreen panel
 .switcher-list {
-  @extend %osd_panel;
+  @extend %bubble_panel;
   padding: $switcher_padding;
   border-radius: $switcher_border_radius;
-  box-shadow: 0 8px 8px 0 rgba(0,0,0,0.1);
+  box-shadow: 0 8px 8px 0 $shadow_color;
 
   // container for items in list
   .switcher-list-item-container {
@@ -25,7 +25,7 @@ $switcher_border_radius: $modal_radius + 8px;
 
   // each item in the list
   .item-box {
-    @include tile_button($osd_fg_color);
+    @include tile_button($fg_color);
     // override over style so mouse doesn't steal focus
     &:hover {background: none;}
   }


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