From 57d64dec1e3e0e85754e53ad18f94a793509a3ae Mon Sep 17 00:00:00 2001 From: "stefanh@inbox.com" Date: Mon, 19 Apr 2010 21:21:30 +0200 Subject: [PATCH] Bug 547492 - Use correct resize cursor for collapsed splitters (also make grippy arrows rtl-friendly). r=dao. --HG-- rename : toolkit/themes/pinstripe/global/splitter/grip-hrz-after.gif => toolkit/themes/pinstripe/global/splitter/grip-bottom.gif rename : toolkit/themes/pinstripe/global/splitter/grip-vrt-before.gif => toolkit/themes/pinstripe/global/splitter/grip-left.gif rename : toolkit/themes/pinstripe/global/splitter/grip-vrt-after.gif => toolkit/themes/pinstripe/global/splitter/grip-right.gif rename : toolkit/themes/pinstripe/global/splitter/grip-hrz-before.gif => toolkit/themes/pinstripe/global/splitter/grip-top.gif rename : toolkit/themes/winstripe/global/splitter/grip-hrz-after.gif => toolkit/themes/winstripe/global/splitter/grip-bottom.gif rename : toolkit/themes/winstripe/global/splitter/grip-vrt-before.gif => toolkit/themes/winstripe/global/splitter/grip-left.gif rename : toolkit/themes/winstripe/global/splitter/grip-vrt-after.gif => toolkit/themes/winstripe/global/splitter/grip-right.gif rename : toolkit/themes/winstripe/global/splitter/grip-hrz-before.gif => toolkit/themes/winstripe/global/splitter/grip-top.gif --- .../themes/gnomestripe/global/splitter.css | 24 ++++++++ toolkit/themes/pinstripe/global/jar.mn | 8 +-- toolkit/themes/pinstripe/global/splitter.css | 52 ++++++++++++++---- .../{grip-hrz-after.gif => grip-bottom.gif} | Bin .../{grip-vrt-before.gif => grip-left.gif} | Bin .../{grip-vrt-after.gif => grip-right.gif} | Bin .../{grip-hrz-before.gif => grip-top.gif} | Bin toolkit/themes/winstripe/global/splitter.css | 48 ++++++++++++---- .../{grip-hrz-after.gif => grip-bottom.gif} | Bin .../{grip-vrt-before.gif => grip-left.gif} | Bin .../{grip-vrt-after.gif => grip-right.gif} | Bin .../{grip-hrz-before.gif => grip-top.gif} | Bin 12 files changed, 106 insertions(+), 26 deletions(-) rename toolkit/themes/pinstripe/global/splitter/{grip-hrz-after.gif => grip-bottom.gif} (100%) rename toolkit/themes/pinstripe/global/splitter/{grip-vrt-before.gif => grip-left.gif} (100%) rename toolkit/themes/pinstripe/global/splitter/{grip-vrt-after.gif => grip-right.gif} (100%) rename toolkit/themes/pinstripe/global/splitter/{grip-hrz-before.gif => grip-top.gif} (100%) rename toolkit/themes/winstripe/global/splitter/{grip-hrz-after.gif => grip-bottom.gif} (100%) rename toolkit/themes/winstripe/global/splitter/{grip-vrt-before.gif => grip-left.gif} (100%) rename toolkit/themes/winstripe/global/splitter/{grip-vrt-after.gif => grip-right.gif} (100%) rename toolkit/themes/winstripe/global/splitter/{grip-hrz-before.gif => grip-top.gif} (100%) diff --git a/toolkit/themes/gnomestripe/global/splitter.css b/toolkit/themes/gnomestripe/global/splitter.css index 77be81b027a..31d401b1b6a 100644 --- a/toolkit/themes/gnomestripe/global/splitter.css +++ b/toolkit/themes/gnomestripe/global/splitter.css @@ -52,12 +52,36 @@ splitter { } +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 { diff --git a/toolkit/themes/pinstripe/global/jar.mn b/toolkit/themes/pinstripe/global/jar.mn index 6cf31825f29..49386dbef0f 100644 --- a/toolkit/themes/pinstripe/global/jar.mn +++ b/toolkit/themes/pinstripe/global/jar.mn @@ -136,10 +136,10 @@ toolkit.jar: 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) diff --git a/toolkit/themes/pinstripe/global/splitter.css b/toolkit/themes/pinstripe/global/splitter.css index fdcb2fba813..b4f71d0779a 100644 --- a/toolkit/themes/pinstripe/global/splitter.css +++ b/toolkit/themes/pinstripe/global/splitter.css @@ -49,6 +49,20 @@ splitter { 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; } @@ -63,6 +77,16 @@ splitter[orient="vertical"] { 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 { @@ -87,40 +111,44 @@ splitter[orient="vertical"] > grippy { /* ..... 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"); } diff --git a/toolkit/themes/pinstripe/global/splitter/grip-hrz-after.gif b/toolkit/themes/pinstripe/global/splitter/grip-bottom.gif similarity index 100% rename from toolkit/themes/pinstripe/global/splitter/grip-hrz-after.gif rename to toolkit/themes/pinstripe/global/splitter/grip-bottom.gif diff --git a/toolkit/themes/pinstripe/global/splitter/grip-vrt-before.gif b/toolkit/themes/pinstripe/global/splitter/grip-left.gif similarity index 100% rename from toolkit/themes/pinstripe/global/splitter/grip-vrt-before.gif rename to toolkit/themes/pinstripe/global/splitter/grip-left.gif diff --git a/toolkit/themes/pinstripe/global/splitter/grip-vrt-after.gif b/toolkit/themes/pinstripe/global/splitter/grip-right.gif similarity index 100% rename from toolkit/themes/pinstripe/global/splitter/grip-vrt-after.gif rename to toolkit/themes/pinstripe/global/splitter/grip-right.gif diff --git a/toolkit/themes/pinstripe/global/splitter/grip-hrz-before.gif b/toolkit/themes/pinstripe/global/splitter/grip-top.gif similarity index 100% rename from toolkit/themes/pinstripe/global/splitter/grip-hrz-before.gif rename to toolkit/themes/pinstripe/global/splitter/grip-top.gif diff --git a/toolkit/themes/winstripe/global/splitter.css b/toolkit/themes/winstripe/global/splitter.css index 97d75811135..beb3ba7732c 100644 --- a/toolkit/themes/winstripe/global/splitter.css +++ b/toolkit/themes/winstripe/global/splitter.css @@ -56,6 +56,20 @@ splitter { 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; } @@ -70,6 +84,16 @@ splitter[orient="vertical"] { 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 { @@ -98,40 +122,44 @@ splitter[orient="vertical"] > grippy { /* ..... 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"); } diff --git a/toolkit/themes/winstripe/global/splitter/grip-hrz-after.gif b/toolkit/themes/winstripe/global/splitter/grip-bottom.gif similarity index 100% rename from toolkit/themes/winstripe/global/splitter/grip-hrz-after.gif rename to toolkit/themes/winstripe/global/splitter/grip-bottom.gif diff --git a/toolkit/themes/winstripe/global/splitter/grip-vrt-before.gif b/toolkit/themes/winstripe/global/splitter/grip-left.gif similarity index 100% rename from toolkit/themes/winstripe/global/splitter/grip-vrt-before.gif rename to toolkit/themes/winstripe/global/splitter/grip-left.gif diff --git a/toolkit/themes/winstripe/global/splitter/grip-vrt-after.gif b/toolkit/themes/winstripe/global/splitter/grip-right.gif similarity index 100% rename from toolkit/themes/winstripe/global/splitter/grip-vrt-after.gif rename to toolkit/themes/winstripe/global/splitter/grip-right.gif diff --git a/toolkit/themes/winstripe/global/splitter/grip-hrz-before.gif b/toolkit/themes/winstripe/global/splitter/grip-top.gif similarity index 100% rename from toolkit/themes/winstripe/global/splitter/grip-hrz-before.gif rename to toolkit/themes/winstripe/global/splitter/grip-top.gif