[Pkg-mozext-commits] [tabmixplus] 115/147: Tab bar click area does not resize correctly after windows size-mode changed visible rows number. Add call to TabsInTitlebar._update to recalculate titlebar and titlebarContent height (related to bug 1219215, changeset 5e45a1919ab5)

David Prévot taffit at moszumanska.debian.org
Sat Aug 5 15:27:43 UTC 2017


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository tabmixplus.

commit 1e5ecd50a2cf10a605bc7c9fe4b16e9dd13d9f11
Author: onemen <tabmix.onemen at gmail.com>
Date:   Wed Mar 22 12:37:27 2017 +0200

    Tab bar click area does not resize correctly after windows size-mode changed visible rows number. Add call to TabsInTitlebar._update to recalculate titlebar and titlebarContent height (related to bug 1219215, changeset 5e45a1919ab5)
---
 chrome/content/places/places.js |  7 +++----
 chrome/content/tab/tab.js       | 14 ++++++++++++++
 2 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/chrome/content/places/places.js b/chrome/content/places/places.js
index 7ce4ec7..988ad47 100644
--- a/chrome/content/places/places.js
+++ b/chrome/content/places/places.js
@@ -760,10 +760,9 @@ Tabmix.onContentLoaded = {
       )._replace(
         /(})(\)?)$/,
         // when we get in and out of tabsintitlebar mode call updateScrollStatus
-        '  if (TabmixTabbar._enablePositionCheck &&\n  ' +
-        '      TabmixTabbar.getTabsPosition() != TabmixTabbar._tabsPosition) {\n  ' +
-        '    TabmixTabbar.updateScrollStatus();\n  ' +
-        '  }\n' +
+        // force another update when rows number changed by Tabmix to update
+        // titlebar and titlebarContent height
+        '  TabmixTabbar.updateTabsInTitlebarAppearance();\n  ' +
         '$1$2'
       ).toCode();
     }
diff --git a/chrome/content/tab/tab.js b/chrome/content/tab/tab.js
index cff8b58..c652f46 100644
--- a/chrome/content/tab/tab.js
+++ b/chrome/content/tab/tab.js
@@ -174,6 +174,20 @@ var TabmixTabbar = {
     gTMPprefObserver.setShowNewTabButtonAttr(showNewTabButton, position);
   },
 
+  updateTabsInTitlebarAppearance() {
+    if (this._enablePositionCheck &&
+        (this.isMultiRow && !this._updatingAppearance ||
+        this.getTabsPosition() != this._tabsPosition)) {
+      const rows = this.visibleRows;
+      this.updateScrollStatus();
+      if (!this._updatingAppearance && rows != this.visibleRows) {
+        this._updatingAppearance = true;
+        TabsInTitlebar.updateAppearance(true);
+        this._updatingAppearance = false;
+      }
+    }
+  },
+
   updateScrollStatus: function TMP_updateScrollStatus(delay) {
     if (delay) {
       if (this.updateScrollStatus.timeout) {

-- 
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