diff --git a/bootstrap.js b/bootstrap.js index 835925f..9871e36 100644 --- a/bootstrap.js +++ b/bootstrap.js @@ -45,7 +45,8 @@ const DEFAULT_PREFS = { "extensions.verticaltabs.right": false, "extensions.verticaltabs.tabsOnTop": false, "browser.tabs.drawInTitlebar": false, - "extensions.verticaltabs.theme": 'default' + "extensions.verticaltabs.theme": 'default', + "extensions.verticaltabs.fullscreen": true }; /** diff --git a/options.xul b/options.xul index 57602be..eb27b3c 100644 --- a/options.xul +++ b/options.xul @@ -14,4 +14,7 @@ + diff --git a/verticaltabs.jsm b/verticaltabs.jsm index 4db9adb..cef8c58 100644 --- a/verticaltabs.jsm +++ b/verticaltabs.jsm @@ -188,7 +188,11 @@ VerticalTabs.prototype = { this.window.addEventListener("resize", this, false); + this.window.addEventListener("sizemodechange", this, true); + this.unloaders.push(function () { + this.window.removeEventListener("sizemodechange", this, true); + // Move the bottom back to being the next sibling of contentbox. browserbox.insertBefore(bottom, contentbox.nextSibling); @@ -241,6 +245,19 @@ VerticalTabs.prototype = { aTab.maxWidth = 65000; aTab.minWidth = 0; }, + + onSizeModeChange: function(aEvent) { + let box = this.document.getElementById("verticaltabs-box"); + let splitter = this.document.getElementById("verticaltabs-splitter"); + if(this.window.windowState == 4 + && Services.prefs.getBoolPref("extensions.verticaltabs.fullscreen")) { + box.style.display = 'none'; + splitter.style.display = 'none'; + } else { + box.style.display = ''; + splitter.style.display = ''; + } + }, setPinnedSizes: function() { let tabs = this.document.getElementById("tabbrowser-tabs"); @@ -333,6 +350,10 @@ VerticalTabs.prototype = { case "resize": this.setPinnedSizes(); return; + + case "sizemodechange": + this.onSizeModeChange(aEvent); + return; } }, };