[Pkg-mozext-commits] [tabmixplus] 82/107: Style issues with PaleMoon on Mac OS: tab background colors not working, drop indicator is not in place when tabs are in multi-row, and close button on background tabs is invisible
David Prévot
taffit at moszumanska.debian.org
Tue Dec 29 19:02:53 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository tabmixplus.
commit 3a10e72ecf72a8d2ec7f7a814d8bdf0464109f39
Author: onemen <tabmix.onemen at gmail.com>
Date: Mon Nov 23 13:47:41 2015 +0200
Style issues with PaleMoon on Mac OS: tab background colors not working, drop indicator is not in place when tabs are in multi-row, and close button on background tabs is invisible
---
.eslintrc | 1 +
chrome/content/minit/minit.js | 5 +++++
chrome/content/tab/tab.js | 7 +++++++
modules/DynamicRules.jsm | 8 ++++++--
4 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/.eslintrc b/.eslintrc
index 2ec6306..87f93a0 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -224,6 +224,7 @@
"gPrefWindow": false,
"PromptSvc": false,
"gMenuPane": false,
+ "isMac": false,
"LinkNodeUtils": false,
"Prefs": false,
"reportError": false,
diff --git a/chrome/content/minit/minit.js b/chrome/content/minit/minit.js
index da23da8..1e6fb45 100644
--- a/chrome/content/minit/minit.js
+++ b/chrome/content/minit/minit.js
@@ -707,6 +707,11 @@ var TMP_tabDNDObserver = {
} else {
newMarginY = tabRect.bottom - rect.bottom;
fixMargin = this.onLastToolbar && (Math.abs(newMarginY) < 0.5);
+ // fix for PaleMoon on Mac OS X
+ if (TabmixTabbar.visibleRows > 1 &&
+ ind.parentNode.getBoundingClientRect().height === 0) {
+ newMarginY += tabRect.height;
+ }
}
// make indicator visible
if (fixMargin)
diff --git a/chrome/content/tab/tab.js b/chrome/content/tab/tab.js
index 3fb48b1..db0f9b1 100644
--- a/chrome/content/tab/tab.js
+++ b/chrome/content/tab/tab.js
@@ -1746,6 +1746,13 @@ var gTMPprefObserver = {
this.insertRule(newRule, "toolbarbutton-height");
delete Tabmix._buttonsHeight;
+ if (TabmixSvc.isMac && TabmixSvc.isPaleMoon) {
+ newRule = '.tab-close-button:not([selected="true"]):not(:hover) {\n' +
+ ' -moz-image-region: rect(0, 16px, 16px, 0);\n' +
+ ' opacity: .7;\n}';
+ this.insertRule(newRule);
+ }
+
// we don't show icons on menu on Mac OS X
if (TabmixSvc.isMac)
return;
diff --git a/modules/DynamicRules.jsm b/modules/DynamicRules.jsm
index fe31657..c823145 100644
--- a/modules/DynamicRules.jsm
+++ b/modules/DynamicRules.jsm
@@ -24,6 +24,10 @@ XPCOMUtils.defineLazyGetter(this, "SSS", function() {
return sss;
});
+XPCOMUtils.defineLazyGetter(this, "isMac", function() {
+ return TabmixSvc.isMac && !TabmixSvc.isPaleMoon;
+});
+
const NAMESPACE = '@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");\n';
const STYLENAMES = ["currentTab", "unloadedTab", "unreadTab", "otherTab", "progressMeter"];
const EXTRAPREFS = ["squaredTabsStyle"];
@@ -134,10 +138,10 @@ this.DynamicRules = {
let bgImage = {};
bgImage.body = "linear-gradient(#topColor, #bottomColor)";
let bottomBorder = "linear-gradient(to top, rgba(10%,10%,10%,.4) 1px, transparent 1px),\n";
- bgImage.bg = TabmixSvc.isMac ? bgImage.body : (bottomBorder + space20 + bgImage.body);
+ bgImage.bg = isMac ? bgImage.body : (bottomBorder + space20 + bgImage.body);
///XXX move -moz-appearance: to general rule when style have bg
let backgroundRule = " {\n -moz-appearance: none;\n background-image: " + bgImage.bg + " !important;\n}\n";
- if (TabmixSvc.isMac) {
+ if (isMac) {
backgroundRule = ' > .tab-stack > .tab-background >\n' +
' :-moz-any(.tab-background-start, .tab-background-middle, .tab-background-end)' + backgroundRule;
}
--
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