From 76d8d8e60e2dc914cd15fc5287f2c06bfa190e1e Mon Sep 17 00:00:00 2001 From: "cst%andrew.cmu.edu" Date: Fri, 21 Oct 2005 03:50:13 +0000 Subject: [PATCH] Bug 309538 Autoscroll indicator should show possible scrolling directions r=db48x, sr=neil, icons by neil git-svn-id: svn://10.0.0.236/trunk@182688 18797224-902f-48f8-a5cc-f745e15eee43 --- .../classic/communicator/communicator.css | 6 ++++++ .../communicator/icons/autoscroll-ew.gif | Bin 0 -> 183 bytes .../communicator/icons/autoscroll-ns.gif | Bin 0 -> 171 bytes mozilla/themes/classic/jar.mn | 2 ++ .../themes/modern/communicator/communicator.css | 6 ++++++ .../modern/communicator/icons/autoscroll-ew.gif | Bin 0 -> 183 bytes .../modern/communicator/icons/autoscroll-ns.gif | Bin 0 -> 171 bytes mozilla/themes/modern/jar.mn | 2 ++ .../resources/content/utilityOverlay.js | 16 ++++++++++++++-- 9 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 mozilla/themes/classic/communicator/icons/autoscroll-ew.gif create mode 100644 mozilla/themes/classic/communicator/icons/autoscroll-ns.gif create mode 100644 mozilla/themes/modern/communicator/icons/autoscroll-ew.gif create mode 100644 mozilla/themes/modern/communicator/icons/autoscroll-ns.gif diff --git a/mozilla/themes/classic/communicator/communicator.css b/mozilla/themes/classic/communicator/communicator.css index faa74235b87..dd93cfc5555 100644 --- a/mozilla/themes/classic/communicator/communicator.css +++ b/mozilla/themes/classic/communicator/communicator.css @@ -102,3 +102,9 @@ padding: 0px; background-image: url("chrome://communicator/skin/icons/autoscroll.gif"); } +#autoscroller[scrolldir="NS"] { + background-image: url("chrome://communicator/skin/icons/autoscroll-ns.gif"); +} +#autoscroller[scrolldir="EW"] { + background-image: url("chrome://communicator/skin/icons/autoscroll-ew.gif"); +} diff --git a/mozilla/themes/classic/communicator/icons/autoscroll-ew.gif b/mozilla/themes/classic/communicator/icons/autoscroll-ew.gif new file mode 100644 index 0000000000000000000000000000000000000000..757c8ebeeed070f34a0d62efef68573b6a6ac915 GIT binary patch literal 183 zcmZ?wbhEHblwpuz*vtR|EiEno|NjRw2@^UXB_O>HEI9@zJXh~^d~tU7`%7XB3?6BB zG#ACcZp(XfQ2FH5S8hxiI{%sE4b)_|wJcVAKkeYu5^L#@(3F#F9M=>syKA&}y`F{j yKatZFEC~iDJXh~^d~tU7`%CO;kHn@q zF)*Z5cD*{aXubGp<2y|j`-)Ac7<`r9)pg9@V5JLFxL>fz)5X5k4BA|)OGEn)-I#KM mr+?;YqYra@f;U=5e^Hz5|ML6B8#X2DuewV#H48E@SOWk6CpM!1 literal 0 HcmV?d00001 diff --git a/mozilla/themes/classic/jar.mn b/mozilla/themes/classic/jar.mn index ad21fbe9652..15eee12ed9a 100644 --- a/mozilla/themes/classic/jar.mn +++ b/mozilla/themes/classic/jar.mn @@ -56,6 +56,8 @@ classic.jar: skin/classic/communicator/brand/throbber16-single.gif (communicator/brand/throbber16-single.gif) skin/classic/communicator/brand/throbber16-anim.gif (communicator/brand/throbber16-anim.gif) skin/classic/communicator/icons/autoscroll.gif (communicator/icons/autoscroll.gif) + skin/classic/communicator/icons/autoscroll-ns.gif (communicator/icons/autoscroll-ns.gif) + skin/classic/communicator/icons/autoscroll-ew.gif (communicator/icons/autoscroll-ew.gif) skin/classic/communicator/icons/offline.gif (communicator/icons/offline.gif) skin/classic/communicator/icons/online.gif (communicator/icons/online.gif) skin/classic/communicator/icons/search-act.gif (communicator/icons/search-act.gif) diff --git a/mozilla/themes/modern/communicator/communicator.css b/mozilla/themes/modern/communicator/communicator.css index e2642b2aa5a..ec4982d73ed 100644 --- a/mozilla/themes/modern/communicator/communicator.css +++ b/mozilla/themes/modern/communicator/communicator.css @@ -99,3 +99,9 @@ padding: 0px; background-image: url("chrome://communicator/skin/icons/autoscroll.gif"); } +#autoscroller[scrolldir="NS"] { + background-image: url("chrome://communicator/skin/icons/autoscroll-ns.gif"); +} +#autoscroller[scrolldir="EW"] { + background-image: url("chrome://communicator/skin/icons/autoscroll-ew.gif"); +} diff --git a/mozilla/themes/modern/communicator/icons/autoscroll-ew.gif b/mozilla/themes/modern/communicator/icons/autoscroll-ew.gif new file mode 100644 index 0000000000000000000000000000000000000000..757c8ebeeed070f34a0d62efef68573b6a6ac915 GIT binary patch literal 183 zcmZ?wbhEHblwpuz*vtR|EiEno|NjRw2@^UXB_O>HEI9@zJXh~^d~tU7`%7XB3?6BB zG#ACcZp(XfQ2FH5S8hxiI{%sE4b)_|wJcVAKkeYu5^L#@(3F#F9M=>syKA&}y`F{j yKatZFEC~iDJXh~^d~tU7`%CO;kHn@q zF)*Z5cD*{aXubGp<2y|j`-)Ac7<`r9)pg9@V5JLFxL>fz)5X5k4BA|)OGEn)-I#KM mr+?;YqYra@f;U=5e^Hz5|ML6B8#X2DuewV#H48E@SOWk6CpM!1 literal 0 HcmV?d00001 diff --git a/mozilla/themes/modern/jar.mn b/mozilla/themes/modern/jar.mn index 8f0b6d9848e..c7f9d236fc2 100644 --- a/mozilla/themes/modern/jar.mn +++ b/mozilla/themes/modern/jar.mn @@ -29,6 +29,8 @@ modern.jar: skin/modern/communicator/directory/file-icon.gif (communicator/directory/file-icon.gif) skin/modern/communicator/directory/directory.css (communicator/directory/directory.css) skin/modern/communicator/icons/autoscroll.gif (communicator/icons/autoscroll.gif) + skin/modern/communicator/icons/autoscroll-ns.gif (communicator/icons/autoscroll-ns.gif) + skin/modern/communicator/icons/autoscroll-ew.gif (communicator/icons/autoscroll-ew.gif) skin/modern/communicator/icons/loading.gif (communicator/icons/loading.gif) skin/modern/communicator/icons/lock-broken.gif (communicator/icons/lock-broken.gif) skin/modern/communicator/icons/lock-insecure.gif (communicator/icons/lock-insecure.gif) diff --git a/mozilla/xpfe/communicator/resources/content/utilityOverlay.js b/mozilla/xpfe/communicator/resources/content/utilityOverlay.js index 833b912dc74..e8829c12be2 100644 --- a/mozilla/xpfe/communicator/resources/content/utilityOverlay.js +++ b/mozilla/xpfe/communicator/resources/content/utilityOverlay.js @@ -605,9 +605,22 @@ function startScrolling(event) document.documentElement.appendChild(gAutoScrollPopup); } + gScrollingView = event.originalTarget.ownerDocument.defaultView; + var scrollingDir; + if (gScrollingView.scrollMaxX > 0) { + gAutoScrollPopup.setAttribute("scrolldir", gScrollingView.scrollMaxY > 0 ? "NSEW" : "EW"); + } + else if (gScrollingView.scrollMaxY > 0) { + gAutoScrollPopup.setAttribute("scrolldir", "NS"); + } + else { + gScrollingView = null; // abort scrolling + return; + } + document.popupNode = null; gAutoScrollPopup.showPopup(document.documentElement, event.screenX, event.screenY, - "popup", null, null); + "popup", null, null); gIgnoreMouseEvents = true; gStartX = event.screenX; gStartY = event.screenY; @@ -617,7 +630,6 @@ function startScrolling(event) addEventListener('mouseup', handleMouseUpDown, true); addEventListener('mousedown', handleMouseUpDown, true); gAutoScrollTimer = setInterval(autoScrollLoop, 10); - gScrollingView = event.originalTarget.ownerDocument.defaultView; } function handleMouseMove(event)