[gnome-themes-standard/wip/sass] rtl fixes - flipped linking logic for buttons in rtl - rewrote the combobox entry section using



commit feda23bc4fbe3671f2c5f5530fe8598cbf3b6b1f
Author: Lapo Calamandrei <calamandrei gmail com>
Date:   Tue Jun 3 21:13:04 2014 +0200

    rtl fixes
      - flipped linking logic for buttons in rtl
      - rewrote the combobox entry section using dir(rtl)

 themes/Adwaita/gtk-3.0/_common.scss           |   32 ++++++++++++++++--------
 themes/Adwaita/gtk-3.0/gtk-contained-dark.css |   32 +++++++++++++++++-------
 themes/Adwaita/gtk-3.0/gtk-contained.css      |   32 +++++++++++++++++-------
 3 files changed, 65 insertions(+), 31 deletions(-)
---
diff --git a/themes/Adwaita/gtk-3.0/_common.scss b/themes/Adwaita/gtk-3.0/_common.scss
index 2a73c4e..801d6b7 100644
--- a/themes/Adwaita/gtk-3.0/_common.scss
+++ b/themes/Adwaita/gtk-3.0/_common.scss
@@ -169,11 +169,13 @@
     &:first-child {
       border-top-right-radius: 0;
       border-bottom-right-radius: 0;
+      &:dir(rtl) { border-right-style: none;}
     }
     &:last-child {
       border-top-left-radius: 0;
       border-bottom-left-radius: 0;
       border-left-style: none;
+      &:dir(rtl) { border-left-style: solid; }
     }
   }
 }
@@ -244,16 +246,21 @@
   .linked &, .linked &:backdrop {
     border-radius: 0;
     border-left-style: none;
+    &:dir(rtl) {
+      border-right-style: none;
+      border-left-style: solid
+    };
     &:first-child {
       border-radius: 3px 0 0 3px;
       border-left-style: solid;
     }
     &:last-child {
       border-radius: 0 3px 3px 0;
+      &:dir(rtl) { border-right-style: solid; }
     }
     &:only-child {
       border-radius: 3px;
-      border-left-style: solid;
+      border-style: solid;
     }
   }
 
