Allow to specify different delay for autoshow/hide on mousemove
This commit is contained in:
parent
55fa2764b8
commit
534c809052
@ -129,7 +129,8 @@ pref("extensions.treestyletab.tabbar.autoHide.contentAreaScreen.enabled", true);
|
||||
* Triggers for the "Auto Hide" feature. They can be controlled via the
|
||||
* configuration dialog.
|
||||
*/
|
||||
pref("extensions.treestyletab.tabbar.autoHide.delay", 50);
|
||||
pref("extensions.treestyletab.tabbar.autoHide.delay.show", 50);
|
||||
pref("extensions.treestyletab.tabbar.autoHide.delay.hide", -1); // same to "show"
|
||||
pref("extensions.treestyletab.tabbar.autoHide.area", 7);
|
||||
pref("extensions.treestyletab.tabbar.autoShow.mousemove", true);
|
||||
pref("extensions.treestyletab.tabbar.autoShow.accelKeyDown", true);
|
||||
|
@ -598,6 +598,7 @@ AutoHideBrowser.prototype = inherit(AutoHideBase.prototype, {
|
||||
this.showHideContentsAreaScreen();
|
||||
|
||||
var shouldShow = position & this.MOUSE_POSITION_SENSITIVE;
|
||||
var delayToShow = utils.getTreePref('tabbar.autoHide.delay.show');
|
||||
if (this.expanded) { // currently shown, let's hide it.
|
||||
if (shouldShow) {
|
||||
this.show(this.kSHOWN_BY_MOUSEMOVE);
|
||||
@ -607,12 +608,15 @@ AutoHideBrowser.prototype = inherit(AutoHideBase.prototype, {
|
||||
!shouldShow &&
|
||||
utils.getTreePref('tabbar.autoShow.mousemove')
|
||||
) {
|
||||
let delayToHide = utils.getTreePref('tabbar.autoHide.delay.hide');
|
||||
if (delayToHide < 0)
|
||||
delayToHide = delayToShow;
|
||||
this.showHideOnMouseMoveTimer = w.setTimeout(
|
||||
function(aSelf) {
|
||||
aSelf.cancelDelayedShowForShortcut();
|
||||
aSelf.hide(aSelf.kSHOWN_BY_MOUSEMOVE);
|
||||
},
|
||||
utils.getTreePref('tabbar.autoHide.delay'),
|
||||
delayToHide,
|
||||
this
|
||||
);
|
||||
}
|
||||
@ -623,7 +627,7 @@ AutoHideBrowser.prototype = inherit(AutoHideBase.prototype, {
|
||||
aSelf.cancelDelayedShowForShortcut();
|
||||
aSelf.show(aSelf.kSHOWN_BY_MOUSEMOVE);
|
||||
},
|
||||
utils.getTreePref('tabbar.autoHide.delay'),
|
||||
delayToShow,
|
||||
this
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user