[Pkg-mozext-commits] [tabmixplus] 13/73: Prevent tabs toolbar buttons from disappearing when there is more than one row of tabs
David Prévot
taffit at moszumanska.debian.org
Mon May 9 02:30:50 UTC 2016
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository tabmixplus.
commit e5e8cbf0204946f8d32e398ffd11472ce2021a35
Author: onemen <tabmix.onemen at gmail.com>
Date: Sun Mar 27 07:11:19 2016 +0300
Prevent tabs toolbar buttons from disappearing when there is more than one row of tabs
---
chrome/content/tab/tab.js | 7 +++++++
chrome/content/tabmix.js | 6 +++++-
modules/DynamicRules.jsm | 2 +-
3 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/chrome/content/tab/tab.js b/chrome/content/tab/tab.js
index cd2a7f5..271b5f8 100644
--- a/chrome/content/tab/tab.js
+++ b/chrome/content/tab/tab.js
@@ -1796,6 +1796,13 @@ gTMPprefObserver = {
},
miscellaneousRules: function TMP_PO_miscellaneousRules() {
+ // make sure we have valid height for the buttons. with some extensions
+ // combination it is possible to get zero height, if Tabmix.getButtonsHeight
+ // called to early
+ if (!Tabmix._buttonsHeight) {
+ Tabmix.getButtonsHeight(true);
+ }
+
let skin;
// with Walnut theme we get wrong height on Firefox 36
if (Tabmix._buttonsHeight > 50) {
diff --git a/chrome/content/tabmix.js b/chrome/content/tabmix.js
index e84b8fd..927ba1b 100644
--- a/chrome/content/tabmix.js
+++ b/chrome/content/tabmix.js
@@ -99,7 +99,7 @@ Tabmix.sessionInitialized = function() {
// we call gTMPprefObserver.miscellaneousRules to add some dynamic rules
// from Tabmix.afterDelayedStartup
-Tabmix.getButtonsHeight = function() {
+Tabmix.getButtonsHeight = function(setDefault) {
if (gBrowser.tabContainer.orient == "horizontal") {
let tabBar = gBrowser.tabContainer;
let stripIsHidden = TabmixTabbar.hideMode !== 0 && !tabBar.visible;
@@ -108,6 +108,10 @@ Tabmix.getButtonsHeight = function() {
this._buttonsHeight = Tabmix.visibleTabs.first.getBoundingClientRect().height;
if (stripIsHidden)
tabBar.visible = false;
+
+ if (setDefault && !this._buttonsHeight) {
+ this._buttonsHeight = TabmixSvc.australis ? 31 : 24;
+ }
} else {
this._buttonsHeight = 24;
}
diff --git a/modules/DynamicRules.jsm b/modules/DynamicRules.jsm
index b919bd1..d5e966d 100644
--- a/modules/DynamicRules.jsm
+++ b/modules/DynamicRules.jsm
@@ -284,7 +284,7 @@ this.DynamicRules = {
this.createTemplates();
function updateButtonHeight(Tabmix, rules) {
- let newHeight = Tabmix.getButtonsHeight();
+ let newHeight = Tabmix.getButtonsHeight(true);
["new-tab", "pb-indicator", "scrollbutton", "toolbarbutton"].forEach(name => {
let rule = rules[name + "-height"];
if (typeof rule == "object") {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/tabmixplus.git
More information about the Pkg-mozext-commits
mailing list