diff --git a/content/treestyletab/config.css b/content/treestyletab/config.css
index 9a5b86e5..1d39b680 100644
--- a/content/treestyletab/config.css
+++ b/content/treestyletab/config.css
@@ -9,3 +9,7 @@
width: 24px;
height: 24px;
}
+
+arrowscrollbox[overflow="true"] {
+ border: 1px inset ThreeDFace;
+}
diff --git a/content/treestyletab/config.js b/content/treestyletab/config.js
index c2c75570..310b9b9d 100644
--- a/content/treestyletab/config.js
+++ b/content/treestyletab/config.js
@@ -40,10 +40,7 @@ function init()
function initAppearancePane()
{
onChangeTabbarPosition();
-}
-function initStylePane()
-{
var mixed = document.getElementById('extensions.treestyletab.tabbar.style-mixed');
if (comparator.compare(XULAppInfo.version, '3.5') >= 0) {
mixed.removeAttribute('disabled');
@@ -61,6 +58,53 @@ function initStylePane()
else {
sidebar.setAttribute('disabled', true);
}
+
+ var boxes = [
+ document.getElementById('extensions.treestyletab.tabbar.style-arrowscrollbox'),
+ document.getElementById('extensions.treestyletab.twisty.style-arrowscrollbox')
+ ];
+ Array.slice(boxes[0].childNodes).concat(Array.slice(boxes[1].childNodes))
+ .forEach(function(aItem) {
+ var start = 0;
+ var delta = 200;
+ var radian = 90 * Math.PI / 180;
+ aItem.style.overflow = 'hidden';
+ aItem.width = 0;
+ aItem.style.maxWidth = 0;
+ var task = function(aTime, aBeginning, aChange, aDuration) {
+ var width;
+ if (aTime >= aDuration) {
+ width = start + delta;
+ finished = true;
+ }
+ else {
+ width = start + (delta * Math.sin(aTime / aDuration * radian));
+ finished = false;
+ }
+ aItem.removeAttribute('width');
+ aItem.style.maxWidth = parseInt(width)+'px';
+
+ var itemBox = aItem.boxObject;
+ var parentBox = aItem.parentNode.boxObject;
+ if (
+ parentBox.screenX > itemBox.screenX ||
+ parentBox.screenX + parentBox.width < itemBox.screenX + itemBox.width
+ ) {
+ aItem.parentNode.setAttribute('overflow', true);
+ if (aItem.selected)
+ aItem.parentNode.scrollBoxObject.ensureElementIsVisible(aItem);
+ }
+
+ if (finished) {
+ start = null;
+ delta = null;
+ radian = null;
+ aItem = null;
+ }
+ return finished;
+ };
+ window['piro.sakura.ne.jp'].animationManager.addTask(task, 0, 0, 500);
+ });
}
diff --git a/content/treestyletab/config.xul b/content/treestyletab/config.xul
index ca4b9577..3715582a 100644
--- a/content/treestyletab/config.xul
+++ b/content/treestyletab/config.xul
@@ -53,6 +53,12 @@
+
+
@@ -138,42 +144,13 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -181,7 +158,20 @@
class="image" align="center"
src="chrome://treestyletab/content/res/style-sidebar.png"
id="extensions.treestyletab.tabbar.style-sidebar"/>
-
+
+
+
+
+
@@ -192,7 +182,8 @@
-
+
-
+
+
+
+