Bug 547492 - Use correct resize cursor for collapsed splitters (also make grippy arrows rtl-friendly). r=dao.
authorstefanh@inbox.com
Mon, 19 Apr 2010 21:21:30 +0200
changeset 40999 f8455e7935f527b4a5302ddcd0e01f1eda97494f
parent 40998 849ca7a905f941ed08358d1ae70cee83ac2f5bb4
child 41000 06d46390acb03583c65875e2f4e141af5675a07b
push id1
push usershaver@mozilla.com
push dateTue, 04 Jan 2011 17:58:04 +0000
reviewersdao
bugs547492
milestone1.9.3a5pre
Bug 547492 - Use correct resize cursor for collapsed splitters (also make grippy arrows rtl-friendly). r=dao.
toolkit/themes/gnomestripe/global/splitter.css
toolkit/themes/pinstripe/global/jar.mn
toolkit/themes/pinstripe/global/splitter.css
toolkit/themes/pinstripe/global/splitter/grip-bottom.gif
toolkit/themes/pinstripe/global/splitter/grip-hrz-after.gif
toolkit/themes/pinstripe/global/splitter/grip-hrz-before.gif
toolkit/themes/pinstripe/global/splitter/grip-left.gif
toolkit/themes/pinstripe/global/splitter/grip-right.gif
toolkit/themes/pinstripe/global/splitter/grip-top.gif
toolkit/themes/pinstripe/global/splitter/grip-vrt-after.gif
toolkit/themes/pinstripe/global/splitter/grip-vrt-before.gif
toolkit/themes/winstripe/global/splitter.css
toolkit/themes/winstripe/global/splitter/grip-bottom.gif
toolkit/themes/winstripe/global/splitter/grip-hrz-after.gif
toolkit/themes/winstripe/global/splitter/grip-hrz-before.gif
toolkit/themes/winstripe/global/splitter/grip-left.gif
toolkit/themes/winstripe/global/splitter/grip-right.gif
toolkit/themes/winstripe/global/splitter/grip-top.gif
toolkit/themes/winstripe/global/splitter/grip-vrt-after.gif
toolkit/themes/winstripe/global/splitter/grip-vrt-before.gif
--- a/toolkit/themes/gnomestripe/global/splitter.css
+++ b/toolkit/themes/gnomestripe/global/splitter.css
@@ -47,22 +47,46 @@
 splitter {
   -moz-appearance: splitter;
   -moz-box-align: center;
   -moz-box-pack: center;
   cursor: ew-resize;
 
 }
 
+splitter[state="collapsed"][collapse="before"],
+splitter[state="collapsed"][substate="before"],
+splitter[state="collapsed"][collapse="after"]:-moz-locale-dir(rtl),
+splitter[state="collapsed"][substate="after"]:-moz-locale-dir(rtl) {
+  cursor: e-resize;
+}
+
+splitter[state="collapsed"][collapse="after"],
+splitter[state="collapsed"][substate="after"],
+splitter[state="collapsed"][collapse="before"]:-moz-locale-dir(rtl),
+splitter[state="collapsed"][substate="before"]:-moz-locale-dir(rtl) {
+  cursor: w-resize;
+}
+
 /* ::::: splitter (horizontal) ::::: */
 
 splitter[orient="vertical"] {
   cursor: ns-resize;
 }
 
+splitter[orient="vertical"][state="collapsed"][collapse="before"],
+splitter[orient="vertical"][state="collapsed"][substate="before"] {
+  cursor: s-resize;
+}
+
+splitter[orient="vertical"][state="collapsed"][collapse="after"],
+splitter[orient="vertical"][state="collapsed"][substate="after"] {
+  cursor: n-resize;
+}
+
 /* ::::: splitter grippy ::::: */
 
 grippy {
   cursor: pointer;
   min-width: 4px;
   min-height: 115px;
 }
 
--- a/toolkit/themes/pinstripe/global/jar.mn
+++ b/toolkit/themes/pinstripe/global/jar.mn
@@ -131,19 +131,19 @@ toolkit.jar:
   skin/classic/global/media/error.png                                (media/error.png)
   skin/classic/global/media/throbber.png                             (media/throbber.png)
   skin/classic/global/media/volumeThumb.png                          (media/volumeThumb.png)
   skin/classic/global/menu/menu-arrow.png                            (menu/menu-arrow.png)
   skin/classic/global/menu/menu-check.png                            (menu/menu-check.png)
   skin/classic/global/scale/scale-tray-horiz.gif                     (scale/scale-tray-horiz.gif)
   skin/classic/global/scale/scale-tray-vert.gif                      (scale/scale-tray-vert.gif)
   skin/classic/global/splitter/dimple.png                            (splitter/dimple.png)
