* With ColorfulTabs, vertical tab bar was wrongly scrolled. (fix for https://github.com/piroor/treestyletab/issues/88 )

* update compatibility hacks for ColorfulTabs
This commit is contained in:
Piro / SHIMODA Hiroshi 2011-06-05 03:59:36 +09:00
parent 9ed219960a
commit 467b625484
2 changed files with 15 additions and 4 deletions

View File

@ -502,3 +502,8 @@ image.tab-icon {
visibility: collapse; visibility: collapse;
} }
/* ColorfulTabs */
:root:not([treestyletab-tabbar-position="top"]) #ctStack,
:root:not([treestyletab-tabbar-fixed="true"]) #ctStack {
display: none;
}

View File

@ -532,7 +532,7 @@ TreeStyleTabWindowHelper.overrideExtensionsAfterBrowserInit = function TSTWH_ove
// Colorful Tabs // Colorful Tabs
// https://addons.mozilla.org/firefox/addon/1368 // https://addons.mozilla.org/firefox/addon/1368
if ('clrtabsInit' in window && if ('colorfulTabs' in window &&
sv.getTreePref('compatibility.ColorfulTabs')) { sv.getTreePref('compatibility.ColorfulTabs')) {
let listener = { let listener = {
handleEvent : function(aEvent) handleEvent : function(aEvent)
@ -544,11 +544,11 @@ TreeStyleTabWindowHelper.overrideExtensionsAfterBrowserInit = function TSTWH_ove
var child = aEvent.originalTarget; var child = aEvent.originalTarget;
var parent = aEvent.parentTab; var parent = aEvent.parentTab;
if (child && parent) { if (child && parent) {
setColor(child, TreeStyleTabService.SessionStore.getTabValue(parent, 'tabClr')); colorfulTabs.setColor(child, TreeStyleTabService.SessionStore.getTabValue(parent, 'tabClr'));
} }
else if (child) { else if (child) {
TreeStyleTabService.SessionStore.setTabValue(child, 'tabClr', '') TreeStyleTabService.SessionStore.setTabValue(child, 'tabClr', '');
calcTabClr({ colorfulTabs.calcTabClr({
target : child, target : child,
originalTarget : child, originalTarget : child,
}); });
@ -563,6 +563,12 @@ TreeStyleTabWindowHelper.overrideExtensionsAfterBrowserInit = function TSTWH_ove
} }
} }
}; };
eval('colorfulTabs.show_ctStack = '+
colorfulTabs.show_ctStack.toSource().replace(
'.setProperty("display", "-moz-stack", "important")',
'.display = ""'
)
);
document.addEventListener('TreeStyleTabAttached', listener, false); document.addEventListener('TreeStyleTabAttached', listener, false);
document.addEventListener('TreeStyleTabParted', listener, false); document.addEventListener('TreeStyleTabParted', listener, false);
document.addEventListener('unload', listener, false); document.addEventListener('unload', listener, false);