feat: add functionality to allow pinned tabs to resemble normal tabs
(cherry picked from commit 9c79b7c01b6acb6f3c4ae187353e7131d8ef0a34)
This commit is contained in:
@@ -64,6 +64,7 @@ pref("browser.ping-centre.telemetry", false, locked);
|
|||||||
pref("browser.search.separatePrivateDefault", true);
|
pref("browser.search.separatePrivateDefault", true);
|
||||||
pref("browser.search.separatePrivateDefault.ui.enabled", true);
|
pref("browser.search.separatePrivateDefault.ui.enabled", true);
|
||||||
pref("browser.send_pings", false, locked);
|
pref("browser.send_pings", false, locked);
|
||||||
|
pref("browser.tabs.pinnedIconOnly", false);
|
||||||
pref("browser.tabs.remote.separatedMozillaDomains", "", locked);
|
pref("browser.tabs.remote.separatedMozillaDomains", "", locked);
|
||||||
pref("browser.topsites.contile.enabled", false, locked);
|
pref("browser.topsites.contile.enabled", false, locked);
|
||||||
pref("browser.topsites.contile.endpoint", "", locked);
|
pref("browser.topsites.contile.endpoint", "", locked);
|
||||||
|
|||||||
@@ -72,6 +72,16 @@ const WaterfoxGlue = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Keep the pinned tabs observer
|
||||||
|
this.pinnedTabListener = PrefUtils.addObserver(
|
||||||
|
"browser.tabs.pinnedIconOnly",
|
||||||
|
isEnabled => {
|
||||||
|
// Pref being true actually means we need to unload the sheet, so invert.
|
||||||
|
const uri = "chrome://browser/content/tabfeatures/pinnedtab.css";
|
||||||
|
BrowserUtils.registerOrUnregisterSheet(uri, !isEnabled);
|
||||||
|
}
|
||||||
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
async getChromeManifest(manifest) {
|
async getChromeManifest(manifest) {
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
@supports not -moz-bool-pref("browser.tabs.pinnedIconOnly") {
|
||||||
|
.tabbrowser-tab:is([pinned]) {
|
||||||
|
-moz-box-flex: 100;
|
||||||
|
max-width: 225px;
|
||||||
|
min-width: var(--tab-min-width);
|
||||||
|
width: 0;
|
||||||
|
transition: min-width 100ms ease-out,
|
||||||
|
max-width 100ms ease-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabbrowser-tab:is([pinned]):not([fadein]) {
|
||||||
|
max-width: 0.1px;
|
||||||
|
min-width: 0.1px;
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabbrowser-tab:is([pinned]) .tab-throbber,
|
||||||
|
.tabbrowser-tab:is([pinned]) .tab-icon-pending,
|
||||||
|
.tabbrowser-tab:is([pinned]) .tab-icon-image,
|
||||||
|
.tabbrowser-tab:is([pinned]) .tab-sharing-icon-overlay,
|
||||||
|
.tabbrowser-tab:is([pinned]) .tab-icon-overlay {
|
||||||
|
margin-inline-end: 5.5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
browser.jar:
|
browser.jar:
|
||||||
% content browser %content/browser/ contentaccessible=yes
|
% content browser %content/browser/ contentaccessible=yes
|
||||||
* content/browser/overlays/tabfeatures.xhtml (content/tabfeatures.xhtml)
|
* content/browser/overlays/tabfeatures.xhtml (content/tabfeatures.xhtml)
|
||||||
|
content/browser/tabfeatures/pinnedtab.css (content/pinnedtab.css)
|
||||||
Reference in New Issue
Block a user