-  skin/classic/global/splitter/grip-hrz-after.gif                    (splitter/grip-hrz-after.gif)
-  skin/classic/global/splitter/grip-hrz-before.gif                   (splitter/grip-hrz-before.gif)
-  skin/classic/global/splitter/grip-vrt-after.gif                    (splitter/grip-vrt-after.gif)
-  skin/classic/global/splitter/grip-vrt-before.gif                   (splitter/grip-vrt-before.gif)
+  skin/classic/global/splitter/grip-bottom.gif                       (splitter/grip-bottom.gif)
+  skin/classic/global/splitter/grip-top.gif                          (splitter/grip-top.gif)
+  skin/classic/global/splitter/grip-left.gif                         (splitter/grip-left.gif)
+  skin/classic/global/splitter/grip-right.gif                        (splitter/grip-right.gif)
   skin/classic/global/toolbar/spring.png                             (toolbar/spring.png)
   skin/classic/global/toolbar/toolbar-separator.png                  (toolbar/toolbar-separator.png)
   skin/classic/global/tree/columnpicker.gif                          (tree/columnpicker.gif)
   skin/classic/global/tree/folder.png                                (tree/folder.png)
   skin/classic/global/tree/item.png                                  (tree/item.png)
   skin/classic/global/tree/sort-asc.gif                              (tree/sort-asc.gif)
   skin/classic/global/tree/sort-dsc.gif                              (tree/sort-dsc.gif)
--- a/toolkit/themes/pinstripe/global/splitter.css
+++ b/toolkit/themes/pinstripe/global/splitter.css
@@ -44,30 +44,54 @@ splitter {
   -moz-box-align: center;
   -moz-box-pack: center;
   cursor: ew-resize;
   min-width: 9px;
   min-height: 9px;
   background: url("chrome://global/skin/splitter/dimple.png") transparent no-repeat center;  
 }
 
+splitter[state="collapsed"][collapse="before"],
+splitter[state="collapsed"][substate="before"],
+splitter[state="collapsed"][collapse="after"]:-moz-locale-dir(rtl),
+splitter[state="collapsed"][substate="after"]:-moz-locale-dir(rtl) {
+  cursor: e-resize;
+}
+
+splitter[state="collapsed"][collapse="after"],
+splitter[state="collapsed"][substate="after"],
+splitter[state="collapsed"][collapse="before"]:-moz-locale-dir(rtl),
+splitter[state="collapsed"][substate="before"]:-moz-locale-dir(rtl) {
+  cursor: w-resize;
+}
+
 splitter:-moz-lwtheme {
   background: none;
 }
 
 /* ::::: splitter (horizontal) ::::: */
 
 splitter[orient="vertical"] {
   cursor: ns-resize;
   min-width: 0px;
   min-height: 9px;
   min-width: 9px;  
   background: url("chrome://global/skin/splitter/dimple.png") transparent no-repeat center;
 }
 
