diff --git a/src/content/options.js b/src/content/options.js index 97c9a97..183ff17 100644 --- a/src/content/options.js +++ b/src/content/options.js @@ -98,6 +98,16 @@ } }, + resizeOptions: function() { + let options = document.getElementById("roomybookmarkstoolbarPreferences"); + options.addEventListener("dialogextra1", function(event) { + window.resizeBy(20,0); + console.log("Window width: "+window.outerWidth); + //console.log("Tabpanel width: "+options.width); + console.log("Dialog width: "+options.clientWidth); + }); + }, + onLoad: function() { var thisPrefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefService); this.branch = thisPrefs.getBranch('extensions.roomybookmarkstoolbar.'); @@ -108,6 +118,13 @@ this.userWidth(); this.autoHideZone(); this.location(); - Preferences.forceEnableInstantApply() + this.resizeOptions(); + Preferences.forceEnableInstantApply(); + console.log(window); + console.log(window.outerWidth); + window.sizeToContent(); + /* window.requestAnimationFrame(() => { + window.sizeToContent(); + }); */ }, }; \ No newline at end of file diff --git a/src/content/options.xhtml b/src/content/options.xhtml index f730a50..155fbb3 100644 --- a/src/content/options.xhtml +++ b/src/content/options.xhtml @@ -5,10 +5,12 @@ @@ -27,7 +29,7 @@ &roomybookmarkstoolbar.options.multirowBarGroup.label; - + &roomybookmarkstoolbar.options.opacityIn.label; @@ -43,7 +45,7 @@ &roomybookmarkstoolbar.options.timeGroup.label; - + @@ -86,14 +88,14 @@ &roomybookmarkstoolbar.options.location.label; - + &roomybookmarkstoolbar.options.alignment.label; - + @@ -105,7 +107,7 @@ Misc - restart required - +