[gnome-shell/wip/snwh/rtl-fixes] theme: Fixes for oversights in :rtl




commit d9c0d667432aa0ffb9ac4c7a8631e3938f375db5
Author: Sam Hewitt <sam snwh org>
Date:   Wed Feb 23 14:15:59 2022 -0330

    theme: Fixes for oversights in :rtl

 data/theme/gnome-shell-sass/_common.scss           |  7 +++++--
 .../gnome-shell-sass/widgets/_message-list.scss    |  6 ++----
 data/theme/gnome-shell-sass/widgets/_popovers.scss | 22 +++++++++++++++++-----
 3 files changed, 24 insertions(+), 11 deletions(-)
---
diff --git a/data/theme/gnome-shell-sass/_common.scss b/data/theme/gnome-shell-sass/_common.scss
index f86de2053c..90c871e6b5 100644
--- a/data/theme/gnome-shell-sass/_common.scss
+++ b/data/theme/gnome-shell-sass/_common.scss
@@ -122,7 +122,9 @@ $bubble_buttons_color: if($variant == 'light', darken($bg_color, 12%), lighten($
 %bubble_button {
   padding: $base_padding * 2;
   font-weight: bold !important;
-  margin-right: 1px;
+
+  &:ltr {margin-right: 1px;}
+  &:rtl {margin-left: 1px;}
 
   @include button(normal, $c:$bubble_buttons_color);
   &:insensitive { @include button(insensitive, $c:$bubble_buttons_color);}
@@ -146,11 +148,12 @@ $bubble_buttons_color: if($variant == 'light', darken($bg_color, 12%), lighten($
 
   &:last-child:rtl {
     border-radius: 0 0 0 $bubble_button_radius;
-    margin-right: 0 !important;
+    margin-left: 0 !important;
   }
 
   &:first-child:last-child {
     border-radius: 0 0 $bubble_button_radius $bubble_button_radius !important;
+    margin-left: 0 !important;
     margin-right: 0 !important;
   }
 }
diff --git a/data/theme/gnome-shell-sass/widgets/_message-list.scss 
b/data/theme/gnome-shell-sass/widgets/_message-list.scss
index ac2e8efe2f..0ac7a7fff6 100644
--- a/data/theme/gnome-shell-sass/widgets/_message-list.scss
+++ b/data/theme/gnome-shell-sass/widgets/_message-list.scss
@@ -67,11 +67,9 @@
   // icon container
   .message-icon-bin {
     padding: ($base_padding * 3);
-    padding-right:$base_padding;
 
-    &:rtl {
-      padding-right:$base_padding;
-    }
+    &:ltr {padding-right:$base_padding;}
+    &:rtl {padding-left:$base_padding;}
 
     // icon size and color
     > StIcon {
diff --git a/data/theme/gnome-shell-sass/widgets/_popovers.scss 
b/data/theme/gnome-shell-sass/widgets/_popovers.scss
index fd5a02d4cb..3f25dce08a 100644
--- a/data/theme/gnome-shell-sass/widgets/_popovers.scss
+++ b/data/theme/gnome-shell-sass/widgets/_popovers.scss
@@ -31,9 +31,13 @@
 .popup-menu-item {
   padding: $base_padding*1.5 $base_padding*2;
   border-radius: $base_border_radius;
+  spacing: $base_padding;
   transition: 0.2s all ease;
   background-color: transparent;
 
+  &:ltr {padding-left: $base_padding;}
+  &:rtl {padding-right: $base_padding;}
+
   &:focus, &:hover {
    background-color: $hover_bg_color !important;
    &:active { background-color: $active_bg_color !important;}
@@ -55,6 +59,12 @@
   }
 
   &:insensitive {color: transparentize($fg_color,0.5);}
+
+  // add margin to switches in menu items
+  .toggle-switch {
+    &:ltr {margin-left: $base_margin;}
+    &:rtl {margin-right: $base_margin;}
+  }
 }
 
 
@@ -71,8 +81,6 @@
 }
 
 .popup-menu-arrow {
-  &:ltr {margin-right: $base_margin;}
-  &:rtl {margin-left: $base_margin;}
 }
 
 
@@ -124,8 +132,10 @@
 
 // separator
 .popup-separator-menu-item {
-  padding:0;
   margin: 6px 0;
+  padding:0 !important;
+  &:ltr {margin-right: $base_margin;}
+  &:rtl {margin-left: $base_margin;}
 
   .popup-separator-menu-item-separator {
     height: 1px; //not really the whole box
@@ -137,10 +147,12 @@
   }
 
   .popup-sub-menu & {
-    padding: 0;
-    margin-right: 2.5em !important; // account for ornament
     background-color: transparent;
 
+    // account for ornament
+    &:ltr {margin-right: 2.5em;}
+    &:rtl {margin-left: 2.5em;}
+
     .popup-separator-menu-item-separator {
       background-color: lighten($borders_color, 7%);
     }


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