@@ -329,8 +336,9 @@ GtkColorButton.button { padding: 4px; } // Uniform padding on the GtkColorButton
       border-color: transparentize($backdrop_borders_color,0.7);
     }
     &:backdrop:insensitive {
-      border-width: 0 0 0 1px;
       color: transparentize($backdrop_insensitive_color,0.7);
+      border-width: 0 0 0 1px; // It is needed or it gets overridden
+      &:dir(rtl) { border-width: 0 1px 0 0; }
     }
   }
   &.vertical {
@@ -425,19 +433,21 @@ GtkComboBox {
     -GtkWidget-horizontal-separator: 0;
     -GtkWidget-vertical-separator: 0;
   }
-  &.combobox-entry .entry:first-child {
-    border-radius: 3px 0 0 3px;
-  }
-  &.combobox-entry .button:first-child {
+  &.combobox-entry .entry {
     border-radius: 3px 0 0 3px;
+    &:dir(rtl) {
+      border-radius: 0 3px 3px 0;
+    }
   }
-  &.combobox-entry .entry:last-child {
-    border-radius: 0 3px 3px 0;
-    border-left-style: none;
-  }
-  &.combobox-entry .button:last-child {
+  &.combobox-entry .button, &.combobox-entry .button:backdrop {
+    // It is needed to specify the backdrop button or it gets overridden
     border-radius: 0 3px 3px 0;
     border-left-style: none;
+    &:dir(rtl) {
+      border-radius: 3px 0 0 3px;
+      border-left-style: solid;
+      border-right-style: none;
+    }
   }
 }
 
diff --git a/themes/Adwaita/gtk-3.0/gtk-contained-dark.css b/themes/Adwaita/gtk-3.0/gtk-contained-dark.css
index 5c9d6a9..04616d5 100644
--- a/themes/Adwaita/gtk-3.0/gtk-contained-dark.css
+++ b/themes/Adwaita/gtk-3.0/gtk-contained-dark.css
@@ -151,10 +151,14 @@
   .linked .entry:first-child {
     border-top-right-radius: 0;
     border-bottom-right-radius: 0; }
+    .linked .entry:first-child:dir(rtl) {
+      border-right-style: none; }
   .linked .entry:last-child {
     border-top-left-radius: 0;
     border-bottom-left-radius: 0;
     border-left-style: none; }
+    .linked .entry:last-child:dir(rtl) {
+      border-left-style: solid; }
 
 /***********
  * Buttons *
@@ -339,14 +343,19 @@
   .linked .button, .linked .button:backdrop {
     border-radius: 0;
     border-left-style: none; }
+    .linked .button:dir(rtl), .linked .button:backdrop:dir(rtl) {
+      border-right-style: none;
+      border-left-style: solid; }
     .linked .button:first-child, .linked .button:backdrop:first-child {
       border-radius: 3px 0 0 3px;
       border-left-style: solid; }
     .linked .button:last-child, .linked .button:backdrop:last-child {
       border-radius: 0 3px 3px 0; }
+      .linked .button:last-child:dir(rtl), .linked .button:backdrop:last-child:dir(rtl) {
+        border-right-style: solid; }
     .linked .button:only-child, .linked .button:backdrop:only-child {
       border-radius: 3px;
-      border-left-style: solid; }
+      border-style: solid; }
   .header-bar .button.text-button {
     padding: 6px 8px 5px; }
   .header-bar .button.image-button {
@@ -393,8 +402,10 @@ GtkColorButton.button {
   .spinbutton .button:backdrop {
     border-color: rgba(28, 31, 31, 0.3); }
   .spinbutton .button:backdrop:insensitive {
-    border-width: 0 0 0 1px;
-    color: rgba(160, 163, 162, 0.3); }
+    color: rgba(160, 163, 162, 0.3);
+    border-width: 0 0 0 1px; }
+    .spinbutton .button:backdrop:insensitive:dir(rtl) {
+      border-width: 0 1px 0 0; }
 .spinbutton.vertical .button:first-child {
   border-width: 1px;
   border-style: solid;
@@ -517,16 +528,17 @@ GtkComboBox {
     -GtkWidget-wide-separators: true;
     -GtkWidget-horizontal-separator: 0;
     -GtkWidget-vertical-separator: 0; }
-  GtkComboBox.combobox-entry .entry:first-child {
-    border-radius: 3px 0 0 3px; }
-  GtkComboBox.combobox-entry .button:first-child {
+  GtkComboBox.combobox-entry .entry {
     border-radius: 3px 0 0 3px; }
-  GtkComboBox.combobox-entry .entry:last-child {
-    border-radius: 0 3px 3px 0;
-    border-left-style: none; }
-  GtkComboBox.combobox-entry .button:last-child {
+    GtkComboBox.combobox-entry .entry:dir(rtl) {
+      border-radius: 0 3px 3px 0; }
+  GtkComboBox.combobox-entry .button, GtkComboBox.combobox-entry .button:backdrop {
     border-radius: 0 3px 3px 0;
     border-left-style: none; }
+    GtkComboBox.combobox-entry .button:dir(rtl), GtkComboBox.combobox-entry .button:backdrop:dir(rtl) {
+      border-radius: 3px 0 0 3px;
+      border-left-style: solid;
+      border-right-style: none; }
 
 /************
  * Toolbars *
diff --git a/themes/Adwaita/gtk-3.0/gtk-contained.css b/themes/Adwaita/gtk-3.0/gtk-contained.css
index 94fc7c0..ff39da5 100644
--- a/themes/Adwaita/gtk-3.0/gtk-contained.css
+++ b/themes/Adwaita/gtk-3.0/gtk-contained.css
@@ -151,10 +151,14 @@
   .linked .entry:first-child {
     border-top-right-radius: 0;
     border-bottom-right-radius: 0; }
+    .linked .entry:first-child:dir(rtl) {
+      border-right-style: none; }
   .linked .entry:last-child {
     border-top-left-radius: 0;
     border-bottom-left-radius: 0;
     border-left-style: none; }
+    .linked .entry:last-child:dir(rtl) {
+      border-left-style: solid; }
 
 /***********
  * Buttons *
@@ -339,14 +343,19 @@
   .linked .button, .linked .button:backdrop {
     border-radius: 0;
     border-left-style: none; }
+    .linked .button:dir(rtl), .linked .button:backdrop:dir(rtl) {
+      border-right-style: none;
+      border-left-style: solid; }
     .linked .button:first-child, .linked .button:backdrop:first-child {
       border-radius: 3px 0 0 3px;
       border-left-style: solid; }
     .linked .button:last-child, .linked .button:backdrop:last-child {
       border-radius: 0 3px 3px 0; }
+      .linked .button:last-child:dir(rtl), .linked .button:backdrop:last-child:dir(rtl) {
+        border-right-style: solid; }
     .linked .button:only-child, .linked .button:backdrop:only-child {
       border-radius: 3px;
-      border-left-style: solid; }
+      border-style: solid; }
   .header-bar .button.text-button {
     padding: 6px 8px 5px; }
   .header-bar .button.image-button {
@@ -393,8 +402,10 @@ GtkColorButton.button {
   .spinbutton .button:backdrop {
     border-color: rgba(161, 161, 161, 0.3); }
   .spinbutton .button:backdrop:insensitive {
-    border-width: 0 0 0 1px;
-    color: rgba(199, 199, 199, 0.3); }
+    color: rgba(199, 199, 199, 0.3);
+    border-width: 0 0 0 1px; }
+    .spinbutton .button:backdrop:insensitive:dir(rtl) {
+      border-width: 0 1px 0 0; }
 .spinbutton.vertical .button:first-child {
   border-width: 1px;
   border-style: solid;
@@ -517,16 +528,17 @@ GtkComboBox {
     -GtkWidget-wide-separators: true;
     -GtkWidget-horizontal-separator: 0;
     -GtkWidget-vertical-separator: 0; }
-  GtkComboBox.combobox-entry .entry:first-child {
-    border-radius: 3px 0 0 3px; }
-  GtkComboBox.combobox-entry .button:first-child {
+  GtkComboBox.combobox-entry .entry {
     border-radius: 3px 0 0 3px; }
-  GtkComboBox.combobox-entry .entry:last-child {
-    border-radius: 0 3px 3px 0;
-    border-left-style: none; }
-  GtkComboBox.combobox-entry .button:last-child {
+    GtkComboBox.combobox-entry .entry:dir(rtl) {
+      border-radius: 0 3px 3px 0; }
+  GtkComboBox.combobox-entry .button, GtkComboBox.combobox-entry .button:backdrop {
     border-radius: 0 3px 3px 0;
     border-left-style: none; }
+    GtkComboBox.combobox-entry .button:dir(rtl), GtkComboBox.combobox-entry .button:backdrop:dir(rtl) {
+      border-radius: 3px 0 0 3px;
+      border-left-style: solid;
+      border-right-style: none; }
 
 /************
  * Toolbars *


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