[Pkg-mozext-commits] [tabmixplus] 70/123: Add isMultiRow property to gBrowser.tabContainer.mTabstrip
David Prévot
taffit at moszumanska.debian.org
Wed Sep 17 21:16:28 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository tabmixplus.
commit 1c84288ff9a71c5c7605dd2fe6712d4004594e97
Author: onemen <tabmix.onemen at gmail.com>
Date: Wed Sep 3 08:31:55 2014 +0300
Add isMultiRow property to gBrowser.tabContainer.mTabstrip
---
chrome/content/tab/scrollbox.xml | 24 +++++++++++++++---------
1 file changed, 15 insertions(+), 9 deletions(-)
diff --git a/chrome/content/tab/scrollbox.xml b/chrome/content/tab/scrollbox.xml
index a9968e6..8ff0c3e 100644
--- a/chrome/content/tab/scrollbox.xml
+++ b/chrome/content/tab/scrollbox.xml
@@ -130,7 +130,7 @@
<parameter name="tabStart"/>
<parameter name="tabEnd"/>
<body><![CDATA[
- if (TabmixTabbar.isMultiRow)
+ if (this.isMultiRow)
return [tabStart, tabEnd];
this._calcTabMargins(aTab);
@@ -159,7 +159,7 @@
'$&, offset = true'
)._replace(
'STOP_DISTANCE = 15;',
- 'STOP_DISTANCE = TabmixTabbar.isMultiRow ? 3 : 15;'
+ 'STOP_DISTANCE = this.isMultiRow ? 3 : 15;'
)._replace(
'amountToScroll = this._isScrolling * STOP_DISTANCE;',
'{$& \
@@ -185,14 +185,14 @@
// we divide scrollDelta by the ratio between tab width and tab height
Tabmix.changeCode(this._arrowScrollAnim, "scrollbox._arrowScrollAnim.sample")._replace(
'0.5 * timePassed * scrollIndex',
- 'TabmixTabbar.isMultiRow ? $& / this.scrollbox._verticalAnimation : $&'
+ 'this.scrollbox.isMultiRow ? $& / this.scrollbox._verticalAnimation : $&'
).toCode();
// the ratio between tab width and tab height is approximately 6
// we multiply here the distance to get same animation effect.
Tabmix.changeCode(this._scrollAnim, "scrollbox._scrollAnim.start")._replace(
'Math.abs(distance)',
- 'Math.abs(distance * (TabmixTabbar.isMultiRow ? this.scrollbox._verticalAnimation : 1))'
+ 'Math.abs(distance * (this.scrollbox.isMultiRow ? this.scrollbox._verticalAnimation : 1))'
).toCode();
if (Tabmix.isVersion(320)) {
@@ -260,7 +260,7 @@
<body><![CDATA[
var offset = 0, isScrollingLeft = amountToScroll > 0;
if (amountToScroll != 0 && this.offsetAmountToScroll &&
- !TabmixTabbar.isMultiRow) {
+ !this.isMultiRow) {
let tab;
if (isScrollingLeft)
tab = TMP_TabView.nextVisibleSibling(element);
@@ -279,7 +279,7 @@
<method name="_distanceToRow">
<parameter name="amountToScroll"/>
<body><![CDATA[
- if (!TabmixTabbar.isMultiRow)
+ if (!this.isMultiRow)
return amountToScroll;
let rowHeight = this.singleRowHeight;
let position = this.scrollPosition;
@@ -291,6 +291,12 @@
<field name="_smoothVerticalScroll">6</field>
<field name="_singleRowHeight">null</field>
+ <property name="isMultiRow" readonly="true">
+ <getter><![CDATA[
+ return this.getAttribute("flowing") == "multibar";
+ ]]></getter>
+ </property>
+
<property name="singleRowHeight" readonly="true">
<getter><![CDATA[
if (this._singleRowHeight)
@@ -531,7 +537,7 @@
// horizontal scrollbox - Ignore vertical events
if (event.detail == 0)
return;
- if (TabmixTabbar.isMultiRow && !this._enterVerticalModeTimeout) {
+ if (this.isMultiRow && !this._enterVerticalModeTimeout) {
this.__needToSetVerticalOrient = true;
// when widthFitTitle is false we enter vertical mode only after we are in overflow
// if first or last tab is unvisible enter vertical mode
@@ -544,7 +550,7 @@
}
}
- if (TabmixTabbar.isMultiRow) {
+ if (this.isMultiRow) {
//XXX don't do anything on Linux when hovering last tab and
// we show close button on tab on hover
if (!TabmixSvc.isLinux || TabmixTabbar.visibleRows == 1 ||
@@ -568,7 +574,7 @@
let tabBar = document.getBindingParent(this);
tabBar._unlockTabSizing();
- if (TabmixTabbar.isMultiRow && tabBar.firstChild.pinned)
+ if (this.isMultiRow && tabBar.firstChild.pinned)
this.setFirstTabInRow(true);
]]></handler>
--
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