+splitter[orient="vertical"][state="collapsed"][collapse="before"],
+splitter[orient="vertical"][state="collapsed"][substate="before"] {
+  cursor: s-resize;
+}
+
+splitter[orient="vertical"][state="collapsed"][collapse="after"],
+splitter[orient="vertical"][state="collapsed"][substate="after"] {
+  cursor: n-resize;
+}
+
 /* ::::: splitter grippy ::::: */
   
 grippy {
   cursor: pointer;
   margin: 0px 1px;
   min-width: 4px;
   min-height: 115px;
   background-color: transparent;
@@ -82,45 +106,49 @@ splitter[orient="vertical"] > grippy {
   margin: 1px 0px;
   min-width: 115px;
   min-height: 4px;
 }
 
 /* ..... normal state ..... */
 
 /* vertical grippies */
-splitter[collapse="before"] > grippy {
-  background-image: url("chrome://global/skin/splitter/grip-vrt-before.gif");
+splitter[collapse="before"] > grippy,
+splitter[collapse="after"] > grippy:-moz-locale-dir(rtl) {
+  background-image: url("chrome://global/skin/splitter/grip-left.gif");
 }
 
-splitter[collapse="after"] > grippy {
-  background-image: url("chrome://global/skin/splitter/grip-vrt-after.gif");
+splitter[collapse="after"] > grippy,
+splitter[collapse="before"] > grippy:-moz-locale-dir(rtl) {
+  background-image: url("chrome://global/skin/splitter/grip-right.gif");
 }
 
 /* horizontal grippies */
 splitter[collapse="before"][orient="vertical"] > grippy {
-  background-image: url("chrome://global/skin/splitter/grip-hrz-before.gif");
+  background-image: url("chrome://global/skin/splitter/grip-top.gif");
 }
 
 splitter[collapse="after"][orient="vertical"] > grippy {
-  background-image: url("chrome://global/skin/splitter/grip-hrz-after.gif");
+  background-image: url("chrome://global/skin/splitter/grip-bottom.gif");
 }
 
 /* ..... collapsed state ..... */
 
 /* vertical grippies */
-splitter[collapse="before"][state="collapsed"] > grippy {
-  background-image: url("chrome://global/skin/splitter/grip-vrt-after.gif");
+splitter[collapse="before"][state="collapsed"] > grippy,
+splitter[collapse="after"][state="collapsed"] > grippy:-moz-locale-dir(rtl) {
+  background-image: url("chrome://global/skin/splitter/grip-right.gif");
 }
 
-splitter[collapse="after"][state="collapsed"] > grippy {
-  background-image: url("chrome://global/skin/splitter/grip-vrt-before.gif");
+splitter[collapse="after"][state="collapsed"] > grippy,
+splitter[collapse="before"][state="collapsed"] > grippy:-moz-locale-dir(rtl) {
+  background-image: url("chrome://global/skin/splitter/grip-left.gif");
 }
 
 /* horizontal grippies */
 splitter[collapse="before"][state="collapsed"][orient="vertical"] > grippy {
-  background-image: url("chrome://global/skin/splitter/grip-hrz-after.gif");
+  background-image: url("chrome://global/skin/splitter/grip-bottom.gif");
 }
 
 splitter[collapse="after"][state="collapsed"][orient="vertical"] > grippy {
-  background-image: url("chrome://global/skin/splitter/grip-hrz-before.gif");
+  background-image: url("chrome://global/skin/splitter/grip-top.gif");
 }
 
rename from toolkit/themes/pinstripe/global/splitter/grip-hrz-after.gif
rename to toolkit/themes/pinstripe/global/splitter/grip-bottom.gif
rename from toolkit/themes/pinstripe/global/splitter/grip-vrt-before.gif
rename to toolkit/themes/pinstripe/global/splitter/grip-left.gif
rename from toolkit/themes/pinstripe/global/splitter/grip-vrt-after.gif
rename to toolkit/themes/pinstripe/global/splitter/grip-right.gif
rename from toolkit/themes/pinstripe/global/splitter/grip-hrz-before.gif
rename to toolkit/themes/pinstripe/global/splitter/grip-top.gif
--- a/toolkit/themes/winstripe/global/splitter.css
+++ b/toolkit/themes/winstripe/global/splitter.css
@@ -51,30 +51,54 @@ splitter {
   border-width: 0 2px;
   border-style: solid;
   -moz-border-left-colors: ThreeDShadow ThreeDHighlight;
   -moz-border-right-colors: ThreeDDarkShadow ThreeDFace;
   min-width: 6px;
   background-color: ThreeDFace;
 }
 
+splitter[state="collapsed"][collapse="before"],
+splitter[state="collapsed"][substate="before"],
+splitter[state="collapsed"][collapse="after"]:-moz-locale-dir(rtl),
+splitter[state="collapsed"][substate="after"]:-moz-locale-dir(rtl) {
+  cursor: e-resize;
+}
+
+splitter[state="collapsed"][collapse="after"],
+splitter[state="collapsed"][substate="after"],
+splitter[state="collapsed"][collapse="before"]:-moz-locale-dir(rtl),
+splitter[state="collapsed"][substate="before"]:-moz-locale-dir(rtl) {
+  cursor: w-resize;
+}
+
 splitter:-moz-lwtheme {
   background: none;
 }
 
 /* ::::: splitter (horizontal) ::::: */
 
 splitter[orient="vertical"] {
   cursor: ns-resize;
   border-width: 2px 0;
   -moz-border-top-colors: ThreeDShadow ThreeDHighlight;
   -moz-border-bottom-colors: ThreeDDarkShadow ThreeDFace;
   min-height: 6px;
 }
 
+splitter[orient="vertical"][state="collapsed"][collapse="before"],
+splitter[orient="vertical"][state="collapsed"][substate="before"] {
+  cursor: s-resize;
+}
+
+splitter[orient="vertical"][state="collapsed"][collapse="after"],
+splitter[orient="vertical"][state="collapsed"][substate="after"] {
+  cursor: n-resize;
+}
+
 /* ::::: splitter grippy ::::: */
 
 grippy {
   cursor: pointer;
   border-top: 1px solid ThreeDShadow;
   border-bottom: 1px solid ThreeDShadow;
   min-width: 4px;
   min-height: 115px;
@@ -93,45 +117,49 @@ splitter[orient="vertical"] > grippy {
   border-left: 1px solid ThreeDShadow;;
   min-width: 115px;
   min-height: 4px;
 }
   
 /* ..... normal state ..... */
 
 /* vertical grippies */
-splitter[collapse="before"] > grippy {
+splitter[collapse="before"] > grippy,
+splitter[collapse="after"] > grippy:-moz-locale-dir(rtl) {
   background-image: url("chrome://global/skin/splitter/grip-vrt-before.gif");
 }
 
-splitter[collapse="after"] > grippy {
-  background-image: url("chrome://global/skin/splitter/grip-vrt-after.gif");
+splitter[collapse="after"] > grippy,
+splitter[collapse="before"] > grippy:-moz-locale-dir(rtl) {
+  background-image: url("chrome://global/skin/splitter/grip-right.gif");
 }
 
 /* horizontal grippies */
 splitter[collapse="before"][orient="vertical"] > grippy {
-  background-image: url("chrome://global/skin/splitter/grip-hrz-before.gif");
+  background-image: url("chrome://global/skin/splitter/grip-top.gif");
 }  
 
 splitter[collapse="after"][orient="vertical"] > grippy {
-  background-image: url("chrome://global/skin/splitter/grip-hrz-after.gif");
+  background-image: url("chrome://global/skin/splitter/grip-bottom.gif");
 }  
   
 /* ..... collapsed state ..... */
 
 /* vertical grippies */
-splitter[collapse="before"][state="collapsed"] > grippy {
-  background-image: url("chrome://global/skin/splitter/grip-vrt-after.gif");
+splitter[collapse="before"][state="collapsed"] > grippy,
+splitter[collapse="after"][state="collapsed"] > grippy:-moz-locale-dir(rtl) {
+  background-image: url("chrome://global/skin/splitter/grip-right.gif");
 }
 
-splitter[collapse="after"][state="collapsed"] > grippy {
+splitter[collapse="after"][state="collapsed"] > grippy,
+splitter[collapse="before"][state="collapsed"] > grippy:-moz-locale-dir(rtl) {
   background-image: url("chrome://global/skin/splitter/grip-vrt-before.gif");
 }
 
 /* horizontal grippies */
 splitter[collapse="before"][state="collapsed"][orient="vertical"] > grippy {
-  background-image: url("chrome://global/skin/splitter/grip-hrz-after.gif");
+  background-image: url("chrome://global/skin/splitter/grip-bottom.gif");
 }  
 
 splitter[collapse="after"][state="collapsed"][orient="vertical"] > grippy {
-  background-image: url("chrome://global/skin/splitter/grip-hrz-before.gif");
+  background-image: url("chrome://global/skin/splitter/grip-top.gif");
 }  
 
rename from toolkit/themes/winstripe/global/splitter/grip-hrz-after.gif
rename to toolkit/themes/winstripe/global/splitter/grip-bottom.gif
rename from toolkit/themes/winstripe/global/splitter/grip-vrt-before.gif
rename to toolkit/themes/winstripe/global/splitter/grip-left.gif
rename from toolkit/themes/winstripe/global/splitter/grip-vrt-after.gif
rename to toolkit/themes/winstripe/global/splitter/grip-right.gif
rename from toolkit/themes/winstripe/global/splitter/grip-hrz-before.gif
rename to toolkit/themes/winstripe/global/splitter/grip-top.gif