Automated merge with https://hg.mozilla.org/mozilla-central
@ -412,10 +412,10 @@ pref("browser.tabs.loadBookmarksInBackground", false);
|
||||
pref("browser.tabs.tabClipWidth", 140);
|
||||
pref("browser.tabs.animate", true);
|
||||
pref("browser.tabs.onTop", true);
|
||||
#ifdef XP_WIN
|
||||
pref("browser.tabs.drawInTitlebar", true);
|
||||
#else
|
||||
#ifdef UNIX_BUT_NOT_MAC
|
||||
pref("browser.tabs.drawInTitlebar", false);
|
||||
#else
|
||||
pref("browser.tabs.drawInTitlebar", true);
|
||||
#endif
|
||||
|
||||
// Where to show tab close buttons:
|
||||
|
@ -415,3 +415,58 @@ var LightWeightThemeWebInstaller = {
|
||||
node.baseURI);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Listen for Lightweight Theme styling changes and update the browser's theme accordingly.
|
||||
*/
|
||||
let LightweightThemeListener = {
|
||||
_modifiedStyles: [],
|
||||
|
||||
init: function () {
|
||||
XPCOMUtils.defineLazyGetter(this, "styleSheet", function() {
|
||||
for (let i = document.styleSheets.length - 1; i >= 0; i--) {
|
||||
let sheet = document.styleSheets[i];
|
||||
if (sheet.href == "chrome://browser/skin/browser-lightweightTheme.css")
|
||||
return sheet;
|
||||
}
|
||||
});
|
||||
|
||||
Services.obs.addObserver(this, "lightweight-theme-styling-update", false);
|
||||
if (document.documentElement.hasAttribute("lwtheme"))
|
||||
this.updateStyleSheet(document.documentElement.style.backgroundImage);
|
||||
},
|
||||
|
||||
uninit: function () {
|
||||
Services.obs.removeObserver(this, "lightweight-theme-styling-update");
|
||||
},
|
||||
|
||||
/**
|
||||
* Append the headerImage to the background-image property of all rulesets in
|
||||
* browser-lightweightTheme.css.
|
||||
*
|
||||
* @param headerImage - a string containing a CSS image for the lightweight theme header.
|
||||
*/
|
||||
updateStyleSheet: function(headerImage) {
|
||||
if (!this.styleSheet)
|
||||
return;
|
||||
for (let i = 0; i < this.styleSheet.cssRules.length; i++) {
|
||||
let rule = this.styleSheet.cssRules[i];
|
||||
if (!rule.style.backgroundImage)
|
||||
continue;
|
||||
|
||||
if (!this._modifiedStyles[i])
|
||||
this._modifiedStyles[i] = { backgroundImage: rule.style.backgroundImage };
|
||||
|
||||
rule.style.backgroundImage = this._modifiedStyles[i].backgroundImage + ", " + headerImage;
|
||||
}
|
||||
},
|
||||
|
||||
// nsIObserver
|
||||
observe: function (aSubject, aTopic, aData) {
|
||||
if (aTopic != "lightweight-theme-styling-update" || !this.styleSheet)
|
||||
return;
|
||||
|
||||
let themeData = JSON.parse(aData);
|
||||
this.updateStyleSheet("url(" + themeData.headerURL + ")");
|
||||
},
|
||||
};
|
||||
|
102
browser/base/content/browser-customization.js
Normal file
@ -0,0 +1,102 @@
|
||||
# -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
/**
|
||||
* Customization handler prepares this browser window for entering and exiting
|
||||
* customization mode by handling CustomizationStart and CustomizationEnd
|
||||
* events.
|
||||
*/
|
||||
let CustomizationHandler = {
|
||||
handleEvent: function(aEvent) {
|
||||
switch(aEvent.type) {
|
||||
case "CustomizationStart":
|
||||
this._customizationStart();
|
||||
break;
|
||||
case "CustomizationEnd":
|
||||
this._customizationEnd(aEvent.detail);
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
_customizationStart: function() {
|
||||
// Disable the toolbar context menu items
|
||||
let menubar = document.getElementById("main-menubar");
|
||||
for (let childNode of menubar.childNodes)
|
||||
childNode.setAttribute("disabled", true);
|
||||
|
||||
let cmd = document.getElementById("cmd_CustomizeToolbars");
|
||||
cmd.setAttribute("disabled", "true");
|
||||
|
||||
let splitter = document.getElementById("urlbar-search-splitter");
|
||||
if (splitter) {
|
||||
splitter.parentNode.removeChild(splitter);
|
||||
}
|
||||
|
||||
CombinedStopReload.uninit();
|
||||
PlacesToolbarHelper.customizeStart();
|
||||
BookmarksMenuButton.customizeStart();
|
||||
DownloadsButton.customizeStart();
|
||||
TabsInTitlebar.allowedBy("customizing-toolbars", false);
|
||||
},
|
||||
|
||||
_customizationEnd: function(aDetails) {
|
||||
// Update global UI elements that may have been added or removed
|
||||
if (aDetails.changed) {
|
||||
gURLBar = document.getElementById("urlbar");
|
||||
|
||||
gProxyFavIcon = document.getElementById("page-proxy-favicon");
|
||||
gHomeButton.updateTooltip();
|
||||
gIdentityHandler._cacheElements();
|
||||
XULBrowserWindow.init();
|
||||
|
||||
#ifndef XP_MACOSX
|
||||
updateEditUIVisibility();
|
||||
#endif
|
||||
|
||||
// Hacky: update the PopupNotifications' object's reference to the iconBox,
|
||||
// if it already exists, since it may have changed if the URL bar was
|
||||
// added/removed.
|
||||
if (!window.__lookupGetter__("PopupNotifications")) {
|
||||
PopupNotifications.iconBox =
|
||||
document.getElementById("notification-popup-box");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
PlacesToolbarHelper.customizeDone();
|
||||
BookmarksMenuButton.customizeDone();
|
||||
DownloadsButton.customizeDone();
|
||||
|
||||
// The url bar splitter state is dependent on whether stop/reload
|
||||
// and the location bar are combined, so we need this ordering
|
||||
CombinedStopReload.init();
|
||||
UpdateUrlbarSearchSplitterState();
|
||||
setUrlAndSearchBarWidthForConditionalForwardButton();
|
||||
|
||||
// Update the urlbar
|
||||
if (gURLBar) {
|
||||
URLBarSetURI();
|
||||
XULBrowserWindow.asyncUpdateUI();
|
||||
BookmarksMenuButton.updateStarState();
|
||||
SocialShareButton.updateShareState();
|
||||
}
|
||||
|
||||
TabsInTitlebar.allowedBy("customizing-toolbars", true);
|
||||
|
||||
// Re-enable parts of the UI we disabled during the dialog
|
||||
let menubar = document.getElementById("main-menubar");
|
||||
for (let childNode of menubar.childNodes)
|
||||
childNode.setAttribute("disabled", false);
|
||||
let cmd = document.getElementById("cmd_CustomizeToolbars");
|
||||
cmd.removeAttribute("disabled");
|
||||
|
||||
// make sure to re-enable click-and-hold
|
||||
if (!getBoolPref("ui.click_hold_context_menus", false)) {
|
||||
SetClickAndHoldHandlers();
|
||||
}
|
||||
|
||||
gBrowser.selectedBrowser.focus();
|
||||
}
|
||||
}
|
@ -13,6 +13,14 @@ browser[remote="true"] {
|
||||
-moz-binding: url("chrome://global/content/bindings/remote-browser.xml#remote-browser");
|
||||
}
|
||||
|
||||
toolbar[customizable="true"] {
|
||||
-moz-binding: url("chrome://browser/content/customizableui/toolbar.xml#toolbar");
|
||||
}
|
||||
|
||||
#toolbar-menubar[autohide="true"] {
|
||||
-moz-binding: url("chrome://browser/content/customizableui/toolbar.xml#toolbar-menubar-autohide");
|
||||
}
|
||||
|
||||
tabbrowser {
|
||||
-moz-binding: url("chrome://browser/content/tabbrowser.xml#tabbrowser");
|
||||
}
|
||||
@ -39,11 +47,11 @@ tabbrowser {
|
||||
|
||||
.tabbrowser-tab:not([pinned]) {
|
||||
-moz-box-flex: 100;
|
||||
max-width: 250px;
|
||||
max-width: 180px;
|
||||
min-width: 100px;
|
||||
width: 0;
|
||||
transition: min-width 200ms ease-out,
|
||||
max-width 250ms ease-out,
|
||||
max-width 230ms ease-out,
|
||||
opacity 50ms ease-out 20ms /* hide the tab for the first 20ms of the max-width transition */;
|
||||
}
|
||||
|
||||
@ -52,8 +60,8 @@ tabbrowser {
|
||||
min-width: 0.1px;
|
||||
opacity: 0 !important;
|
||||
transition: min-width 200ms ease-out,
|
||||
max-width 250ms ease-out,
|
||||
opacity 50ms ease-out 180ms /* hide the tab for the last 20ms of the max-width transition */;
|
||||
max-width 230ms ease-out,
|
||||
opacity 50ms ease-out 160ms /* hide the tab for the last 20ms of the max-width transition */;
|
||||
}
|
||||
|
||||
.tab-throbber:not([fadein]):not([pinned]),
|
||||
@ -121,6 +129,23 @@ toolbar[printpreview="true"] {
|
||||
#main-window[tabsintitlebar] #titlebar-buttonbox {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#titlebar-buttonbox {
|
||||
-moz-appearance: -moz-window-button-box;
|
||||
}
|
||||
|
||||
%ifdef XP_MACOSX
|
||||
#titlebar-fullscreen-button {
|
||||
-moz-appearance: -moz-mac-fullscreen-button;
|
||||
}
|
||||
%endif
|
||||
|
||||
%ifdef XP_WIN
|
||||
#main-window[sizemode="maximized"] #titlebar-buttonbox {
|
||||
-moz-appearance: -moz-window-button-box-maximized;
|
||||
}
|
||||
%endif
|
||||
|
||||
%endif
|
||||
|
||||
.bookmarks-toolbar-customize,
|
||||
@ -140,11 +165,10 @@ toolbar[printpreview="true"] {
|
||||
#urlbar-container:not([combined]) > #urlbar > toolbarbutton,
|
||||
#urlbar-container[combined] + #reload-button + #stop-button,
|
||||
#urlbar-container[combined] + #reload-button,
|
||||
toolbar:not([mode="icons"]) > #urlbar-container > #urlbar > toolbarbutton,
|
||||
toolbar[mode="icons"] > #urlbar-container > #urlbar > #urlbar-reload-button:not([displaystop]) + #urlbar-stop-button,
|
||||
toolbar[mode="icons"] > #urlbar-container > #urlbar > #urlbar-reload-button[displaystop],
|
||||
toolbar[mode="icons"] > #reload-button:not([displaystop]) + #stop-button,
|
||||
toolbar[mode="icons"] > #reload-button[displaystop] {
|
||||
#urlbar-reload-button:not([displaystop]) + #urlbar-stop-button,
|
||||
#urlbar-reload-button[displaystop],
|
||||
#reload-button:not([displaystop]) + #stop-button,
|
||||
#reload-button[displaystop] {
|
||||
visibility: collapse;
|
||||
}
|
||||
|
||||
@ -439,14 +463,6 @@ window[chromehidden~="toolbar"] toolbar:not(.toolbar-primary):not(.chromeclass-m
|
||||
min-width: 1px;
|
||||
}
|
||||
|
||||
#nav-bar[mode="text"] > #window-controls > toolbarbutton > .toolbarbutton-icon {
|
||||
display: -moz-box;
|
||||
}
|
||||
|
||||
#nav-bar[mode="text"] > #window-controls > toolbarbutton > .toolbarbutton-text {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* ::::: Ctrl-Tab Panel ::::: */
|
||||
|
||||
.ctrlTab-preview > html|img,
|
||||
|
@ -91,6 +91,12 @@ XPCOMUtils.defineLazyModuleGetter(this, "TelemetryStopwatch",
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "AboutHomeUtils",
|
||||
"resource:///modules/AboutHomeUtils.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "gCustomizeMode", function() {
|
||||
let scope = {};
|
||||
Cu.import("resource:///modules/CustomizeMode.jsm", scope);
|
||||
return new scope.CustomizeMode(window);
|
||||
});
|
||||
|
||||
#ifdef MOZ_SERVICES_SYNC
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "Weave",
|
||||
"resource://services-sync/main.js");
|
||||
@ -147,6 +153,7 @@ let gInitialPages = [
|
||||
];
|
||||
|
||||
#include browser-addons.js
|
||||
#include browser-customization.js
|
||||
#include browser-feeds.js
|
||||
#include browser-fullScreen.js
|
||||
#include browser-fullZoom.js
|
||||
@ -1031,7 +1038,9 @@ var gBrowserInit = {
|
||||
OfflineApps.init();
|
||||
IndexedDBPromptHelper.init();
|
||||
gFormSubmitObserver.init();
|
||||
PanelUI.init();
|
||||
SocialUI.init();
|
||||
LightweightThemeListener.init();
|
||||
AddonManager.addAddonListener(AddonsMgrListener);
|
||||
WebrtcIndicator.init();
|
||||
|
||||
@ -1266,6 +1275,11 @@ var gBrowserInit = {
|
||||
window.addEventListener("mousemove", MousePosTracker, false);
|
||||
window.addEventListener("dragover", MousePosTracker, false);
|
||||
|
||||
window.addEventListener("CustomizationStart", CustomizationHandler, false);
|
||||
window.addEventListener("CustomizationEnd", CustomizationHandler, false);
|
||||
|
||||
gCustomizeMode.init();
|
||||
|
||||
// End startup crash tracking after a delay to catch crashes while restoring
|
||||
// tabs and to postpone saving the pref to disk.
|
||||
try {
|
||||
@ -1361,6 +1375,9 @@ var gBrowserInit = {
|
||||
IndexedDBPromptHelper.uninit();
|
||||
AddonManager.removeAddonListener(AddonsMgrListener);
|
||||
SocialUI.uninit();
|
||||
LightweightThemeListener.uninit();
|
||||
gCustomizeMode.uninit();
|
||||
PanelUI.uninit();
|
||||
}
|
||||
|
||||
// Final window teardown, do this last.
|
||||
@ -3310,118 +3327,13 @@ function OpenBrowserWindow(options)
|
||||
return win;
|
||||
}
|
||||
|
||||
var gCustomizeSheet = false;
|
||||
//XXXunf Are these still useful to keep around?
|
||||
function BrowserCustomizeToolbar() {
|
||||
// Disable the toolbar context menu items
|
||||
var menubar = document.getElementById("main-menubar");
|
||||
for (let childNode of menubar.childNodes)
|
||||
childNode.setAttribute("disabled", true);
|
||||
|
||||
var cmd = document.getElementById("cmd_CustomizeToolbars");
|
||||
cmd.setAttribute("disabled", "true");
|
||||
|
||||
var splitter = document.getElementById("urlbar-search-splitter");
|
||||
if (splitter)
|
||||
splitter.parentNode.removeChild(splitter);
|
||||
|
||||
CombinedStopReload.uninit();
|
||||
|
||||
PlacesToolbarHelper.customizeStart();
|
||||
BookmarksMenuButton.customizeStart();
|
||||
DownloadsButton.customizeStart();
|
||||
|
||||
TabsInTitlebar.allowedBy("customizing-toolbars", false);
|
||||
|
||||
var customizeURL = "chrome://global/content/customizeToolbar.xul";
|
||||
gCustomizeSheet = getBoolPref("toolbar.customization.usesheet", false);
|
||||
|
||||
if (gCustomizeSheet) {
|
||||
let sheetFrame = document.createElement("iframe");
|
||||
let panel = document.getElementById("customizeToolbarSheetPopup");
|
||||
sheetFrame.id = "customizeToolbarSheetIFrame";
|
||||
sheetFrame.toolbox = gNavToolbox;
|
||||
sheetFrame.panel = panel;
|
||||
sheetFrame.setAttribute("style", panel.getAttribute("sheetstyle"));
|
||||
panel.appendChild(sheetFrame);
|
||||
|
||||
// Open the panel, but make it invisible until the iframe has loaded so
|
||||
// that the user doesn't see a white flash.
|
||||
panel.style.visibility = "hidden";
|
||||
gNavToolbox.addEventListener("beforecustomization", function onBeforeCustomization() {
|
||||
gNavToolbox.removeEventListener("beforecustomization", onBeforeCustomization, false);
|
||||
panel.style.removeProperty("visibility");
|
||||
}, false);
|
||||
|
||||
sheetFrame.setAttribute("src", customizeURL);
|
||||
|
||||
panel.openPopup(gNavToolbox, "after_start", 0, 0);
|
||||
} else {
|
||||
window.openDialog(customizeURL,
|
||||
"CustomizeToolbar",
|
||||
"chrome,titlebar,toolbar,location,resizable,dependent",
|
||||
gNavToolbox);
|
||||
}
|
||||
gCustomizeMode.enter();
|
||||
}
|
||||
|
||||
function BrowserToolboxCustomizeDone(aToolboxChanged) {
|
||||
if (gCustomizeSheet) {
|
||||
document.getElementById("customizeToolbarSheetPopup").hidePopup();
|
||||
let iframe = document.getElementById("customizeToolbarSheetIFrame");
|
||||
iframe.parentNode.removeChild(iframe);
|
||||
}
|
||||
|
||||
// Update global UI elements that may have been added or removed
|
||||
if (aToolboxChanged) {
|
||||
gURLBar = document.getElementById("urlbar");
|
||||
|
||||
gProxyFavIcon = document.getElementById("page-proxy-favicon");
|
||||
gHomeButton.updateTooltip();
|
||||
gIdentityHandler._cacheElements();
|
||||
window.XULBrowserWindow.init();
|
||||
|
||||
#ifndef XP_MACOSX
|
||||
updateEditUIVisibility();
|
||||
#endif
|
||||
|
||||
// Hacky: update the PopupNotifications' object's reference to the iconBox,
|
||||
// if it already exists, since it may have changed if the URL bar was
|
||||
// added/removed.
|
||||
if (!window.__lookupGetter__("PopupNotifications"))
|
||||
PopupNotifications.iconBox = document.getElementById("notification-popup-box");
|
||||
}
|
||||
|
||||
PlacesToolbarHelper.customizeDone();
|
||||
BookmarksMenuButton.customizeDone();
|
||||
DownloadsButton.customizeDone();
|
||||
|
||||
// The url bar splitter state is dependent on whether stop/reload
|
||||
// and the location bar are combined, so we need this ordering
|
||||
CombinedStopReload.init();
|
||||
UpdateUrlbarSearchSplitterState();
|
||||
setUrlAndSearchBarWidthForConditionalForwardButton();
|
||||
|
||||
// Update the urlbar
|
||||
if (gURLBar) {
|
||||
URLBarSetURI();
|
||||
XULBrowserWindow.asyncUpdateUI();
|
||||
BookmarksMenuButton.updateStarState();
|
||||
SocialMark.updateMarkState();
|
||||
}
|
||||
|
||||
TabsInTitlebar.allowedBy("customizing-toolbars", true);
|
||||
|
||||
// Re-enable parts of the UI we disabled during the dialog
|
||||
var menubar = document.getElementById("main-menubar");
|
||||
for (let childNode of menubar.childNodes)
|
||||
childNode.setAttribute("disabled", false);
|
||||
var cmd = document.getElementById("cmd_CustomizeToolbars");
|
||||
cmd.removeAttribute("disabled");
|
||||
|
||||
// make sure to re-enable click-and-hold
|
||||
if (!getBoolPref("ui.click_hold_context_menus", false))
|
||||
SetClickAndHoldHandlers();
|
||||
|
||||
gBrowser.selectedBrowser.focus();
|
||||
gCustomizeMode.exit(aToolboxChanged);
|
||||
}
|
||||
|
||||
function BrowserToolboxCustomizeChange(aType) {
|
||||
@ -3592,6 +3504,9 @@ var XULBrowserWindow = {
|
||||
startTime: 0,
|
||||
statusText: "",
|
||||
isBusy: false,
|
||||
// The pages in this array should be kept in sync with what pages that
|
||||
// panelUIOverlay.xul is set to overlay in
|
||||
// browser/components/customizableui/content/jar.mn
|
||||
inContentWhitelist: ["about:addons", "about:downloads", "about:permissions",
|
||||
"about:sync-progress", "about:preferences"],
|
||||
|
||||
@ -4143,8 +4058,7 @@ var CombinedStopReload = {
|
||||
var stop = document.getElementById("stop-button");
|
||||
|
||||
if (urlbar) {
|
||||
if (urlbar.parentNode.getAttribute("mode") != "icons" ||
|
||||
!reload || urlbar.nextSibling != reload ||
|
||||
if (!reload || urlbar.nextSibling != reload ||
|
||||
!stop || reload.nextSibling != stop)
|
||||
urlbar.removeAttribute("combined");
|
||||
else {
|
||||
@ -4561,10 +4475,19 @@ var TabsInTitlebar = {
|
||||
this._readPref();
|
||||
Services.prefs.addObserver(this._prefName, this, false);
|
||||
|
||||
// Don't trust the initial value of the sizemode attribute; wait for
|
||||
// the resize event (handled in tabbrowser.xml).
|
||||
this.allowedBy("sizemode", false);
|
||||
|
||||
// We need to update the appearance of the titlebar when the menu changes
|
||||
// from the active to the inactive state. We can't, however, rely on
|
||||
// DOMMenuBarInactive, because the menu fires this event and then removes
|
||||
// the inactive attribute after an event-loop spin.
|
||||
//
|
||||
// Because updating the appearance involves sampling the heights and margins
|
||||
// of various elements, it's important that the layout be more or less
|
||||
// settled before updating the titlebar. So instead of listening to
|
||||
// DOMMenuBarActive and DOMMenuBarInactive, we use a MutationObserver to
|
||||
// watch the "invalid" attribute directly.
|
||||
let menu = document.getElementById("toolbar-menubar");
|
||||
this._menuObserver = new MutationObserver(this._onMenuMutate);
|
||||
this._menuObserver.observe(menu, {attributes: true});
|
||||
this._initialized = true;
|
||||
#endif
|
||||
},
|
||||
@ -4574,17 +4497,23 @@ var TabsInTitlebar = {
|
||||
if (allow) {
|
||||
if (condition in this._disallowed) {
|
||||
delete this._disallowed[condition];
|
||||
this._update();
|
||||
this._update(true);
|
||||
}
|
||||
} else {
|
||||
if (!(condition in this._disallowed)) {
|
||||
this._disallowed[condition] = null;
|
||||
this._update();
|
||||
this._update(true);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
},
|
||||
|
||||
updateAppearance: function updateAppearance(aForce) {
|
||||
#ifdef CAN_DRAW_IN_TITLEBAR
|
||||
this._update(aForce);
|
||||
#endif
|
||||
},
|
||||
|
||||
get enabled() {
|
||||
return document.documentElement.getAttribute("tabsintitlebar") == "true";
|
||||
},
|
||||
@ -4595,35 +4524,73 @@ var TabsInTitlebar = {
|
||||
this._readPref();
|
||||
},
|
||||
|
||||
_onMenuMutate: function (aMutations) {
|
||||
// We don't care about restored windows, since the menu shouldn't be
|
||||
// pushing the tab-strip down.
|
||||
if (document.documentElement.getAttribute("sizemode") == "normal") {
|
||||
return;
|
||||
}
|
||||
|
||||
for (let mutation of aMutations) {
|
||||
if (mutation.attributeName == "inactive" ||
|
||||
mutation.attributeName == "autohide") {
|
||||
TabsInTitlebar._update(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
_initialized: false,
|
||||
_disallowed: {},
|
||||
_prefName: "browser.tabs.drawInTitlebar",
|
||||
_lastSizeMode: null,
|
||||
|
||||
_readPref: function () {
|
||||
this.allowedBy("pref",
|
||||
Services.prefs.getBoolPref(this._prefName));
|
||||
},
|
||||
|
||||
_update: function () {
|
||||
_update: function (aForce=false) {
|
||||
if (!this._initialized || window.fullScreen)
|
||||
return;
|
||||
|
||||
let allowed = true;
|
||||
|
||||
if (!aForce) {
|
||||
// _update is called on resize events, because the window is not ready
|
||||
// after sizemode events. However, we only care about the event when the
|
||||
// sizemode is different from the last time we updated the appearance of
|
||||
// the tabs in the titlebar.
|
||||
let sizemode = document.documentElement.getAttribute("sizemode");
|
||||
if (this._lastSizeMode == sizemode) {
|
||||
return;
|
||||
}
|
||||
this._lastSizeMode = sizemode;
|
||||
}
|
||||
|
||||
for (let something in this._disallowed) {
|
||||
allowed = false;
|
||||
break;
|
||||
}
|
||||
|
||||
if (allowed == this.enabled)
|
||||
return;
|
||||
|
||||
function $(id) document.getElementById(id);
|
||||
|
||||
let titlebar = $("titlebar");
|
||||
let titlebarContent = $("titlebar-content");
|
||||
let menubar = $("toolbar-menubar");
|
||||
|
||||
// Reset the margins and padding that _update modifies so that we can take
|
||||
// accurate measurements.
|
||||
titlebarContent.style.marginBottom = "";
|
||||
titlebar.style.marginBottom = "";
|
||||
menubar.style.paddingBottom = "";
|
||||
|
||||
if (allowed) {
|
||||
function rect(ele) ele.getBoundingClientRect();
|
||||
// We set the tabsintitlebar attribute first so that our CSS for
|
||||
// tabsintitlebar manifests before we do our measurements.
|
||||
document.documentElement.setAttribute("tabsintitlebar", "true");
|
||||
|
||||
let tabsToolbar = $("TabsToolbar");
|
||||
function rect(ele) ele.getBoundingClientRect();
|
||||
|
||||
#ifdef MENUBAR_CAN_AUTOHIDE
|
||||
let appmenuButtonBox = $("appmenu-button-container");
|
||||
@ -4631,26 +4598,62 @@ var TabsInTitlebar = {
|
||||
#endif
|
||||
let captionButtonsBox = $("titlebar-buttonbox");
|
||||
this._sizePlaceholder("caption-buttons", rect(captionButtonsBox).width);
|
||||
#ifdef XP_MACOSX
|
||||
let fullscreenButton = $("titlebar-fullscreen-button");
|
||||
this._sizePlaceholder("fullscreen-button", rect(fullscreenButton).width);
|
||||
#endif
|
||||
let titlebarContentHeight = rect(titlebarContent).height;
|
||||
let menuHeight = this._outerHeight(menubar);
|
||||
|
||||
let tabsToolbarRect = rect(tabsToolbar);
|
||||
let titlebarTop = rect($("titlebar-content")).top;
|
||||
titlebar.style.marginBottom = - Math.min(tabsToolbarRect.top - titlebarTop,
|
||||
tabsToolbarRect.height) + "px";
|
||||
// If the titlebar is taller than the menubar, add more padding to the
|
||||
// bottom of the menubar so that it matches.
|
||||
if (menuHeight && titlebarContentHeight > menuHeight) {
|
||||
let menuTitlebarDelta = titlebarContentHeight - menuHeight;
|
||||
menubar.style.paddingBottom = menuTitlebarDelta + "px";
|
||||
menuHeight += menuTitlebarDelta;
|
||||
}
|
||||
|
||||
document.documentElement.setAttribute("tabsintitlebar", "true");
|
||||
// Next, we calculate how much we need to stretch the titlebar down to
|
||||
// go all the way to the bottom of the tab strip.
|
||||
let tabsToolbar = $("TabsToolbar");
|
||||
let tabAndMenuHeight = this._outerHeight(tabsToolbar) + menuHeight;
|
||||
titlebarContent.style.marginBottom = tabAndMenuHeight + "px";
|
||||
|
||||
if (!this._draghandle) {
|
||||
// Finally, we have to determine how much to bring up the elements below
|
||||
// the titlebar. We start with a baseHeight of tabAndMenuHeight, to offset
|
||||
// the amount we added to the titlebar content. Then, we have two cases:
|
||||
//
|
||||
// 1) The titlebar is larger than the tabAndMenuHeight. This can happen in
|
||||
// large font mode with the menu autohidden. In this case, we want to
|
||||
// add tabAndMenuHeight, since this should line up the bottom of the
|
||||
// tabstrip with the bottom of the titlebar.
|
||||
//
|
||||
// 2) The titlebar is equal to or smaller than the tabAndMenuHeight. This
|
||||
// is the more common case, and occurs with normal font sizes. In this
|
||||
// case, we want to bring the menu and tabstrip right up to the top of
|
||||
// the titlebar, so we add the titlebarContentHeight to the baseHeight.
|
||||
let baseHeight = tabAndMenuHeight;
|
||||
baseHeight += (titlebarContentHeight > tabAndMenuHeight) ? tabAndMenuHeight
|
||||
: titlebarContentHeight;
|
||||
titlebar.style.marginBottom = "-" + baseHeight + "px";
|
||||
|
||||
if (!this._draghandles) {
|
||||
this._draghandles = {};
|
||||
let tmp = {};
|
||||
Components.utils.import("resource://gre/modules/WindowDraggingUtils.jsm", tmp);
|
||||
this._draghandle = new tmp.WindowDraggingElement(tabsToolbar);
|
||||
this._draghandle.mouseDownCheck = function () {
|
||||
|
||||
let mouseDownCheck = function () {
|
||||
return !this._dragBindingAlive && TabsInTitlebar.enabled;
|
||||
};
|
||||
|
||||
this._draghandles.tabsToolbar = new tmp.WindowDraggingElement(tabsToolbar);
|
||||
this._draghandles.tabsToolbar.mouseDownCheck = mouseDownCheck;
|
||||
|
||||
this._draghandles.navToolbox = new tmp.WindowDraggingElement(gNavToolbox);
|
||||
this._draghandles.navToolbox.mouseDownCheck = mouseDownCheck;
|
||||
}
|
||||
} else {
|
||||
document.documentElement.removeAttribute("tabsintitlebar");
|
||||
|
||||
titlebar.style.marginBottom = "";
|
||||
}
|
||||
},
|
||||
|
||||
@ -4658,12 +4661,30 @@ var TabsInTitlebar = {
|
||||
Array.forEach(document.querySelectorAll(".titlebar-placeholder[type='"+ type +"']"),
|
||||
function (node) { node.width = width; });
|
||||
},
|
||||
|
||||
/**
|
||||
* Retrieve the height of an element, including its top and bottom
|
||||
* margins.
|
||||
*
|
||||
* @param ele
|
||||
* The element to measure.
|
||||
* @return
|
||||
* The height and margins as an integer. If the height of the element
|
||||
* is 0, then this returns 0, regardless of what the margins are.
|
||||
*/
|
||||
_outerHeight: function (ele) {
|
||||
let cstyle = document.defaultView.getComputedStyle(ele);
|
||||
let margins = parseInt(cstyle.marginTop) + parseInt(cstyle.marginBottom);
|
||||
let height = ele.getBoundingClientRect().height;
|
||||
return height > 0 ? Math.abs(height + margins) : 0;
|
||||
},
|
||||
#endif
|
||||
|
||||
uninit: function () {
|
||||
#ifdef CAN_DRAW_IN_TITLEBAR
|
||||
this._initialized = false;
|
||||
Services.prefs.removeObserver(this._prefName, this);
|
||||
this._menuObserver.disconnect();
|
||||
#endif
|
||||
}
|
||||
};
|
||||
@ -4676,14 +4697,14 @@ function updateAppButtonDisplay() {
|
||||
document.getElementById("toolbar-menubar").getAttribute("autohide") == "true";
|
||||
|
||||
#ifdef CAN_DRAW_IN_TITLEBAR
|
||||
document.getElementById("titlebar").hidden = !displayAppButton;
|
||||
document.getElementById("titlebar").hidden = gInPrintPreviewMode;
|
||||
|
||||
if (displayAppButton)
|
||||
if (!gInPrintPreviewMode)
|
||||
document.documentElement.setAttribute("chromemargin", "0,2,2,2");
|
||||
else
|
||||
document.documentElement.removeAttribute("chromemargin");
|
||||
|
||||
TabsInTitlebar.allowedBy("drawing-in-titlebar", displayAppButton);
|
||||
TabsInTitlebar.allowedBy("drawing-in-titlebar", !gInPrintPreviewMode);
|
||||
#else
|
||||
document.getElementById("appmenu-toolbar-button").hidden =
|
||||
!displayAppButton;
|
||||
@ -6724,12 +6745,6 @@ let gPrivateBrowsingUI = {
|
||||
document.getElementById("Tools:Sanitize").setAttribute("disabled", "true");
|
||||
|
||||
if (window.location.href == getBrowserURL()) {
|
||||
#ifdef XP_MACOSX
|
||||
if (!PrivateBrowsingUtils.permanentPrivateBrowsing) {
|
||||
document.documentElement.setAttribute("drawintitlebar", true);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Adjust the window's title
|
||||
let docElement = document.documentElement;
|
||||
if (!PrivateBrowsingUtils.permanentPrivateBrowsing) {
|
||||
|
@ -9,7 +9,9 @@
|
||||
<?xml-stylesheet href="chrome://browser/content/browser.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://browser/content/places/places.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://browser/skin/devtools/common.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://browser/skin/customizableui/panelUIOverlay.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://browser/skin/" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://browser/skin/browser-lightweightTheme.css" type="text/css"?>
|
||||
|
||||
<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://browser/content/baseMenuOverlay.xul"?>
|
||||
@ -22,6 +24,7 @@
|
||||
<window id="main-window"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
onload="gBrowserInit.onLoad()" onunload="gBrowserInit.onUnload()" onclose="return WindowIsClosing();"
|
||||
title="&mainWindow.title;@PRE_RELEASE_SUFFIX@"
|
||||
@ -32,6 +35,7 @@
|
||||
titlemodifier=""
|
||||
titlemodifier_normal=""
|
||||
titlemodifier_privatebrowsing="&mainWindow.titlePrivateBrowsingSuffix;"
|
||||
chromemargin="0,-1,-1,-1"
|
||||
#else
|
||||
title_privatebrowsing="&mainWindow.titlemodifier;@PRE_RELEASE_SUFFIX@ &mainWindow.titlePrivateBrowsingSuffix;"
|
||||
titlemodifier="&mainWindow.titlemodifier;@PRE_RELEASE_SUFFIX@"
|
||||
@ -418,6 +422,7 @@
|
||||
</popupnotificationcontent>
|
||||
</popupnotification>
|
||||
|
||||
#include ../../components/customizableui/content/panelUI.inc.xul
|
||||
</popupset>
|
||||
|
||||
#ifdef CAN_DRAW_IN_TITLEBAR
|
||||
@ -434,13 +439,20 @@
|
||||
</hbox>
|
||||
#endif
|
||||
<spacer id="titlebar-spacer" flex="1"/>
|
||||
<hbox id="titlebar-buttonbox-container" align="start">
|
||||
<hbox id="titlebar-buttonbox-container" align="start"
|
||||
#ifdef XP_MACOSX
|
||||
ordinal="0"
|
||||
#endif
|
||||
>
|
||||
<hbox id="titlebar-buttonbox">
|
||||
<toolbarbutton class="titlebar-button" id="titlebar-min" oncommand="window.minimize();"/>
|
||||
<toolbarbutton class="titlebar-button" id="titlebar-max" oncommand="onTitlebarMaxClick();"/>
|
||||
<toolbarbutton class="titlebar-button" id="titlebar-close" command="cmd_closeWindow"/>
|
||||
</hbox>
|
||||
</hbox>
|
||||
#ifdef XP_MACOSX
|
||||
<hbox id="titlebar-fullscreen-button" ordinal="1000"/>
|
||||
#endif
|
||||
</hbox>
|
||||
</vbox>
|
||||
#endif
|
||||
@ -468,8 +480,21 @@
|
||||
</toolbaritem>
|
||||
|
||||
#ifdef CAN_DRAW_IN_TITLEBAR
|
||||
#ifdef MENUBAR_CAN_AUTOHIDE
|
||||
<hbox class="titlebar-placeholder" type="appmenu-button" ordinal="0"/>
|
||||
<hbox class="titlebar-placeholder" type="caption-buttons" ordinal="1000"/>
|
||||
#endif
|
||||
|
||||
<hbox class="titlebar-placeholder" type="caption-buttons"
|
||||
#ifdef XP_MACOSX
|
||||
ordinal="0"
|
||||
#else
|
||||
ordinal="1000"
|
||||
#endif
|
||||
/>
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
<hbox class="titlebar-placeholder" type="fullscreen-button" ordinal="1000"/>
|
||||
#endif
|
||||
#endif
|
||||
</toolbar>
|
||||
|
||||
@ -478,280 +503,151 @@
|
||||
fullscreentoolbar="true" mode="icons" customizable="true"
|
||||
iconsize="large"
|
||||
defaultset="unified-back-forward-button,urlbar-container,reload-button,stop-button,search-container,webrtc-status-button,bookmarks-menu-button,downloads-button,home-button,window-controls"
|
||||
customizationtarget="nav-bar-customizationtarget"
|
||||
context="toolbar-context-menu">
|
||||
|
||||
<toolbaritem id="unified-back-forward-button" class="chromeclass-toolbar-additional"
|
||||
context="backForwardMenu" removable="true"
|
||||
forwarddisabled="true"
|
||||
title="&backForwardItem.title;">
|
||||
<toolbarbutton id="back-button" class="toolbarbutton-1"
|
||||
label="&backCmd.label;"
|
||||
command="Browser:BackOrBackDuplicate"
|
||||
onclick="checkForMiddleClick(this, event);"
|
||||
tooltip="back-button-tooltip"/>
|
||||
<toolbarbutton id="forward-button" class="toolbarbutton-1"
|
||||
label="&forwardCmd.label;"
|
||||
command="Browser:ForwardOrForwardDuplicate"
|
||||
onclick="checkForMiddleClick(this, event);"
|
||||
tooltip="forward-button-tooltip"/>
|
||||
<dummyobservertarget hidden="true"
|
||||
onbroadcast="if (this.getAttribute('disabled') == 'true')
|
||||
this.parentNode.setAttribute('forwarddisabled', 'true');
|
||||
else
|
||||
this.parentNode.removeAttribute('forwarddisabled');">
|
||||
<observes element="Browser:ForwardOrForwardDuplicate" attribute="disabled"/>
|
||||
</dummyobservertarget>
|
||||
</toolbaritem>
|
||||
|
||||
<toolbaritem id="urlbar-container" align="center" flex="400" persist="width" combined="true"
|
||||
title="&locationItem.title;" class="chromeclass-location" removable="true">
|
||||
<textbox id="urlbar" flex="1"
|
||||
placeholder="&urlbar.placeholder2;"
|
||||
type="autocomplete"
|
||||
autocompletesearch="urlinline history"
|
||||
autocompletesearchparam="enable-actions"
|
||||
autocompletepopup="PopupAutoCompleteRichResult"
|
||||
completeselectedindex="true"
|
||||
tabscrolling="true"
|
||||
showcommentcolumn="true"
|
||||
showimagecolumn="true"
|
||||
enablehistory="true"
|
||||
maxrows="6"
|
||||
newlines="stripsurroundingwhitespace"
|
||||
oninput="gBrowser.userTypedValue = this.value;"
|
||||
ontextentered="this.handleCommand(param);"
|
||||
ontextreverted="return this.handleRevert();"
|
||||
pageproxystate="invalid"
|
||||
onfocus="document.getElementById('identity-box').style.MozUserFocus= 'normal'"
|
||||
onblur="setTimeout(function() document.getElementById('identity-box').style.MozUserFocus = '', 0);">
|
||||
<box id="notification-popup-box" hidden="true" align="center">
|
||||
<image id="default-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="identity-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="geo-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="addons-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="indexedDB-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="password-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="webapps-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="plugins-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="web-notifications-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="blocked-plugins-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="mixed-content-blocked-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="webRTC-shareDevices-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="webRTC-sharingDevices-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="pointerLock-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="servicesInstall-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
</box>
|
||||
<!-- Use onclick instead of normal popup= syntax since the popup
|
||||
code fires onmousedown, and hence eats our favicon drag events.
|
||||
We only add the identity-box button to the tab order when the location bar
|
||||
has focus, otherwise pressing F6 focuses it instead of the location bar -->
|
||||
<box id="identity-box" role="button"
|
||||
align="center"
|
||||
onclick="gIdentityHandler.handleIdentityButtonEvent(event);"
|
||||
onkeypress="gIdentityHandler.handleIdentityButtonEvent(event);"
|
||||
ondragstart="gIdentityHandler.onDragStart(event);">
|
||||
<image id="page-proxy-favicon"
|
||||
onclick="PageProxyClickHandler(event);"
|
||||
pageproxystate="invalid"/>
|
||||
<hbox id="identity-icon-labels">
|
||||
<label id="identity-icon-label" class="plain" flex="1"/>
|
||||
<label id="identity-icon-country-label" class="plain"/>
|
||||
</hbox>
|
||||
</box>
|
||||
<box id="urlbar-display-box" align="center">
|
||||
<label id="urlbar-display" value="&urlbar.switchToTab.label;"/>
|
||||
</box>
|
||||
<hbox id="urlbar-icons">
|
||||
<image id="page-report-button"
|
||||
class="urlbar-icon"
|
||||
hidden="true"
|
||||
tooltiptext="&pageReportIcon.tooltip;"
|
||||
onclick="gPopupBlockerObserver.onReportButtonClick(event);"/>
|
||||
<image id="go-button"
|
||||
class="urlbar-icon"
|
||||
tooltiptext="&goEndCap.tooltip;"
|
||||
onclick="gURLBar.handleCommand(event);"/>
|
||||
</hbox>
|
||||
<toolbarbutton id="urlbar-go-button"
|
||||
class="chromeclass-toolbar-additional"
|
||||
onclick="gURLBar.handleCommand(event);"
|
||||
tooltiptext="&goEndCap.tooltip;"/>
|
||||
<toolbarbutton id="urlbar-reload-button"
|
||||
class="chromeclass-toolbar-additional"
|
||||
command="Browser:ReloadOrDuplicate"
|
||||
<hbox id="nav-bar-customizationtarget" class="customization-target" flex="0">
|
||||
<toolbaritem id="unified-back-forward-button" class="chromeclass-toolbar-additional"
|
||||
context="backForwardMenu" removable="true"
|
||||
forwarddisabled="true"
|
||||
title="&backForwardItem.title;">
|
||||
<toolbarbutton id="back-button" class="toolbarbutton-1"
|
||||
label="&backCmd.label;"
|
||||
command="Browser:BackOrBackDuplicate"
|
||||
onclick="checkForMiddleClick(this, event);"
|
||||
tooltiptext="&reloadButton.tooltip;"/>
|
||||
<toolbarbutton id="urlbar-stop-button"
|
||||
class="chromeclass-toolbar-additional"
|
||||
command="Browser:Stop"
|
||||
tooltiptext="&stopButton.tooltip;"/>
|
||||
</textbox>
|
||||
</toolbaritem>
|
||||
tooltip="back-button-tooltip"/>
|
||||
<toolbarbutton id="forward-button" class="toolbarbutton-1"
|
||||
label="&forwardCmd.label;"
|
||||
command="Browser:ForwardOrForwardDuplicate"
|
||||
onclick="checkForMiddleClick(this, event);"
|
||||
tooltip="forward-button-tooltip"/>
|
||||
<dummyobservertarget hidden="true"
|
||||
onbroadcast="if (this.getAttribute('disabled') == 'true')
|
||||
this.parentNode.setAttribute('forwarddisabled', 'true');
|
||||
else
|
||||
this.parentNode.removeAttribute('forwarddisabled');">
|
||||
<observes element="Browser:ForwardOrForwardDuplicate" attribute="disabled"/>
|
||||
</dummyobservertarget>
|
||||
</toolbaritem>
|
||||
|
||||
<toolbarbutton id="reload-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
|
||||
label="&reloadCmd.label;" removable="true"
|
||||
command="Browser:ReloadOrDuplicate"
|
||||
onclick="checkForMiddleClick(this, event);"
|
||||
tooltiptext="&reloadButton.tooltip;"/>
|
||||
|
||||
<toolbarbutton id="stop-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
|
||||
label="&stopCmd.label;" removable="true"
|
||||
command="Browser:Stop"
|
||||
tooltiptext="&stopButton.tooltip;"/>
|
||||
|
||||
<toolbaritem id="search-container" title="&searchItem.title;"
|
||||
align="center" class="chromeclass-toolbar-additional"
|
||||
flex="100" persist="width" removable="true">
|
||||
<searchbar id="searchbar" flex="1"/>
|
||||
</toolbaritem>
|
||||
|
||||
<toolbarbutton id="webrtc-status-button"
|
||||
class="toolbarbutton-1 chromeclass-toolbar-additional"
|
||||
type="menu"
|
||||
<toolbaritem id="urlbar-container" align="center" flex="400" persist="width" combined="true"
|
||||
title="&locationItem.title;" class="chromeclass-location" removable="true">
|
||||
<textbox id="urlbar" flex="1"
|
||||
placeholder="&urlbar.placeholder2;"
|
||||
type="autocomplete"
|
||||
autocompletesearch="urlinline history"
|
||||
autocompletesearchparam="enable-actions"
|
||||
autocompletepopup="PopupAutoCompleteRichResult"
|
||||
completeselectedindex="true"
|
||||
tabscrolling="true"
|
||||
showcommentcolumn="true"
|
||||
showimagecolumn="true"
|
||||
enablehistory="true"
|
||||
maxrows="6"
|
||||
newlines="stripsurroundingwhitespace"
|
||||
oninput="gBrowser.userTypedValue = this.value;"
|
||||
ontextentered="this.handleCommand(param);"
|
||||
ontextreverted="return this.handleRevert();"
|
||||
pageproxystate="invalid"
|
||||
onfocus="document.getElementById('identity-box').style.MozUserFocus= 'normal'"
|
||||
onblur="setTimeout(function() document.getElementById('identity-box').style.MozUserFocus = '', 0);">
|
||||
<box id="notification-popup-box" hidden="true" align="center">
|
||||
<image id="default-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="identity-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="geo-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="addons-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="indexedDB-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="password-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="webapps-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="plugins-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="web-notifications-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="blocked-plugins-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="mixed-content-blocked-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="webRTC-shareDevices-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="webRTC-sharingDevices-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="pointerLock-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="servicesInstall-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
</box>
|
||||
<!-- Use onclick instead of normal popup= syntax since the popup
|
||||
code fires onmousedown, and hence eats our favicon drag events.
|
||||
We only add the identity-box button to the tab order when the location bar
|
||||
has focus, otherwise pressing F6 focuses it instead of the location bar -->
|
||||
<box id="identity-box" role="button"
|
||||
align="center"
|
||||
onclick="gIdentityHandler.handleIdentityButtonEvent(event);"
|
||||
onkeypress="gIdentityHandler.handleIdentityButtonEvent(event);"
|
||||
ondragstart="gIdentityHandler.onDragStart(event);">
|
||||
<image id="page-proxy-favicon"
|
||||
onclick="PageProxyClickHandler(event);"
|
||||
pageproxystate="invalid"/>
|
||||
<hbox id="identity-icon-labels">
|
||||
<label id="identity-icon-label" class="plain" flex="1"/>
|
||||
<label id="identity-icon-country-label" class="plain"/>
|
||||
</hbox>
|
||||
</box>
|
||||
<box id="urlbar-display-box" align="center">
|
||||
<label id="urlbar-display" value="&urlbar.switchToTab.label;"/>
|
||||
</box>
|
||||
<hbox id="urlbar-icons">
|
||||
<image id="page-report-button"
|
||||
class="urlbar-icon"
|
||||
hidden="true"
|
||||
orient="horizontal"
|
||||
label="&webrtcIndicatorButton.label;"
|
||||
tooltiptext="&webrtcIndicatorButton.tooltip;">
|
||||
<menupopup onpopupshowing="WebrtcIndicator.fillPopup(this);"
|
||||
onpopuphiding="WebrtcIndicator.clearPopup(this);"
|
||||
oncommand="WebrtcIndicator.menuCommand(event.target);"/>
|
||||
</toolbarbutton>
|
||||
tooltiptext="&pageReportIcon.tooltip;"
|
||||
onclick="gPopupBlockerObserver.onReportButtonClick(event);"/>
|
||||
<image id="go-button"
|
||||
class="urlbar-icon"
|
||||
tooltiptext="&goEndCap.tooltip;"
|
||||
onclick="gURLBar.handleCommand(event);"/>
|
||||
</hbox>
|
||||
<toolbarbutton id="urlbar-go-button"
|
||||
class="chromeclass-toolbar-additional"
|
||||
onclick="gURLBar.handleCommand(event);"
|
||||
tooltiptext="&goEndCap.tooltip;"/>
|
||||
<toolbarbutton id="urlbar-reload-button"
|
||||
class="chromeclass-toolbar-additional"
|
||||
command="Browser:ReloadOrDuplicate"
|
||||
onclick="checkForMiddleClick(this, event);"
|
||||
tooltiptext="&reloadButton.tooltip;"/>
|
||||
<toolbarbutton id="urlbar-stop-button"
|
||||
class="chromeclass-toolbar-additional"
|
||||
command="Browser:Stop"
|
||||
tooltiptext="&stopButton.tooltip;"/>
|
||||
</textbox>
|
||||
</toolbaritem>
|
||||
|
||||
<toolbarbutton id="bookmarks-menu-button"
|
||||
class="toolbarbutton-1 chromeclass-toolbar-additional"
|
||||
persist="class"
|
||||
removable="true"
|
||||
type="menu-button"
|
||||
label="&bookmarksMenuButton.label;"
|
||||
tooltiptext="&bookmarksMenuButton.tooltip;"
|
||||
ondragenter="PlacesMenuDNDHandler.onDragEnter(event);"
|
||||
ondragover="PlacesMenuDNDHandler.onDragOver(event);"
|
||||
ondragleave="PlacesMenuDNDHandler.onDragLeave(event);"
|
||||
ondrop="PlacesMenuDNDHandler.onDrop(event);"
|
||||
oncommand="BookmarksMenuButton.onCommand(event);">
|
||||
<menupopup id="BMB_bookmarksPopup"
|
||||
placespopup="true"
|
||||
context="placesContext"
|
||||
openInTabs="children"
|
||||
oncommand="BookmarksEventHandler.onCommand(event, this.parentNode._placesView);"
|
||||
onclick="BookmarksEventHandler.onClick(event, this.parentNode._placesView);"
|
||||
onpopupshowing="BookmarksMenuButton.onPopupShowing(event);
|
||||
if (!this.parentNode._placesView)
|
||||
new PlacesMenu(event, 'place:folder=BOOKMARKS_MENU');"
|
||||
tooltip="bhTooltip" popupsinherittooltip="true">
|
||||
<menuitem id="BMB_viewBookmarksToolbar"
|
||||
placesanonid="view-toolbar"
|
||||
toolbarId="PersonalToolbar"
|
||||
type="checkbox"
|
||||
oncommand="onViewToolbarCommand(event)"
|
||||
label="&viewBookmarksToolbar.label;"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="BMB_bookmarksShowAll"
|
||||
label="&showAllBookmarks2.label;"
|
||||
command="Browser:ShowAllBookmarks"
|
||||
key="manBookmarkKb"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="BMB_subscribeToPageMenuitem"
|
||||
#ifndef XP_MACOSX
|
||||
class="menuitem-iconic"
|
||||
#endif
|
||||
label="&subscribeToPageMenuitem.label;"
|
||||
oncommand="return FeedHandler.subscribeToFeed(null, event);"
|
||||
onclick="checkForMiddleClick(this, event);"
|
||||
observes="singleFeedMenuitemState"/>
|
||||
<menu id="BMB_subscribeToPageMenupopup"
|
||||
#ifndef XP_MACOSX
|
||||
class="menu-iconic"
|
||||
#endif
|
||||
label="&subscribeToPageMenupopup.label;"
|
||||
observes="multipleFeedsMenuState">
|
||||
<menupopup id="BMB_subscribeToPageSubmenuMenupopup"
|
||||
onpopupshowing="return FeedHandler.buildFeedList(event.target);"
|
||||
oncommand="return FeedHandler.subscribeToFeed(null, event);"
|
||||
onclick="checkForMiddleClick(this, event);"/>
|
||||
</menu>
|
||||
<menuseparator/>
|
||||
<menu id="BMB_bookmarksToolbar"
|
||||
placesanonid="toolbar-autohide"
|
||||
class="menu-iconic bookmark-item"
|
||||
label="&personalbarCmd.label;"
|
||||
container="true">
|
||||
<menupopup id="BMB_bookmarksToolbarPopup"
|
||||
placespopup="true"
|
||||
context="placesContext"
|
||||
onpopupshowing="if (!this.parentNode._placesView)
|
||||
new PlacesMenu(event, 'place:folder=TOOLBAR');"/>
|
||||
</menu>
|
||||
<menuseparator/>
|
||||
<!-- Bookmarks menu items -->
|
||||
<menuseparator builder="end"
|
||||
class="hide-if-empty-places-result"/>
|
||||
<menuitem id="BMB_unsortedBookmarks"
|
||||
label="&bookmarksMenuButton.unsorted.label;"
|
||||
oncommand="PlacesCommandHook.showPlacesOrganizer('UnfiledBookmarks');"
|
||||
class="menuitem-iconic"/>
|
||||
</menupopup>
|
||||
</toolbarbutton>
|
||||
<toolbarbutton id="reload-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
|
||||
label="&reloadCmd.label;" removable="true"
|
||||
command="Browser:ReloadOrDuplicate"
|
||||
onclick="checkForMiddleClick(this, event);"
|
||||
tooltiptext="&reloadButton.tooltip;"/>
|
||||
|
||||
<toolbarbutton id="home-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
|
||||
persist="class" removable="true"
|
||||
label="&homeButton.label;"
|
||||
ondragover="homeButtonObserver.onDragOver(event)"
|
||||
ondragenter="homeButtonObserver.onDragOver(event)"
|
||||
ondrop="homeButtonObserver.onDrop(event)"
|
||||
ondragexit="homeButtonObserver.onDragExit(event)"
|
||||
onclick="BrowserGoHome(event);"
|
||||
aboutHomeOverrideTooltip="&abouthome.pageTitle;"/>
|
||||
<toolbarbutton id="stop-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
|
||||
label="&stopCmd.label;" removable="true"
|
||||
command="Browser:Stop"
|
||||
tooltiptext="&stopButton.tooltip;"/>
|
||||
|
||||
<toolbaritem id="social-toolbar-item"
|
||||
<toolbarbutton id="webrtc-status-button"
|
||||
class="toolbarbutton-1 chromeclass-toolbar-additional"
|
||||
type="menu"
|
||||
hidden="true"
|
||||
orient="horizontal"
|
||||
label="&webrtcIndicatorButton.label;"
|
||||
tooltiptext="&webrtcIndicatorButton.tooltip;">
|
||||
<menupopup onpopupshowing="WebrtcIndicator.fillPopup(this);"
|
||||
onpopuphiding="WebrtcIndicator.clearPopup(this);"
|
||||
oncommand="WebrtcIndicator.menuCommand(event.target);"/>
|
||||
</toolbarbutton>
|
||||
</hbox>
|
||||
|
||||
<toolbaritem id="PanelUI-button"
|
||||
class="chromeclass-toolbar-additional"
|
||||
removable="false"
|
||||
title="&socialToolbar.title;"
|
||||
hidden="true"
|
||||
skipintoolbarset="true"
|
||||
observes="socialActiveBroadcaster">
|
||||
<toolbarbutton id="social-provider-button"
|
||||
title="&appmenu.title;">
|
||||
<toolbarbutton id="PanelUI-menu-button"
|
||||
class="toolbarbutton-1"
|
||||
type="menu">
|
||||
<menupopup id="social-statusarea-popup">
|
||||
<menuitem class="social-statusarea-user menuitem-iconic" pack="start" align="center"
|
||||
observes="socialBroadcaster_userDetails"
|
||||
oncommand="SocialUI.showProfile(); document.getElementById('social-statusarea-popup').hidePopup();">
|
||||
<image class="social-statusarea-user-portrait"
|
||||
observes="socialBroadcaster_userDetails"/>
|
||||
<vbox>
|
||||
<label class="social-statusarea-loggedInStatus"
|
||||
observes="socialBroadcaster_userDetails"/>
|
||||
</vbox>
|
||||
</menuitem>
|
||||
#ifndef XP_WIN
|
||||
<menuseparator class="social-statusarea-separator"/>
|
||||
#endif
|
||||
<menuitem class="social-toggle-sidebar-menuitem"
|
||||
type="checkbox"
|
||||
autocheck="false"
|
||||
command="Social:ToggleSidebar"
|
||||
label="&social.toggleSidebar.label;"
|
||||
accesskey="&social.toggleSidebar.accesskey;"/>
|
||||
<menuitem class="social-toggle-notifications-menuitem"
|
||||
type="checkbox"
|
||||
autocheck="false"
|
||||
command="Social:ToggleNotifications"
|
||||
label="&social.toggleNotifications.label;"
|
||||
accesskey="&social.toggleNotifications.accesskey;"/>
|
||||
<menuitem class="social-toggle-menuitem" command="Social:Toggle"/>
|
||||
<menuseparator class="social-statusarea-separator"/>
|
||||
<menuseparator class="social-provider-menu" hidden="true"/>
|
||||
<menuitem class="social-addons-menuitem" command="Social:Addons"
|
||||
label="&social.addons.label;"/>
|
||||
<menuitem label="&social.learnMore.label;"
|
||||
accesskey="&social.learnMore.accesskey;"
|
||||
oncommand="SocialUI.showLearnMore();"/>
|
||||
</menupopup>
|
||||
</toolbarbutton>
|
||||
<toolbarbutton id="social-mark-button"
|
||||
class="toolbarbutton-1"
|
||||
command="Social:TogglePageMark"/>
|
||||
label="&brandShortName;"
|
||||
tooltiptext="&appmenu.title;"
|
||||
oncommand="PanelUI.toggle(event);"/>
|
||||
</toolbaritem>
|
||||
|
||||
<hbox id="window-controls" hidden="true" pack="end">
|
||||
@ -898,8 +794,20 @@
|
||||
tooltiptext="&closeTab.label;"/>
|
||||
|
||||
#ifdef CAN_DRAW_IN_TITLEBAR
|
||||
#ifdef MENUBAR_CAN_AUTOHIDE
|
||||
<hbox class="titlebar-placeholder" type="appmenu-button" ordinal="0"/>
|
||||
<hbox class="titlebar-placeholder" type="caption-buttons" ordinal="1000"/>
|
||||
#endif
|
||||
<hbox class="titlebar-placeholder" type="caption-buttons"
|
||||
#ifdef XP_MACOSX
|
||||
ordinal="0"
|
||||
#else
|
||||
ordinal="1000"
|
||||
#endif
|
||||
/>
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
<hbox class="titlebar-placeholder" type="fullscreen-button"
|
||||
ordinal="1000"/>
|
||||
#endif
|
||||
</toolbar>
|
||||
|
||||
@ -908,6 +816,149 @@
|
||||
# Update primaryToolbarButtons in browser/themes/shared/browser.inc when adding
|
||||
# or removing default items with the toolbarbutton-1 class.
|
||||
|
||||
<toolbaritem id="search-container" title="&searchItem.title;"
|
||||
align="center" class="chromeclass-toolbar-additional"
|
||||
flex="100" persist="width" removable="true">
|
||||
<searchbar id="searchbar" flex="1"/>
|
||||
</toolbaritem>
|
||||
|
||||
<toolbarbutton id="bookmarks-menu-button"
|
||||
class="toolbarbutton-1 chromeclass-toolbar-additional"
|
||||
persist="class"
|
||||
removable="true"
|
||||
type="menu-button"
|
||||
label="&bookmarksMenuButton.label;"
|
||||
tooltiptext="&bookmarksMenuButton.tooltip;"
|
||||
ondragenter="PlacesMenuDNDHandler.onDragEnter(event);"
|
||||
ondragover="PlacesMenuDNDHandler.onDragOver(event);"
|
||||
ondragleave="PlacesMenuDNDHandler.onDragLeave(event);"
|
||||
ondrop="PlacesMenuDNDHandler.onDrop(event);"
|
||||
oncommand="BookmarksMenuButton.onCommand(event);">
|
||||
<menupopup id="BMB_bookmarksPopup"
|
||||
placespopup="true"
|
||||
context="placesContext"
|
||||
openInTabs="children"
|
||||
oncommand="BookmarksEventHandler.onCommand(event, this.parentNode._placesView);"
|
||||
onclick="BookmarksEventHandler.onClick(event, this.parentNode._placesView);"
|
||||
onpopupshowing="BookmarksMenuButton.onPopupShowing(event);
|
||||
if (!this.parentNode._placesView)
|
||||
new PlacesMenu(event, 'place:folder=BOOKMARKS_MENU');"
|
||||
tooltip="bhTooltip" popupsinherittooltip="true">
|
||||
<menuitem id="BMB_viewBookmarksToolbar"
|
||||
placesanonid="view-toolbar"
|
||||
toolbarId="PersonalToolbar"
|
||||
type="checkbox"
|
||||
oncommand="onViewToolbarCommand(event)"
|
||||
label="&viewBookmarksToolbar.label;"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="BMB_bookmarksShowAll"
|
||||
label="&showAllBookmarks2.label;"
|
||||
command="Browser:ShowAllBookmarks"
|
||||
key="manBookmarkKb"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="BMB_subscribeToPageMenuitem"
|
||||
#ifndef XP_MACOSX
|
||||
class="menuitem-iconic"
|
||||
#endif
|
||||
label="&subscribeToPageMenuitem.label;"
|
||||
oncommand="return FeedHandler.subscribeToFeed(null, event);"
|
||||
onclick="checkForMiddleClick(this, event);"
|
||||
observes="singleFeedMenuitemState"/>
|
||||
<menu id="BMB_subscribeToPageMenupopup"
|
||||
#ifndef XP_MACOSX
|
||||
class="menu-iconic"
|
||||
#endif
|
||||
label="&subscribeToPageMenupopup.label;"
|
||||
observes="multipleFeedsMenuState">
|
||||
<menupopup id="BMB_subscribeToPageSubmenuMenupopup"
|
||||
onpopupshowing="return FeedHandler.buildFeedList(event.target);"
|
||||
oncommand="return FeedHandler.subscribeToFeed(null, event);"
|
||||
onclick="checkForMiddleClick(this, event);"/>
|
||||
</menu>
|
||||
<menuseparator/>
|
||||
<menu id="BMB_bookmarksToolbar"
|
||||
placesanonid="toolbar-autohide"
|
||||
class="menu-iconic bookmark-item"
|
||||
label="&personalbarCmd.label;"
|
||||
container="true">
|
||||
<menupopup id="BMB_bookmarksToolbarPopup"
|
||||
placespopup="true"
|
||||
context="placesContext"
|
||||
onpopupshowing="if (!this.parentNode._placesView)
|
||||
new PlacesMenu(event, 'place:folder=TOOLBAR');"/>
|
||||
</menu>
|
||||
<menuseparator/>
|
||||
<!-- Bookmarks menu items -->
|
||||
<menuseparator builder="end"
|
||||
class="hide-if-empty-places-result"/>
|
||||
<menuitem id="BMB_unsortedBookmarks"
|
||||
label="&bookmarksMenuButton.unsorted.label;"
|
||||
oncommand="PlacesCommandHook.showPlacesOrganizer('UnfiledBookmarks');"
|
||||
class="menuitem-iconic"/>
|
||||
</menupopup>
|
||||
</toolbarbutton>
|
||||
|
||||
<toolbarbutton id="home-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
|
||||
persist="class" removable="true"
|
||||
label="&homeButton.label;"
|
||||
ondragover="homeButtonObserver.onDragOver(event)"
|
||||
ondragenter="homeButtonObserver.onDragOver(event)"
|
||||
ondrop="homeButtonObserver.onDrop(event)"
|
||||
ondragexit="homeButtonObserver.onDragExit(event)"
|
||||
onclick="BrowserGoHome(event);"
|
||||
aboutHomeOverrideTooltip="&abouthome.pageTitle;"/>
|
||||
|
||||
<toolbaritem id="social-toolbar-item"
|
||||
class="chromeclass-toolbar-additional"
|
||||
removable="false"
|
||||
title="&socialToolbar.title;"
|
||||
hidden="true"
|
||||
skipintoolbarset="true"
|
||||
observes="socialActiveBroadcaster">
|
||||
<toolbarbutton id="social-provider-button"
|
||||
class="toolbarbutton-1"
|
||||
type="menu">
|
||||
<menupopup id="social-statusarea-popup">
|
||||
<menuitem class="social-statusarea-user menuitem-iconic" pack="start" align="center"
|
||||
observes="socialBroadcaster_userDetails"
|
||||
oncommand="SocialUI.showProfile(); document.getElementById('social-statusarea-popup').hidePopup();">
|
||||
<image class="social-statusarea-user-portrait"
|
||||
observes="socialBroadcaster_userDetails"/>
|
||||
<vbox>
|
||||
<label class="social-statusarea-loggedInStatus"
|
||||
observes="socialBroadcaster_userDetails"/>
|
||||
</vbox>
|
||||
</menuitem>
|
||||
#ifndef XP_WIN
|
||||
<menuseparator class="social-statusarea-separator"/>
|
||||
#endif
|
||||
<menuitem class="social-toggle-sidebar-menuitem"
|
||||
type="checkbox"
|
||||
autocheck="false"
|
||||
command="Social:ToggleSidebar"
|
||||
label="&social.toggleSidebar.label;"
|
||||
accesskey="&social.toggleSidebar.accesskey;"/>
|
||||
<menuitem class="social-toggle-notifications-menuitem"
|
||||
type="checkbox"
|
||||
autocheck="false"
|
||||
command="Social:ToggleNotifications"
|
||||
label="&social.toggleNotifications.label;"
|
||||
accesskey="&social.toggleNotifications.accesskey;"/>
|
||||
<menuitem class="social-toggle-menuitem" command="Social:Toggle"/>
|
||||
<menuseparator class="social-statusarea-separator"/>
|
||||
<menuseparator class="social-provider-menu" hidden="true"/>
|
||||
<menuitem class="social-addons-menuitem" command="Social:Addons"
|
||||
label="&social.addons.label;"/>
|
||||
<menuitem label="&social.learnMore.label;"
|
||||
accesskey="&social.learnMore.accesskey;"
|
||||
oncommand="SocialUI.showLearnMore();"/>
|
||||
</menupopup>
|
||||
</toolbarbutton>
|
||||
<toolbarbutton id="social-mark-button"
|
||||
class="toolbarbutton-1"
|
||||
command="Social:TogglePageMark"/>
|
||||
</toolbaritem>
|
||||
|
||||
<toolbarbutton id="print-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
|
||||
label="&printButton.label;" command="cmd_print"
|
||||
tooltiptext="&printButton.tooltip;"/>
|
||||
@ -1014,45 +1065,49 @@
|
||||
|
||||
<hbox id="fullscr-toggler" collapsed="true"/>
|
||||
|
||||
<hbox flex="1" id="browser">
|
||||
<vbox id="browser-border-start" hidden="true" layer="true"/>
|
||||
<vbox id="sidebar-box" hidden="true" class="chromeclass-extrachrome">
|
||||
<sidebarheader id="sidebar-header" align="center">
|
||||
<label id="sidebar-title" persist="value" flex="1" crop="end" control="sidebar"/>
|
||||
<image id="sidebar-throbber"/>
|
||||
<toolbarbutton class="tabs-closebutton" tooltiptext="&sidebarCloseButton.tooltip;" oncommand="toggleSidebar();"/>
|
||||
</sidebarheader>
|
||||
<browser id="sidebar" flex="1" autoscroll="false" disablehistory="true"
|
||||
style="min-width: 14em; width: 18em; max-width: 36em;"/>
|
||||
</vbox>
|
||||
<deck id="content-deck" flex="1">
|
||||
<hbox flex="1" id="browser">
|
||||
<vbox id="browser-border-start" hidden="true" layer="true"/>
|
||||
<vbox id="sidebar-box" hidden="true" class="chromeclass-extrachrome">
|
||||
<sidebarheader id="sidebar-header" align="center">
|
||||
<label id="sidebar-title" persist="value" flex="1" crop="end" control="sidebar"/>
|
||||
<image id="sidebar-throbber"/>
|
||||
<toolbarbutton class="tabs-closebutton" tooltiptext="&sidebarCloseButton.tooltip;" oncommand="toggleSidebar();"/>
|
||||
</sidebarheader>
|
||||
<browser id="sidebar" flex="1" autoscroll="false" disablehistory="true"
|
||||
style="min-width: 14em; width: 18em; max-width: 36em;"/>
|
||||
</vbox>
|
||||
|
||||
<splitter id="sidebar-splitter" class="chromeclass-extrachrome sidebar-splitter" hidden="true"/>
|
||||
<vbox id="appcontent" flex="1">
|
||||
<tabbrowser id="content" disablehistory="true"
|
||||
flex="1" contenttooltip="aHTMLTooltip"
|
||||
tabcontainer="tabbrowser-tabs"
|
||||
contentcontextmenu="contentAreaContextMenu"
|
||||
autocompletepopup="PopupAutoComplete"/>
|
||||
<chatbar id="pinnedchats" layer="true" mousethrough="always" hidden="true"/>
|
||||
<statuspanel id="statusbar-display" inactive="true"/>
|
||||
</vbox>
|
||||
<splitter id="social-sidebar-splitter"
|
||||
class="chromeclass-extrachrome sidebar-splitter"
|
||||
observes="socialSidebarBroadcaster"/>
|
||||
<vbox id="social-sidebar-box"
|
||||
class="chromeclass-extrachrome"
|
||||
observes="socialSidebarBroadcaster"
|
||||
persist="width">
|
||||
<browser id="social-sidebar-browser"
|
||||
type="content"
|
||||
context="contentAreaContextMenu"
|
||||
disableglobalhistory="true"
|
||||
tooltip="aHTMLTooltip"
|
||||
flex="1"
|
||||
style="min-width: 14em; width: 18em; max-width: 36em;"/>
|
||||
</vbox>
|
||||
<vbox id="browser-border-end" hidden="true" layer="true"/>
|
||||
</hbox>
|
||||
<splitter id="sidebar-splitter" class="chromeclass-extrachrome sidebar-splitter" hidden="true"/>
|
||||
<vbox id="appcontent" flex="1">
|
||||
<tabbrowser id="content" disablehistory="true"
|
||||
flex="1" contenttooltip="aHTMLTooltip"
|
||||
tabcontainer="tabbrowser-tabs"
|
||||
contentcontextmenu="contentAreaContextMenu"
|
||||
autocompletepopup="PopupAutoComplete"
|
||||
onclick="contentAreaClick(event, false);"/>
|
||||
<chatbar id="pinnedchats" layer="true" mousethrough="always" hidden="true"/>
|
||||
<statuspanel id="statusbar-display" inactive="true"/>
|
||||
</vbox>
|
||||
<splitter id="social-sidebar-splitter"
|
||||
class="chromeclass-extrachrome sidebar-splitter"
|
||||
observes="socialSidebarBroadcaster"/>
|
||||
<vbox id="social-sidebar-box"
|
||||
class="chromeclass-extrachrome"
|
||||
observes="socialSidebarBroadcaster"
|
||||
persist="width">
|
||||
<browser id="social-sidebar-browser"
|
||||
type="content"
|
||||
context="contentAreaContextMenu"
|
||||
disableglobalhistory="true"
|
||||
tooltip="aHTMLTooltip"
|
||||
flex="1"
|
||||
style="min-width: 14em; width: 18em; max-width: 36em;"/>
|
||||
</vbox>
|
||||
<vbox id="browser-border-end" hidden="true" layer="true"/>
|
||||
</hbox>
|
||||
#include ../../components/customizableui/content/customizeMode.inc.xul
|
||||
</deck>
|
||||
|
||||
<hbox id="full-screen-warning-container" hidden="true" fadeout="true">
|
||||
<hbox style="width: 100%;" pack="center"> <!-- Inner hbox needed due to bug 579776. -->
|
||||
@ -1113,7 +1168,6 @@
|
||||
mode="icons" iconsize="small" defaulticonsize="small"
|
||||
lockiconsize="true"
|
||||
defaultset="addonbar-closebutton,spring,status-bar"
|
||||
customizable="true"
|
||||
key="key_toggleAddonBar">
|
||||
<toolbarbutton id="addonbar-closebutton"
|
||||
tooltiptext="&addonBarCloseButton.tooltip;"
|
||||
@ -1122,38 +1176,34 @@
|
||||
</toolbar>
|
||||
</vbox>
|
||||
|
||||
#ifndef XP_UNIX
|
||||
<svg:svg height="0">
|
||||
<svg:clipPath id="tab-curve-clip-path-start" clipPathUnits="objectBoundingBox">
|
||||
<svg:path d="M 1,0.0645 C 0.5683,0.0679,0.51693,0.3764,0.4837,0.5484 c -0.0522,0.2702,-0.1425,0.4194,-0.4333,0.4194 L 0,1 H 1.0333 V 0.0645 z"/>
|
||||
</svg:clipPath>
|
||||
<svg:clipPath id="tab-curve-clip-path-end" clipPathUnits="objectBoundingBox">
|
||||
<svg:path d="M -0.0333,0.0645 C 0.4317,0.0679,0.4831,0.3764,0.5163,0.5484 c 0.0522,0.2702,+0.1425,0.4194,0.4333,0.4194 L 1,1 H -0.033 V 0.0645 z"/>
|
||||
</svg:clipPath>
|
||||
<svg:clipPath id="tab-clip-path-outer" clipPathUnits="userSpaceOnUse">
|
||||
<svg:path d="M 30,0 C 24,0 17.78,2.58 15.10,8.09 12.05,13.46 13.14,20.37 9.18,25.3 7.1,27.7 3.8,28 0.8,28 c -0.4,0.6 -2.09,1.11 -1.46,1.80 l 2.45,2.72 61.60,0 2.59,-3.06 C 65.15,28.96 64.57,27.80 63.5,28 60.13,28.13 56.33,27.03 54.74,23.78 51.85,18.44 52.65,11.81 49.09,6.73 45.88,1.65 39.54,-0.26 33.8,0 32.5,0 31.7,0 30,0 z"/>
|
||||
</svg:clipPath>
|
||||
|
||||
#ifndef XP_UNIX
|
||||
<svg:clipPath id="windows-keyhole-forward-clip-path" clipPathUnits="objectBoundingBox">
|
||||
<svg:path d="M 0,0 C 0.16,0.11 0.28,0.29 0.28,0.5 0.28,0.71 0.16,0.89 0,1 L 1,1 1,0 0,0 z"/>
|
||||
</svg:clipPath>
|
||||
<svg:clipPath id="windows-urlbar-back-button-clip-path" clipPathUnits="userSpaceOnUse">
|
||||
<svg:path d="M 0,0 0,7.8 C 2.5,11 4,14 4,18 4,22 2.5,25 0,28 l 0,22 10000,0 0,-50 L 0,0 z"/>
|
||||
</svg:clipPath>
|
||||
</svg:svg>
|
||||
#endif
|
||||
#ifdef XP_MACOSX
|
||||
<svg:svg height="0">
|
||||
<svg:clipPath id="osx-keyhole-forward-clip-path" clipPathUnits="objectBoundingBox">
|
||||
<svg:path d="M 0,0 C 0.15,0.12 0.25,0.3 0.25,0.5 0.25,0.7 0.15,0.88 0,1 L 1,1 1,0 0,0 z"/>
|
||||
</svg:clipPath>
|
||||
<svg:clipPath id="osx-urlbar-back-button-clip-path" clipPathUnits="userSpaceOnUse">
|
||||
<svg:path d="m 0,-5 0,4.03 C 3.6,1.8 6,6.1 6,11 6,16 3.6,20 0,23 l 0,27 10000,0 0,-55 L 0,-5 z"/>
|
||||
</svg:clipPath>
|
||||
<svg:clipPath id="osx-tab-ontop-left-curve-clip-path" clipPathUnits="userSpaceOnUse">
|
||||
<svg:path d="M 9,0 C 7.3,0 6,1.3 6,3 l 0,14 c 0,3 -2.2,5 -5,5 l -1,0 0,1 12,0 0,-1 0,-19 0,-3 -3,0 z"/>
|
||||
</svg:clipPath>
|
||||
<svg:clipPath id="osx-tab-ontop-right-curve-clip-path" clipPathUnits="userSpaceOnUse">
|
||||
<svg:path d="m 0,0 0,3 0,19 0,1 12,0 0,-1 -1,0 C 8.2,22 6,20 6,17 L 6,3 C 6,1.3 4.7,0 3,0 L 0,0 z"/>
|
||||
</svg:clipPath>
|
||||
<svg:clipPath id="osx-tab-onbottom-left-curve-clip-path" clipPathUnits="userSpaceOnUse">
|
||||
<svg:path d="m 0,0 0,1 1,0 c 2.8,0 5,2.2 5,5 l 0,14 c 0,2 1.3,3 3,3 l 3,0 0,-3 L 12,1 12,0 0,0 z"/>
|
||||
</svg:clipPath>
|
||||
<svg:clipPath id="osx-tab-onbottom-right-curve-clip-path" clipPathUnits="userSpaceOnUse">
|
||||
<svg:path d="m 0,0 0,1 0,19 0,3 3,0 c 1.7,0 3,-1 3,-3 L 6,6 C 6,3.2 8.2,1 11,1 L 12,1 12,0 0,0 z"/>
|
||||
</svg:clipPath>
|
||||
</svg:svg>
|
||||
#endif
|
||||
</svg:svg>
|
||||
|
||||
</vbox>
|
||||
# <iframe id="tab-view"> is dynamically appended as the 2nd child of #tab-view-deck.
|
||||
|
@ -9,5 +9,6 @@
|
||||
<script type="application/javascript" src="chrome://browser/content/browser.js"/>
|
||||
<script type="application/javascript" src="chrome://browser/content/downloads/downloads.js"/>
|
||||
<script type="application/javascript" src="chrome://browser/content/downloads/indicator.js"/>
|
||||
<script type="application/javascript" src="chrome://browser/content/customizableui/panelUI.js"/>
|
||||
<script type="application/javascript" src="chrome://global/content/inlineSpellCheckUI.js"/>
|
||||
<script type="application/javascript" src="chrome://global/content/viewSourceUtils.js"/>
|
||||
|
@ -41,6 +41,7 @@ tabpanels {
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.tab-icon-image:not([src]):not([pinned]),
|
||||
.tab-throbber:not([busy]),
|
||||
.tab-throbber[busy] + .tab-icon-image {
|
||||
display: none;
|
||||
|
@ -3484,9 +3484,7 @@
|
||||
if (aEvent.target != window)
|
||||
break;
|
||||
|
||||
let sizemode = document.documentElement.getAttribute("sizemode");
|
||||
TabsInTitlebar.allowedBy("sizemode",
|
||||
sizemode == "maximized" || sizemode == "fullscreen");
|
||||
TabsInTitlebar.updateAppearance();
|
||||
|
||||
var width = this.mTabstrip.boxObject.width;
|
||||
if (width != this.mTabstripWidth) {
|
||||
|
@ -13,8 +13,7 @@ browser.jar:
|
||||
#endif
|
||||
% overlay chrome://global/content/viewSource.xul chrome://browser/content/viewSourceOverlay.xul
|
||||
% overlay chrome://global/content/viewPartialSource.xul chrome://browser/content/viewSourceOverlay.xul
|
||||
% style chrome://global/content/customizeToolbar.xul chrome://browser/content/browser.css
|
||||
% style chrome://global/content/customizeToolbar.xul chrome://browser/skin/
|
||||
|
||||
* content/browser/aboutDialog.xul (content/aboutDialog.xul)
|
||||
* content/browser/aboutDialog.js (content/aboutDialog.js)
|
||||
content/browser/aboutDialog.css (content/aboutDialog.css)
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
# BrandFullNameInternal is used for some registry and file system values
|
||||
# instead of BrandFullName and typically should not be modified.
|
||||
!define BrandFullNameInternal "Nightly"
|
||||
!define BrandFullNameInternal "UX"
|
||||
!define CompanyName "mozilla.org"
|
||||
!define URLInfoAbout "http://www.mozilla.org"
|
||||
!define URLUpdateInfo "http://www.mozilla.org/projects/firefox"
|
||||
|
@ -2,4 +2,4 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
MOZ_APP_DISPLAYNAME=Nightly
|
||||
MOZ_APP_DISPLAYNAME=UX
|
||||
|
@ -2,7 +2,7 @@
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<!ENTITY brandShortName "Nightly">
|
||||
<!ENTITY brandFullName "Nightly">
|
||||
<!ENTITY brandShortName "UX">
|
||||
<!ENTITY brandFullName "UX">
|
||||
<!ENTITY vendorShortName "Mozilla">
|
||||
<!ENTITY trademarkInfo.part1 " ">
|
||||
|
@ -2,8 +2,8 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
brandShortName=Nightly
|
||||
brandFullName=Nightly
|
||||
brandShortName=UX
|
||||
brandFullName=UX
|
||||
vendorShortName=Mozilla
|
||||
|
||||
syncBrandShortName=Sync
|
||||
|
@ -84,6 +84,8 @@ static RedirEntry kRedirMap[] = {
|
||||
{ "healthreport", "chrome://browser/content/abouthealthreport/abouthealth.xhtml",
|
||||
nsIAboutModule::ALLOW_SCRIPT },
|
||||
#endif
|
||||
{ "customizing", "chrome://browser/content/customizableui/aboutCustomizing.xhtml",
|
||||
nsIAboutModule::ALLOW_SCRIPT },
|
||||
};
|
||||
static const int kRedirTotal = NS_ARRAY_LENGTH(kRedirMap);
|
||||
|
||||
|
@ -107,6 +107,7 @@ static const mozilla::Module::ContractIDEntry kBrowserContracts[] = {
|
||||
#ifdef MOZ_SERVICES_HEALTHREPORT
|
||||
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "healthreport", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
|
||||
#endif
|
||||
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "customizing", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
|
||||
#if defined(XP_WIN)
|
||||
{ NS_IEHISTORYENUMERATOR_CONTRACTID, &kNS_WINIEHISTORYENUMERATOR_CID },
|
||||
#elif defined(XP_MACOSX)
|
||||
|
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<!DOCTYPE html [
|
||||
<!ENTITY % htmlDTD
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"DTD/xhtml1-strict.dtd">
|
||||
%htmlDTD;
|
||||
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
|
||||
%brandDTD;
|
||||
<!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd">
|
||||
%browserDTD;
|
||||
]>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>&customizeMode.tabTitle;</title>
|
||||
</head>
|
||||
<body></body>
|
||||
</html>
|
@ -0,0 +1,48 @@
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<vbox id="customization-container" flex="1" style="background: #DBEAF9;">
|
||||
<hbox flex="1">
|
||||
<richlistbox id="customization-categories"
|
||||
onselect="document.getElementById('customization-content').selectedIndex = this.selectedIndex;">
|
||||
<richlistitem>
|
||||
<label value="&customizeMode.menuAndToolbars.label;"/>
|
||||
</richlistitem>
|
||||
<richlistitem>
|
||||
<label value="&customizeMode.appearance.label;"/>
|
||||
</richlistitem>
|
||||
</richlistbox>
|
||||
<deck id="customization-content" flex="1">
|
||||
<hbox id="customization-widgets">
|
||||
<vbox flex="1">
|
||||
<label value="&customizeMode.menuAndToolbars.header;"/>
|
||||
<vbox id="customization-palette" flex="1"/>
|
||||
</vbox>
|
||||
<vbox>
|
||||
<vbox id="customization-panelWrapper">
|
||||
<html:style html:type="text/html" scoped="scoped">
|
||||
@import url(chrome://global/skin/popup.css);
|
||||
</html:style>
|
||||
<box class="panel-arrowbox">
|
||||
<box flex="1"/>
|
||||
<image class="panel-arrow" side="top"/>
|
||||
</box>
|
||||
<box class="panel-arrowcontent" flex="1">
|
||||
<hbox id="customization-panelHolder"/>
|
||||
<box class="panel-inner-arrowcontentfooter" hidden="true"/>
|
||||
</box>
|
||||
</vbox>
|
||||
<spacer flex="1"/>
|
||||
</vbox>
|
||||
</hbox>
|
||||
<vbox id="customization-appearance">
|
||||
<label value="&customizeMode.appearance.header;"/>
|
||||
</vbox>
|
||||
</deck>
|
||||
</hbox>
|
||||
<hbox pack="end">
|
||||
<button oncommand="gCustomizeMode.reset();" label="&customizeMode.restoreDefaults;"/>
|
||||
<button oncommand="BrowserToolboxCustomizeDone();" label="&customizeMode.done;"/>
|
||||
</hbox>
|
||||
</vbox>
|
18
browser/components/customizableui/content/jar.mn
Normal file
@ -0,0 +1,18 @@
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
browser.jar:
|
||||
content/browser/customizableui/aboutCustomizing.xhtml
|
||||
content/browser/customizableui/panelUI.js
|
||||
content/browser/customizableui/panelUI.xml
|
||||
content/browser/customizableui/panelUIOverlay.xul
|
||||
content/browser/customizableui/panelUIOverlay.js
|
||||
content/browser/customizableui/toolbar.xml
|
||||
|
||||
# These overlays should be kept in sync with what pages are in
|
||||
# XULBrowserWindow.inContentWhitelist in browser.js
|
||||
% overlay about:addons chrome://browser/content/customizableui/panelUIOverlay.xul
|
||||
% overlay about:preferences chrome://browser/content/customizableui/panelUIOverlay.xul
|
||||
% overlay about:permissions chrome://browser/content/customizableui/panelUIOverlay.xul
|
||||
% overlay about:sync-progress chrome://browser/content/customizableui/panelUIOverlay.xul
|
6
browser/components/customizableui/content/moz.build
Normal file
@ -0,0 +1,6 @@
|
||||
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
91
browser/components/customizableui/content/panelUI.inc.xul
Normal file
@ -0,0 +1,91 @@
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<panel id="PanelUI-popup"
|
||||
role="group"
|
||||
type="arrow"
|
||||
level="top"
|
||||
consumeoutsideclicks="true">
|
||||
<box id="PanelUI-container">
|
||||
<stack id="PanelUI-viewStack" view="main">
|
||||
<vbox id="PanelUI-mainView">
|
||||
<vbox class="PanelUI-pageControls" pack="center">
|
||||
<hbox class="PanelUI-editControls">
|
||||
<toolbarbutton id="PanelUI-cut-btn" flex="1"
|
||||
label="&cutCmd.label;"
|
||||
tooltiptext="&cutButton.tooltip;"
|
||||
command="cmd_cut"/>
|
||||
<toolbarbutton id="PanelUI-copy-btn" flex="1"
|
||||
label="©Cmd.label;"
|
||||
tooltiptext="©Button.tooltip;"
|
||||
command="cmd_copy"/>
|
||||
<toolbarbutton id="PanelUI-paste-btn" flex="1"
|
||||
label="&pasteCmd.label;"
|
||||
tooltiptext="&pasteButton.tooltip;"
|
||||
command="cmd_paste"/>
|
||||
</hbox>
|
||||
<hbox class="PanelUI-zoomControls">
|
||||
<toolbarbutton id="PanelUI-zoomOut-btn" flex="1"
|
||||
noautoclose="true" label="&fullZoomReduceCmd.label;"
|
||||
command="cmd_fullZoomReduce"
|
||||
tooltiptext="&zoomOutButton.tooltip;"/>
|
||||
<toolbarbutton id="PanelUI-zoomReset-btn" flex="1"
|
||||
noautoclose="true" label="&zoomReset.label;"
|
||||
tooltiptext="&zoomReset.tooltip;"
|
||||
command="cmd_fullZoomReset"/>
|
||||
<toolbarbutton id="PanelUI-zoomIn-btn" flex="1"
|
||||
noautoclose="true" label="&fullZoomEnlargeCmd.label;"
|
||||
command="cmd_fullZoomEnlarge"
|
||||
tooltiptext="&zoomInButton.tooltip;"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
|
||||
<vbox id="PanelUI-contents" type="grid"/>
|
||||
|
||||
<vbox id="PanelUI-mainView-spring"/>
|
||||
|
||||
<hbox class="PanelUI-footer" align="center">
|
||||
<toolbarbutton id="PanelUI-help-btn" label="&helpMenu.label;"
|
||||
command="openHelpLink('firefox-help');"/>
|
||||
<spacer flex="1"/>
|
||||
<toolbarbutton id="PanelUI-customize-btn" label="&appMenuCustomize.label;"
|
||||
command="cmd_CustomizeToolbars"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
|
||||
<!-- Used to capture click events over the PanelUI-mainView if we're in
|
||||
subview mode. That way, any click on the PanelUI-mainView causes us
|
||||
to revert to the mainView mode, whereupon PanelUI-click-capture then
|
||||
allows click events to go through it. -->
|
||||
<box id="PanelUI-clickCapturer">
|
||||
</box>
|
||||
|
||||
<!-- We manually set display: none (via a CSS attribute selector) on the
|
||||
subviews that are not being displayed. We're using this over a deck
|
||||
because a deck assumes the size of its largest child, regardless of
|
||||
whether or not it is shown. That's not good for our case, since we
|
||||
want to allow each subview to be uniquely sized. -->
|
||||
<box id="PanelUI-subViews">
|
||||
<vbox id="PanelUI-bookmarks" flex="1">
|
||||
<label value="&appMenuBookmarks.label;"/>
|
||||
<vbox flex="1">
|
||||
<toolbarbutton label="&bookmarkThisPageCmd.label;"/>
|
||||
<toolbarbutton label="&viewBookmarksToolbar.label;"/>
|
||||
<toolbarbutton label="&showAllBookmarks2.label;"/>
|
||||
<spacer flex="1"/>
|
||||
</vbox>
|
||||
<vbox id="PanelUI-bookmarks-tall-maker"/>
|
||||
</vbox>
|
||||
<vbox id="PanelUI-history" flex="1">
|
||||
<label value="&appMenuHistory.label;"/>
|
||||
<vbox id="PanelUI-historyItems"/>
|
||||
<label value="&appMenuHistoryMore.label;"
|
||||
id="PanelUI-historyMore"
|
||||
class="text-link"
|
||||
onclick="PlacesCommandHook.showPlacesOrganizer('History'); PanelUI.hide();"/>
|
||||
</vbox>
|
||||
</box>
|
||||
</stack>
|
||||
</box>
|
||||
</panel>
|
326
browser/components/customizableui/content/panelUI.js
Normal file
@ -0,0 +1,326 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "CustomizableUI",
|
||||
"resource:///modules/CustomizableUI.jsm");
|
||||
/**
|
||||
* Maintains the state and dispatches events for the main menu panel.
|
||||
*/
|
||||
|
||||
const PanelUI = {
|
||||
/** Panel events that we listen for. **/
|
||||
get kEvents() ["popupshowing", "popupshown", "popuphiding", "popuphidden"],
|
||||
/**
|
||||
* Used for lazily getting and memoizing elements from the document. Lazy
|
||||
* getters are set in init, and memoizing happens after the first retrieval.
|
||||
*/
|
||||
get kElements() {
|
||||
return {
|
||||
clickCapturer: "PanelUI-clickCapturer",
|
||||
container: "PanelUI-container",
|
||||
contents: "PanelUI-contents",
|
||||
mainView: "PanelUI-mainView",
|
||||
mainViewSpring: "PanelUI-mainView-spring",
|
||||
menuButton: "PanelUI-menu-button",
|
||||
panel: "PanelUI-popup",
|
||||
subViews: "PanelUI-subViews",
|
||||
viewStack: "PanelUI-viewStack"
|
||||
};
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns whether we're in subview mode. This can return true even if
|
||||
* the transition to subview mode is not yet complete.
|
||||
**/
|
||||
get _showingSubView() {
|
||||
return (this.viewStack.hasAttribute("view") &&
|
||||
this.viewStack.getAttribute("view") == "subview");
|
||||
},
|
||||
|
||||
init: function() {
|
||||
for (let [k, v] of Iterator(this.kElements)) {
|
||||
// Need to do fresh let-bindings per iteration
|
||||
let getKey = k;
|
||||
let id = v;
|
||||
this.__defineGetter__(getKey, function() {
|
||||
delete this[getKey];
|
||||
return this[getKey] = document.getElementById(id);
|
||||
});
|
||||
}
|
||||
|
||||
for (let event of this.kEvents) {
|
||||
this.panel.addEventListener(event, this);
|
||||
}
|
||||
|
||||
this.clickCapturer.addEventListener("click", this._onCapturerClick,
|
||||
true);
|
||||
|
||||
var self = this;
|
||||
this.subViews.addEventListener("overflow", function() {
|
||||
// Resize the subview on the next tick.
|
||||
Services.tm.currentThread.dispatch(self._syncContainerWithSubView.bind(self),
|
||||
Ci.nsIThread.DISPATCH_NORMAL);
|
||||
});
|
||||
|
||||
// Get a MutationObserver ready to react to subview size changes. We
|
||||
// only attach this MutationObserver when a subview is being displayed.
|
||||
this._subViewObserver = new MutationObserver(function(aMutations) {
|
||||
this._syncContainerWithSubView();
|
||||
}.bind(this));
|
||||
},
|
||||
|
||||
uninit: function() {
|
||||
for (let event of this.kEvents) {
|
||||
this.panel.removeEventListener(event, this);
|
||||
}
|
||||
|
||||
this.clickCapturer.removeEventListener("click", this._onCapturerClick,
|
||||
true);
|
||||
},
|
||||
|
||||
/**
|
||||
* Customize mode extracts the mainView and puts it somewhere else while the
|
||||
* user customizes. Upon completion, this function can be called to put the
|
||||
* panel back to where it belongs in normal browsing mode.
|
||||
*
|
||||
* @param aMainView
|
||||
* The mainView node to put back into place.
|
||||
*/
|
||||
replaceMainView: function(aMainView) {
|
||||
this.viewStack.insertBefore(aMainView, this.viewStack.firstChild);
|
||||
this._syncContainerWithMainView();
|
||||
},
|
||||
|
||||
/**
|
||||
* Opens the menu panel if it's closed, or closes it if it's
|
||||
* open. If the event target has a child with the toolbarbutton-icon
|
||||
* attribute, the panel will be anchored on that child. Otherwise, the panel
|
||||
* is anchored on the event target itself.
|
||||
*
|
||||
* @param aEvent the event that triggers the toggle.
|
||||
*/
|
||||
toggle: function(aEvent) {
|
||||
if (this.panel.state == "open") {
|
||||
this.hide();
|
||||
} else if (this.panel.state == "closed") {
|
||||
let anchor = aEvent.target;
|
||||
let iconAnchor =
|
||||
document.getAnonymousElementByAttribute(anchor, "class",
|
||||
"toolbarbutton-icon");
|
||||
this.panel.openPopup(iconAnchor || anchor, "bottomcenter topright");
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* If the menu panel is being shown, hide it.
|
||||
*/
|
||||
hide: function() {
|
||||
this.panel.hidePopup();
|
||||
},
|
||||
|
||||
handleEvent: function(aEvent) {
|
||||
switch (aEvent.type) {
|
||||
case "popupshowing":
|
||||
this.ensureRegistered();
|
||||
let cstyle = window.getComputedStyle(this.viewStack, null);
|
||||
this.container.style.height = cstyle.getPropertyValue("height");
|
||||
this.container.style.width = cstyle.getPropertyValue("width");
|
||||
// Fall through
|
||||
case "popupshown":
|
||||
// Fall through
|
||||
case "popuphiding":
|
||||
// Fall through
|
||||
case "popuphidden": {
|
||||
this.showMainView();
|
||||
this._updatePanelButton(aEvent.target);
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Registering the menu panel is done lazily for performance reasons. This
|
||||
* method is exposed so that CustomizationMode can force registration in the
|
||||
* event that customization mode is started before the panel has had a chance
|
||||
* to register itself.
|
||||
*/
|
||||
ensureRegistered: function() {
|
||||
CustomizableUI.registerMenuPanel(this.contents);
|
||||
},
|
||||
|
||||
/**
|
||||
* Switch the panel to the main view if it's not already
|
||||
* in that view.
|
||||
*/
|
||||
showMainView: function() {
|
||||
// Are we showing a subview? If so, fire the ViewHiding event on it.
|
||||
if (this._showingSubView) {
|
||||
let viewNode = this._currentSubView;
|
||||
let evt = document.createEvent("CustomEvent");
|
||||
evt.initCustomEvent("ViewHiding", true, true, viewNode);
|
||||
viewNode.dispatchEvent(evt);
|
||||
|
||||
viewNode.removeAttribute("current");
|
||||
this._currentSubView = null;
|
||||
this._subViewObserver.disconnect();
|
||||
}
|
||||
|
||||
this.viewStack.setAttribute("view", "main");
|
||||
this._syncContainerWithMainView();
|
||||
|
||||
this._shiftMainView();
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows a subview in the panel with a given ID.
|
||||
*
|
||||
* @param aViewId the ID of the subview to show.
|
||||
* @param aAnchor the element that spawned the subview.
|
||||
* @param aPlacementArea the CustomizableUI area that aAnchor is in.
|
||||
*/
|
||||
showSubView: function(aViewId, aAnchor, aPlacementArea) {
|
||||
let viewNode = document.getElementById(aViewId);
|
||||
if (!viewNode) {
|
||||
Cu.reportError("Could not show panel subview with id: " + aViewId);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!aAnchor) {
|
||||
Cu.reportError("Expected an anchor when opening subview with id: " + aViewId);
|
||||
return;
|
||||
}
|
||||
|
||||
if (aPlacementArea == CustomizableUI.AREA_PANEL) {
|
||||
// The subview can get moved if the widget is not in the
|
||||
// panel. For robustness, check that the subview is in the
|
||||
// right place and move it if necessary.
|
||||
if (viewNode.parentElement != this.subViews) {
|
||||
this.subViews.appendChild(viewNode);
|
||||
}
|
||||
|
||||
let oldHeight = this.mainView.clientHeight;
|
||||
viewNode.setAttribute("current", true);
|
||||
this._currentSubView = viewNode;
|
||||
|
||||
// Emit the ViewShowing event so that the widget definition has a chance
|
||||
// to lazily populate the subview with things.
|
||||
let evt = document.createEvent("CustomEvent");
|
||||
evt.initCustomEvent("ViewShowing", true, true, viewNode);
|
||||
viewNode.dispatchEvent(evt);
|
||||
|
||||
this.viewStack.setAttribute("view", "subview");
|
||||
this.mainViewSpring.style.height = this.subViews.scrollHeight - oldHeight + "px";
|
||||
this.container.style.height = this.subViews.scrollHeight + "px";
|
||||
|
||||
// Now we have to transition to transition the panel. There are a few parts
|
||||
// to this:
|
||||
//
|
||||
// 1) The main view content gets shifted so that the center of the anchor
|
||||
// node is at the left-most edge of the panel.
|
||||
// 2) The subview deck slides in so that it takes up almost all of the
|
||||
// panel.
|
||||
// 3) If the subview is taller then the main panel contents, then the panel
|
||||
// must grow to meet that new height. Otherwise, it must shrink.
|
||||
//
|
||||
// All three of these actions make use of CSS transformations, so they
|
||||
// should all occur simultaneously.
|
||||
this._shiftMainView(aAnchor);
|
||||
this._subViewObserver.observe(viewNode, {
|
||||
attributes: true,
|
||||
characterData: true,
|
||||
childList: true,
|
||||
subtree: true
|
||||
});
|
||||
} else {
|
||||
// Emit the ViewShowing event so that the widget definition has a chance
|
||||
// to lazily populate the subview with things.
|
||||
let evt = document.createEvent("CustomEvent");
|
||||
evt.initCustomEvent("ViewShowing", true, true, viewNode);
|
||||
viewNode.dispatchEvent(evt);
|
||||
|
||||
let panel = document.createElement("panel");
|
||||
panel.appendChild(viewNode);
|
||||
panel.setAttribute("type", "arrow");
|
||||
panel.setAttribute("id", "customizationui-widget-panel");
|
||||
document.getElementById(CustomizableUI.AREA_NAVBAR).appendChild(panel);
|
||||
panel.addEventListener("popuphidden", function() {
|
||||
this.subViews.appendChild(viewNode);
|
||||
panel.parentElement.removeChild(panel);
|
||||
});
|
||||
|
||||
panel.openPopup(aAnchor, "bottomcenter topright");
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Ensures that the container has the same height as the main view, minus
|
||||
* any spring height. This is usually done after customization completes, or
|
||||
* when switching back from a subview.
|
||||
*/
|
||||
_syncContainerWithMainView: function() {
|
||||
let springHeight = this.mainViewSpring.getBoundingClientRect().height;
|
||||
this.container.style.height = (this.mainView.scrollHeight - springHeight) + "px";
|
||||
this.mainViewSpring.style.height = "";
|
||||
},
|
||||
|
||||
/**
|
||||
* Ensures that the container has the same height as the subview holder.
|
||||
* This is usually done when switching to a subview, or if a subview changes
|
||||
* in size.
|
||||
*/
|
||||
_syncContainerWithSubView: function() {
|
||||
let springHeight = this.mainViewSpring.getBoundingClientRect().height;
|
||||
let mainViewHeight = this.mainView.clientHeight - springHeight;
|
||||
this.container.style.height = this.subViews.scrollHeight + "px";
|
||||
this.mainViewSpring.style.height = (this.subViews.scrollHeight - mainViewHeight) + "px";
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the anchor node into the open or closed state, depending
|
||||
* on the state of the panel.
|
||||
*/
|
||||
_updatePanelButton: function() {
|
||||
this.menuButton.open = this.panel.state == "open" ||
|
||||
this.panel.state == "showing";
|
||||
},
|
||||
|
||||
/**
|
||||
* Used to keep a reference to the toolbarbutton that the subview spawned from.
|
||||
*/
|
||||
anchorElement: null,
|
||||
|
||||
/**
|
||||
* If aAnchor is not null, this shifts the main view content so that it is
|
||||
* partially clipped by the panel boundaries, placing the center of aAnchor
|
||||
* at the clipping edge. If aAnchor is undefined or null, the main view
|
||||
* content is shifted back to its original position.
|
||||
*/
|
||||
_shiftMainView: function(aAnchor) {
|
||||
if (aAnchor) {
|
||||
// We need to find the left edge of the anchor, relative to the main
|
||||
// panel. Then we need to add half the width of the anchor. This is the
|
||||
// target that we need to transition to.
|
||||
let anchorRect = aAnchor.getBoundingClientRect();
|
||||
let mainViewRect = this.mainView.getBoundingClientRect();
|
||||
let leftEdge = anchorRect.left - mainViewRect.left;
|
||||
let center = aAnchor.clientWidth / 2;
|
||||
let target = leftEdge + center;
|
||||
this.mainView.style.transform = "translateX(-" + target + "px)";
|
||||
aAnchor.classList.add("panelui-mainview-anchor");
|
||||
} else {
|
||||
this.mainView.style.transform = "";
|
||||
if (this.anchorElement)
|
||||
this.anchorElement.classList.remove("panelui-mainview-anchor");
|
||||
}
|
||||
this.anchorElement = aAnchor;
|
||||
},
|
||||
|
||||
/**
|
||||
* When viewing a subview, any click on the main view gets intercepted by our
|
||||
* capturer, and then we switch to the main view.
|
||||
*/
|
||||
_onCapturerClick: function(aEvent) {
|
||||
PanelUI.showMainView();
|
||||
},
|
||||
};
|
40
browser/components/customizableui/content/panelUI.xml
Normal file
@ -0,0 +1,40 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<bindings id="browserPanelUIBindings"
|
||||
xmlns="http://www.mozilla.org/xbl"
|
||||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:xbl="http://www.mozilla.org/xbl">
|
||||
|
||||
<binding id="toolbarbutton" display="xul:button"
|
||||
extends="chrome://global/content/bindings/button.xml#button-base">
|
||||
<resources>
|
||||
<stylesheet src="chrome://global/skin/toolbarbutton.css"/>
|
||||
</resources>
|
||||
|
||||
<content>
|
||||
<children includes="observes|template|menupopup|panel|tooltip"/>
|
||||
<xul:hbox align="center" flex="1">
|
||||
<xul:image class="toolbarbutton-icon" xbl:inherits="validate,src=image,label"/>
|
||||
<xul:vbox flex="1">
|
||||
<xul:label class="toolbarbutton-text" crop="right" flex="1"
|
||||
xbl:inherits="value=label,accesskey,crop"/>
|
||||
<xul:hbox pack="end">
|
||||
<xul:label class="toolbarbutton-acceltext" crop="middle"
|
||||
xbl:inherits="value=acceltext"/>
|
||||
</xul:hbox>
|
||||
</xul:vbox>
|
||||
</xul:hbox>
|
||||
</content>
|
||||
|
||||
<implementation implements="nsIAccessibleProvider">
|
||||
<property name="accessibleType" readonly="true">
|
||||
<getter>
|
||||
return Components.interfaces.nsIAccessibleProvider.XULToolbarButton;
|
||||
</getter>
|
||||
</property>
|
||||
</implementation>
|
||||
</binding>
|
||||
</bindings>
|
@ -0,0 +1,9 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
if (typeof XPCOMUtils == "undefined")
|
||||
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "CustomizableUI",
|
||||
"resource:///modules/CustomizableUI.jsm");
|
26
browser/components/customizableui/content/panelUIOverlay.xul
Normal file
@ -0,0 +1,26 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<!DOCTYPE overlay [
|
||||
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
|
||||
%brandDTD;
|
||||
<!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd" >
|
||||
%browserDTD;
|
||||
]>
|
||||
|
||||
<?xml-stylesheet href="chrome://browser/skin/customizableui/panelUIOverlay.css" type="text/css"?>
|
||||
|
||||
<overlay id="panelUIOverlay"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
<script type="application/javascript" src="chrome://browser/content/customizableui/panelUIOverlay.js"/>
|
||||
|
||||
<hbox id="app-extension-point-end">
|
||||
<toolbarbutton id="PanelUI-menu-button"
|
||||
class="toolbarbutton-1"
|
||||
label="&brandShortName;"
|
||||
tooltiptext="&appmenu.title;"
|
||||
oncommand="CustomizableUI.showPanel(this);"/>
|
||||
</hbox>
|
||||
</overlay>
|
233
browser/components/customizableui/content/toolbar.xml
Normal file
@ -0,0 +1,233 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<bindings id="browserToolbarBindings"
|
||||
xmlns="http://www.mozilla.org/xbl"
|
||||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:xbl="http://www.mozilla.org/xbl">
|
||||
|
||||
<binding id="toolbar">
|
||||
<implementation implements="nsIAccessibleProvider">
|
||||
<property name="accessibleType" readonly="true">
|
||||
<getter>
|
||||
return Components.interfaces.nsIAccessibleProvider.XULToolbar;
|
||||
</getter>
|
||||
</property>
|
||||
|
||||
<constructor><![CDATA[
|
||||
if (document.readyState == "complete") {
|
||||
this._init();
|
||||
} else {
|
||||
// Need to wait until XUL overlays are loaded. See bug 554279.
|
||||
let self = this;
|
||||
document.addEventListener("readystatechange", function onReadyStateChange() {
|
||||
if (document.readyState != "complete")
|
||||
return;
|
||||
document.removeEventListener("readystatechange", onReadyStateChange, false);
|
||||
self._init();
|
||||
}, false);
|
||||
}
|
||||
]]></constructor>
|
||||
|
||||
<method name="_init">
|
||||
<body><![CDATA[
|
||||
let scope = {};
|
||||
Cu.import("resource:///modules/CustomizableUI.jsm", scope);
|
||||
let CustomizableUI = scope.CustomizableUI;
|
||||
|
||||
// Searching for the toolbox palette in the toolbar binding because
|
||||
// toolbars are constructed first.
|
||||
let toolbox = this.toolbox;
|
||||
if (toolbox && !toolbox.palette) {
|
||||
for (let node of toolbox.children) {
|
||||
if (node.localName == "toolbarpalette") {
|
||||
// Hold on to the palette but remove it from the document.
|
||||
toolbox.palette = node;
|
||||
toolbox.removeChild(node);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CustomizableUI.registerToolbar(this);
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<property name="toolbarName"
|
||||
onget="return this.getAttribute('toolbarname');"
|
||||
onset="this.setAttribute('toolbarname', val); return val;"/>
|
||||
|
||||
<property name="customizationTarget" readonly="true">
|
||||
<getter><![CDATA[
|
||||
if (this._customizationTarget)
|
||||
return this._customizationTarget;
|
||||
|
||||
let id = this.getAttribute("customizationtarget");
|
||||
if (id)
|
||||
this._customizationTarget = document.getElementById(id);
|
||||
|
||||
if (!this._customizationTarget)
|
||||
this._customizationTarget = this;
|
||||
|
||||
return this._customizationTarget;
|
||||
]]></getter>
|
||||
</property>
|
||||
|
||||
<property name="toolbox" readonly="true">
|
||||
<getter><![CDATA[
|
||||
if (this._toolbox)
|
||||
return this._toolbox;
|
||||
|
||||
let toolboxId = this.getAttribute("toolboxid");
|
||||
if (toolboxId) {
|
||||
let toolbox = document.getElementById(toolboxId);
|
||||
if (toolbox) {
|
||||
if (toolbox.externalToolbars.indexOf(this) == -1)
|
||||
toolbox.externalToolbars.push(this);
|
||||
|
||||
this._toolbox = toolbox;
|
||||
}
|
||||
}
|
||||
|
||||
if (!this._toolbox && this.parentNode &&
|
||||
this.parentNode.localName == "toolbox") {
|
||||
this._toolbox = this.parentNode;
|
||||
}
|
||||
|
||||
return this._toolbox;
|
||||
]]></getter>
|
||||
</property>
|
||||
|
||||
<property name="currentSet" readonly="true">
|
||||
<getter><![CDATA[
|
||||
if (!this._customizationTarget)
|
||||
return "";
|
||||
|
||||
return [node.id for (node of this._customizationTarget.children)].join(',');
|
||||
]]></getter>
|
||||
</property>
|
||||
|
||||
|
||||
</implementation>
|
||||
</binding>
|
||||
|
||||
<!-- The toolbar-menubar-autohide and toolbar-drag bindings are almost
|
||||
verbatim copies of their toolkit counterparts - they just inherit from
|
||||
the customizableui's toolbar binding instead of toolkit's. We're currently
|
||||
OK with the maintainance burden of having two copies of a binding, since
|
||||
the long term goal is to move the customization framework into toolkit. -->
|
||||
|
||||
<binding id="toolbar-menubar-autohide"
|
||||
extends="chrome://browser/content/customizableui/toolbar.xml#toolbar">
|
||||
<implementation>
|
||||
<constructor>
|
||||
this._setInactive();
|
||||
</constructor>
|
||||
|
||||
<field name="_inactiveTimeout">null</field>
|
||||
|
||||
<field name="_contextMenuListener"><![CDATA[({
|
||||
toolbar: this,
|
||||
contextMenu: null,
|
||||
|
||||
get active () !!this.contextMenu,
|
||||
|
||||
init: function (event) {
|
||||
let node = event.target;
|
||||
while (node != this.toolbar) {
|
||||
if (node.localName == "menupopup")
|
||||
return;
|
||||
node = node.parentNode;
|
||||
}
|
||||
|
||||
let contextMenuId = this.toolbar.getAttribute("context");
|
||||
if (!contextMenuId)
|
||||
return;
|
||||
|
||||
this.contextMenu = document.getElementById(contextMenuId);
|
||||
if (!this.contextMenu)
|
||||
return;
|
||||
|
||||
this.contextMenu.addEventListener("popupshown", this, false);
|
||||
this.contextMenu.addEventListener("popuphiding", this, false);
|
||||
this.toolbar.addEventListener("mousemove", this, false);
|
||||
},
|
||||
handleEvent: function (event) {
|
||||
switch (event.type) {
|
||||
case "popupshown":
|
||||
this.toolbar.removeEventListener("mousemove", this, false);
|
||||
break;
|
||||
case "popuphiding":
|
||||
case "mousemove":
|
||||
this.toolbar._setInactiveAsync();
|
||||
this.toolbar.removeEventListener("mousemove", this, false);
|
||||
this.contextMenu.removeEventListener("popuphiding", this, false);
|
||||
this.contextMenu.removeEventListener("popupshown", this, false);
|
||||
this.contextMenu = null;
|
||||
break;
|
||||
}
|
||||
}
|
||||
})]]></field>
|
||||
|
||||
<method name="_setInactive">
|
||||
<body><![CDATA[
|
||||
this.setAttribute("inactive", "true");
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="_setInactiveAsync">
|
||||
<body><![CDATA[
|
||||
this._inactiveTimeout = setTimeout(function (self) {
|
||||
if (self.getAttribute("autohide") == "true") {
|
||||
self._inactiveTimeout = null;
|
||||
self._setInactive();
|
||||
}
|
||||
}, 0, this);
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="_setActive">
|
||||
<body><![CDATA[
|
||||
if (this._inactiveTimeout) {
|
||||
clearTimeout(this._inactiveTimeout);
|
||||
this._inactiveTimeout = null;
|
||||
}
|
||||
this.removeAttribute("inactive");
|
||||
]]></body>
|
||||
</method>
|
||||
</implementation>
|
||||
|
||||
<handlers>
|
||||
<handler event="DOMMenuBarActive" action="this._setActive();"/>
|
||||
<handler event="popupshowing" action="this._setActive();"/>
|
||||
<handler event="mousedown" button="2" action="this._contextMenuListener.init(event);"/>
|
||||
<handler event="DOMMenuBarInactive"><![CDATA[
|
||||
if (!this._contextMenuListener.active)
|
||||
this._setInactiveAsync();
|
||||
]]></handler>
|
||||
</handlers>
|
||||
</binding>
|
||||
|
||||
<binding id="toolbar-drag"
|
||||
extends="chrome://browser/content/customizableui/toolbar.xml#toolbar">
|
||||
<implementation>
|
||||
<field name="_dragBindingAlive">true</field>
|
||||
<constructor><![CDATA[
|
||||
if (!this._draggableStarted) {
|
||||
this._draggableStarted = true;
|
||||
try {
|
||||
let tmp = {};
|
||||
Components.utils.import("resource://gre/modules/WindowDraggingUtils.jsm", tmp);
|
||||
let draggableThis = new tmp.WindowDraggingElement(this);
|
||||
draggableThis.mouseDownCheck = function(e) {
|
||||
// Don't move while customizing.
|
||||
return this._dragBindingAlive &&
|
||||
this.getAttribute("customizing") != "true";
|
||||
};
|
||||
} catch (e) {}
|
||||
}
|
||||
]]></constructor>
|
||||
</implementation>
|
||||
</binding>
|
||||
</bindings>
|
10
browser/components/customizableui/moz.build
Normal file
@ -0,0 +1,10 @@
|
||||
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
PARALLEL_DIRS += [
|
||||
'content',
|
||||
'src',
|
||||
]
|
1711
browser/components/customizableui/src/CustomizableUI.jsm
Normal file
746
browser/components/customizableui/src/CustomizeMode.jsm
Normal file
@ -0,0 +1,746 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
this.EXPORTED_SYMBOLS = ["CustomizeMode"];
|
||||
|
||||
const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
|
||||
|
||||
const kPrefCustomizationDebug = "browser.uiCustomization.debug";
|
||||
const kPaletteId = "customization-palette";
|
||||
const kAboutURI = "about:customizing";
|
||||
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
Cu.import("resource:///modules/CustomizableUI.jsm");
|
||||
|
||||
let gDebug = false;
|
||||
try {
|
||||
gDebug = Services.prefs.getBoolPref(kPrefCustomizationDebug);
|
||||
} catch (e) {}
|
||||
|
||||
function LOG(str) {
|
||||
if (gDebug) {
|
||||
Services.console.logStringMessage("[CustomizeMode] " + str);
|
||||
}
|
||||
}
|
||||
|
||||
function ERROR(aMsg) Cu.reportError("[CustomizeMode] " + aMsg);
|
||||
|
||||
function CustomizeMode(aWindow) {
|
||||
this.window = aWindow;
|
||||
this.document = aWindow.document;
|
||||
this.browser = aWindow.gBrowser;
|
||||
};
|
||||
|
||||
CustomizeMode.prototype = {
|
||||
_changed: false,
|
||||
window: null,
|
||||
document: null,
|
||||
// areas is used to cache the customizable areas when in customization mode.
|
||||
areas: null,
|
||||
// When in customizing mode, we swap out the reference to the invisible
|
||||
// palette in gNavToolbox.palette for our visiblePalette. This way, for the
|
||||
// customizing browser window, when widgets are removed from customizable
|
||||
// areas and added to the palette, they're added to the visible palette.
|
||||
// _stowedPalette is a reference to the old invisible palette so we can
|
||||
// restore gNavToolbox.palette to its original state after exiting
|
||||
// customization mode.
|
||||
_stowedPalette: null,
|
||||
_dragOverItem: null,
|
||||
_customizing: false,
|
||||
|
||||
init: function() {
|
||||
// There are two palettes - there's the palette that can be overlayed with
|
||||
// toolbar items in browser.xul. This is invisible, and never seen by the
|
||||
// user. Then there's the visible palette, which gets populated and displayed
|
||||
// to the user when in customizing mode.
|
||||
this.visiblePalette = this.document.getElementById(kPaletteId);
|
||||
|
||||
this.browser.tabContainer.addEventListener("TabSelect", this, false);
|
||||
this.browser.addTabsProgressListener(this);
|
||||
},
|
||||
|
||||
uninit: function() {
|
||||
this.browser.tabContainer.removeEventListener("TabSelect", this, false);
|
||||
this.browser.removeTabsProgressListener(this);
|
||||
},
|
||||
|
||||
enter: function() {
|
||||
if (this._customizing) {
|
||||
return;
|
||||
}
|
||||
|
||||
let window = this.window;
|
||||
let document = this.document;
|
||||
|
||||
// We don't need to switch to kAboutURI, or open a new tab at
|
||||
// kAboutURI if we're already on it.
|
||||
if (this.browser.selectedBrowser.currentURI.spec != kAboutURI) {
|
||||
this.window.switchToTabHavingURI(kAboutURI, true);
|
||||
}
|
||||
|
||||
CustomizableUI.addListener(this);
|
||||
|
||||
// The menu panel is lazy, and registers itself when the popup shows. We
|
||||
// need to force the menu panel to register itself, or else customization
|
||||
// is really not going to work.
|
||||
window.PanelUI.ensureRegistered();
|
||||
|
||||
// Add a keypress listener and click listener to the tab-view-deck so that
|
||||
// we can quickly exit customization mode when pressing ESC or clicking on
|
||||
// the blueprint outside the customization container.
|
||||
let deck = document.getElementById("tab-view-deck");
|
||||
deck.addEventListener("keypress", this, false);
|
||||
deck.addEventListener("click", this, false);
|
||||
|
||||
// Same goes for the menu button - if we're customizing, a click to the
|
||||
// menu button means a quick exit from customization mode.
|
||||
window.PanelUI.menuButton.addEventListener("click", this, false);
|
||||
window.PanelUI.menuButton.disabled = true;
|
||||
|
||||
// Let everybody in this window know that we're about to customize.
|
||||
let evt = document.createEvent("CustomEvent");
|
||||
evt.initCustomEvent("CustomizationStart", true, true, window);
|
||||
window.dispatchEvent(evt);
|
||||
|
||||
let customizer = document.getElementById("customization-container");
|
||||
customizer.parentNode.selectedPanel = customizer;
|
||||
|
||||
window.PanelUI.hide();
|
||||
// Move the mainView in the panel to the holder so that we can see it
|
||||
// while customizing.
|
||||
let panelHolder = document.getElementById("customization-panelHolder");
|
||||
panelHolder.appendChild(window.PanelUI.mainView);
|
||||
|
||||
|
||||
let self = this;
|
||||
deck.addEventListener("transitionend", function customizeTransitionEnd() {
|
||||
deck.removeEventListener("transitionend", customizeTransitionEnd);
|
||||
|
||||
// Add drag-and-drop event handlers to all of the customizable areas.
|
||||
self.areas = [];
|
||||
for (let area of CustomizableUI.areas) {
|
||||
let target = CustomizableUI.getCustomizeTargetForArea(area, window);
|
||||
target.addEventListener("dragstart", self);
|
||||
target.addEventListener("dragover", self);
|
||||
target.addEventListener("dragexit", self);
|
||||
target.addEventListener("drop", self);
|
||||
for (let child of target.children) {
|
||||
if (self.isCustomizableItem(child)) {
|
||||
self.wrapToolbarItem(child, getPlaceForItem(child));
|
||||
}
|
||||
}
|
||||
self.areas.push(target);
|
||||
}
|
||||
|
||||
self.populatePalette();
|
||||
});
|
||||
|
||||
this.visiblePalette.addEventListener("dragstart", this);
|
||||
this.visiblePalette.addEventListener("dragover", this);
|
||||
this.visiblePalette.addEventListener("dragexit", this);
|
||||
this.visiblePalette.addEventListener("drop", this);
|
||||
|
||||
document.documentElement.setAttribute("customizing", true);
|
||||
this._customizing = true;
|
||||
},
|
||||
|
||||
exit: function() {
|
||||
if (!this._customizing) {
|
||||
return;
|
||||
}
|
||||
|
||||
CustomizableUI.removeListener(this);
|
||||
|
||||
let deck = this.document.getElementById("tab-view-deck");
|
||||
deck.removeEventListener("keypress", this, false);
|
||||
deck.removeEventListener("click", this, false);
|
||||
this.window.PanelUI.menuButton.removeEventListener("click", this, false);
|
||||
this.window.PanelUI.menuButton.disabled = false;
|
||||
|
||||
this.depopulatePalette();
|
||||
|
||||
this.visiblePalette.removeEventListener("dragstart", this);
|
||||
this.visiblePalette.removeEventListener("dragover", this);
|
||||
this.visiblePalette.removeEventListener("dragexit", this);
|
||||
this.visiblePalette.removeEventListener("drop", this);
|
||||
|
||||
let window = this.window;
|
||||
let document = this.document;
|
||||
|
||||
if (this._changed) {
|
||||
// XXXmconley: At first, it seems strange to also persist the old way with
|
||||
// currentset - but this might actually be useful for switching
|
||||
// to old builds. We might want to keep this around for a little
|
||||
// bit.
|
||||
this.persistCurrentSets();
|
||||
}
|
||||
|
||||
document.documentElement.removeAttribute("customizing");
|
||||
|
||||
for (let target of this.areas) {
|
||||
for (let toolbarItem of target.children) {
|
||||
if (this.isWrappedToolbarItem(toolbarItem)) {
|
||||
this.unwrapToolbarItem(toolbarItem);
|
||||
}
|
||||
}
|
||||
target.removeEventListener("dragstart", this);
|
||||
target.removeEventListener("dragover", this);
|
||||
target.removeEventListener("dragexit", this);
|
||||
target.removeEventListener("drop", this);
|
||||
}
|
||||
|
||||
// And drop all area references.
|
||||
this.areas = [];
|
||||
|
||||
// Let everybody in this window know that we're finished customizing.
|
||||
let evt = document.createEvent("CustomEvent");
|
||||
evt.initCustomEvent("CustomizationEnd", true, true, {changed: this._changed});
|
||||
window.dispatchEvent(evt);
|
||||
|
||||
window.PanelUI.replaceMainView(window.PanelUI.mainView);
|
||||
|
||||
let browser = document.getElementById("browser");
|
||||
browser.parentNode.selectedPanel = browser;
|
||||
|
||||
if (this.browser.selectedBrowser.currentURI.spec == kAboutURI) {
|
||||
let custBrowser = this.browser.selectedBrowser;
|
||||
if (custBrowser.canGoBack) {
|
||||
// If there's history to this tab, just go back.
|
||||
custBrowser.goBack();
|
||||
} else {
|
||||
let customizationTab = this.browser.selectedTab;
|
||||
if (this.browser.browsers.length == 1) {
|
||||
this.window.BrowserOpenTab();
|
||||
}
|
||||
this.browser.removeTab(customizationTab);
|
||||
}
|
||||
}
|
||||
|
||||
this._changed = false;
|
||||
this._customizing = false;
|
||||
},
|
||||
|
||||
populatePalette: function() {
|
||||
let toolboxPalette = this.window.gNavToolbox.palette;
|
||||
|
||||
let unusedWidgets = CustomizableUI.getUnusedWidgets(toolboxPalette);
|
||||
for (let widget of unusedWidgets) {
|
||||
let paletteItem = this.makePaletteItem(widget, "palette");
|
||||
this.visiblePalette.appendChild(paletteItem);
|
||||
}
|
||||
|
||||
this._stowedPalette = this.window.gNavToolbox.palette;
|
||||
this.window.gNavToolbox.palette = this.visiblePalette;
|
||||
},
|
||||
|
||||
//XXXunf Maybe this should use -moz-element instead of wrapping the node?
|
||||
// Would ensure no weird interactions/event handling from original node,
|
||||
// and makes it possible to put this in a lazy-loaded iframe/real tab
|
||||
// while still getting rid of the need for overlays.
|
||||
makePaletteItem: function(aWidget, aPlace) {
|
||||
let widgetNode = aWidget.forWindow(this.window).node;
|
||||
let wrapper = this.createWrapper(widgetNode, aPlace);
|
||||
wrapper.appendChild(widgetNode);
|
||||
return wrapper;
|
||||
},
|
||||
|
||||
depopulatePalette: function() {
|
||||
let wrapper = this.visiblePalette.firstChild;
|
||||
|
||||
while (wrapper) {
|
||||
let widgetNode = wrapper.firstChild;
|
||||
|
||||
let provider = CustomizableUI.getWidget(widgetNode.id);
|
||||
// If provider is PROVIDER_SPECIAL, then it just gets thrown away.
|
||||
if (provider = CustomizableUI.PROVIDER_XUL) {
|
||||
if (wrapper.hasAttribute("itemdisabled")) {
|
||||
widgetNode.disabled = true;
|
||||
}
|
||||
|
||||
if (wrapper.hasAttribute("itemchecked")) {
|
||||
widgetNode.checked = true;
|
||||
}
|
||||
|
||||
if (wrapper.hasAttribute("itemcommand")) {
|
||||
let commandID = wrapper.getAttribute("itemcommand");
|
||||
widgetNode.setAttribute("command", commandID);
|
||||
|
||||
// Ensure node is in sync with its command after customizing.
|
||||
let command = this.document.getElementById(commandID);
|
||||
if (command && command.hasAttribute("disabled")) {
|
||||
widgetNode.setAttribute("disabled",
|
||||
command.getAttribute("disabled"));
|
||||
}
|
||||
}
|
||||
|
||||
this._stowedPalette.appendChild(widgetNode);
|
||||
} else if (provider = CustomizableUI.PROVIDER_API) {
|
||||
//XXXunf Currently this doesn't destroy the (now unused) node. It would
|
||||
// be good to do so, but we need to keep strong refs to it in
|
||||
// CustomizableUI (can't iterate of WeakMaps), and there's the
|
||||
// question of what behavior wrappers should have if consumers
|
||||
// keep hold of them.
|
||||
//widget.destroyInstance(widgetNode);
|
||||
}
|
||||
|
||||
this.visiblePalette.removeChild(wrapper);
|
||||
wrapper = this.visiblePalette.firstChild;
|
||||
}
|
||||
this.window.gNavToolbox.palette = this._stowedPalette;
|
||||
},
|
||||
|
||||
isCustomizableItem: function(aNode) {
|
||||
return aNode.localName == "toolbarbutton" ||
|
||||
aNode.localName == "toolbaritem" ||
|
||||
aNode.localName == "toolbarseparator" ||
|
||||
aNode.localName == "toolbarspring" ||
|
||||
aNode.localName == "toolbarspacer";
|
||||
},
|
||||
|
||||
isWrappedToolbarItem: function(aNode) {
|
||||
return aNode.localName == "toolbarpaletteitem";
|
||||
},
|
||||
|
||||
wrapToolbarItem: function(aNode, aPlace) {
|
||||
let wrapper = this.createWrapper(aNode, aPlace);
|
||||
// It's possible that this toolbar node is "mid-flight" and doesn't have
|
||||
// a parent, in which case we skip replacing it. This can happen if a
|
||||
// toolbar item has been dragged into the palette. In that case, we tell
|
||||
// CustomizableUI to remove the widget from its area before putting the
|
||||
// widget in the palette - so the node will have no parent.
|
||||
if (aNode.parentNode) {
|
||||
aNode = aNode.parentNode.replaceChild(wrapper, aNode);
|
||||
}
|
||||
wrapper.appendChild(aNode);
|
||||
return wrapper;
|
||||
},
|
||||
|
||||
createWrapper: function(aNode, aPlace) {
|
||||
let wrapper = this.document.createElement("toolbarpaletteitem");
|
||||
|
||||
// "place" is used by toolkit to add the toolbarpaletteitem-palette
|
||||
// binding to a toolbarpaletteitem, which gives it a label node for when
|
||||
// it's sitting in the palette.
|
||||
wrapper.setAttribute("place", aPlace);
|
||||
|
||||
// Ensure the wrapped item doesn't look like it's in any special state, and
|
||||
// can't be interactved with when in the customization palette.
|
||||
if (aNode.hasAttribute("command")) {
|
||||
wrapper.setAttribute("itemcommand", aNode.getAttribute("command"));
|
||||
aNode.removeAttribute("command");
|
||||
}
|
||||
|
||||
if (aNode.checked) {
|
||||
wrapper.setAttribute("itemchecked", "true");
|
||||
aNode.checked = false;
|
||||
}
|
||||
|
||||
if (aNode.disabled) {
|
||||
wrapper.setAttribute("itemdisabled", "true");
|
||||
aNode.disabled = false;
|
||||
}
|
||||
|
||||
if (aNode.hasAttribute("id")) {
|
||||
wrapper.setAttribute("id", "wrapper-" + aNode.getAttribute("id"));
|
||||
}
|
||||
|
||||
if (aNode.hasAttribute("title")) {
|
||||
wrapper.setAttribute("title", aNode.getAttribute("title"));
|
||||
} else if (aNode.hasAttribute("label")) {
|
||||
wrapper.setAttribute("title", aNode.getAttribute("label"));
|
||||
}
|
||||
|
||||
if (aNode.hasAttribute("flex")) {
|
||||
wrapper.setAttribute("flex", aNode.getAttribute("flex"));
|
||||
}
|
||||
|
||||
wrapper.addEventListener("mousedown", this);
|
||||
wrapper.addEventListener("mouseup", this);
|
||||
|
||||
return wrapper;
|
||||
},
|
||||
|
||||
unwrapToolbarItem: function(aWrapper) {
|
||||
aWrapper.removeEventListener("mousedown", this);
|
||||
aWrapper.removeEventListener("mouseup", this);
|
||||
|
||||
let toolbarItem = aWrapper.firstChild;
|
||||
|
||||
if (aWrapper.hasAttribute("itemdisabled")) {
|
||||
toolbarItem.disabled = true;
|
||||
}
|
||||
|
||||
if (aWrapper.hasAttribute("itemchecked")) {
|
||||
toolbarItem.checked = true;
|
||||
}
|
||||
|
||||
if (aWrapper.hasAttribute("itemcommand")) {
|
||||
let commandID = aWrapper.getAttribute("itemcommand");
|
||||
toolbarItem.setAttribute("command", commandID);
|
||||
|
||||
//XXX Bug 309953 - toolbarbuttons aren't in sync with their commands after customizing
|
||||
let command = this.document.getElementById(commandID);
|
||||
if (command && command.hasAttribute("disabled")) {
|
||||
toolbarItem.setAttribute("disabled", command.getAttribute("disabled"));
|
||||
}
|
||||
}
|
||||
|
||||
if (aWrapper.parentNode) {
|
||||
aWrapper.parentNode.replaceChild(toolbarItem, aWrapper);
|
||||
}
|
||||
return toolbarItem;
|
||||
},
|
||||
|
||||
persistCurrentSets: function() {
|
||||
let document = this.document;
|
||||
let toolbars = document.querySelectorAll("toolbar[customizable='true']");
|
||||
for (let toolbar of toolbars) {
|
||||
let set = toolbar.currentSet;
|
||||
toolbar.setAttribute("currentset", set);
|
||||
LOG("Setting currentset of " + toolbar.id + " as " + set);
|
||||
// Persist the currentset attribute directly on hardcoded toolbars.
|
||||
document.persist(toolbar.id, "currentset");
|
||||
}
|
||||
},
|
||||
|
||||
reset: function() {
|
||||
CustomizableUI.reset();
|
||||
},
|
||||
|
||||
onWidgetMoved: function(aWidgetId, aArea, aOldPosition, aNewPosition) {
|
||||
this._changed = true;
|
||||
},
|
||||
|
||||
onWidgetAdded: function(aWidgetId, aArea, aPosition) {
|
||||
this._changed = true;
|
||||
},
|
||||
|
||||
onWidgetRemoved: function(aWidgetId, aArea) {
|
||||
this._changed = true;
|
||||
},
|
||||
|
||||
onWidgetCreated: function(aWidgetId) {
|
||||
},
|
||||
|
||||
onWidgetDestroyed: function(aWidgetId) {
|
||||
},
|
||||
|
||||
handleEvent: function(aEvent) {
|
||||
switch(aEvent.type) {
|
||||
case "dragstart":
|
||||
this._onDragStart(aEvent);
|
||||
break;
|
||||
case "dragover":
|
||||
this._onDragOver(aEvent);
|
||||
break;
|
||||
case "drop":
|
||||
this._onDragDrop(aEvent);
|
||||
break;
|
||||
case "dragexit":
|
||||
this._onDragExit(aEvent);
|
||||
break;
|
||||
case "mousedown":
|
||||
this._onMouseDown(aEvent);
|
||||
break;
|
||||
case "mouseup":
|
||||
this._onMouseUp(aEvent);
|
||||
break;
|
||||
case "keypress":
|
||||
if (aEvent.keyCode == aEvent.DOM_VK_ESCAPE) {
|
||||
this.exit();
|
||||
}
|
||||
break;
|
||||
case "click":
|
||||
if (aEvent.button == 0 &&
|
||||
(aEvent.originalTarget == this.window.PanelUI.menuButton) ||
|
||||
(aEvent.originalTarget == this.document.getElementById("tab-view-deck"))) {
|
||||
this.exit();
|
||||
aEvent.preventDefault();
|
||||
}
|
||||
break;
|
||||
case "TabSelect":
|
||||
this._onTabSelect(aEvent);
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
_onDragStart: function(aEvent) {
|
||||
__dumpDragData(aEvent);
|
||||
let item = aEvent.target;
|
||||
while (item && item.localName != "toolbarpaletteitem") {
|
||||
if (item.localName == "toolbar") {
|
||||
return;
|
||||
}
|
||||
item = item.parentNode;
|
||||
}
|
||||
|
||||
let dt = aEvent.dataTransfer;
|
||||
let documentId = aEvent.target.ownerDocument.documentElement.id;
|
||||
dt.setData("text/toolbarwrapper-id/" + documentId, item.firstChild.id);
|
||||
dt.effectAllowed = "move";
|
||||
},
|
||||
|
||||
_onDragOver: function(aEvent) {
|
||||
__dumpDragData(aEvent);
|
||||
|
||||
let document = aEvent.target.ownerDocument;
|
||||
let documentId = document.documentElement.id;
|
||||
if (!aEvent.dataTransfer.types.contains("text/toolbarwrapper-id/"
|
||||
+ documentId.toLowerCase())) {
|
||||
return;
|
||||
}
|
||||
|
||||
let draggedItemId = aEvent.dataTransfer.getData("text/toolbarwrapper-id/" + documentId);
|
||||
let draggedWrapper = document.getElementById("wrapper-" + draggedItemId);
|
||||
let targetNode = aEvent.target;
|
||||
let targetParent = targetNode.parentNode;
|
||||
let targetArea = this._getCustomizableParent(targetNode);
|
||||
let originArea = this._getCustomizableParent(draggedWrapper);
|
||||
|
||||
// Do nothing if the target or origin are not customizable.
|
||||
if (!targetArea || !originArea) {
|
||||
gCurrentDragOverItem = null;
|
||||
return;
|
||||
}
|
||||
|
||||
// We need to determine the place that the widget is being dropped in
|
||||
// the target.
|
||||
let position = Array.indexOf(targetParent.children, targetNode);
|
||||
let dragOverItem = position == -1 ? targetParent.lastChild : targetParent.children[position];
|
||||
|
||||
if (this._dragOverItem && dragOverItem != this._dragOverItem) {
|
||||
this._setDragActive(this._dragOverItem, false);
|
||||
}
|
||||
|
||||
// XXXjaws Only handling the toolbar case first.
|
||||
if (targetArea.localName == "toolbar") {
|
||||
this._setDragActive(dragOverItem, true);
|
||||
}
|
||||
this._dragOverItem = dragOverItem;
|
||||
|
||||
aEvent.preventDefault();
|
||||
aEvent.stopPropagation();
|
||||
},
|
||||
|
||||
_onDragDrop: function(aEvent) {
|
||||
__dumpDragData(aEvent);
|
||||
|
||||
this._setDragActive(this._dragOverItem, false);
|
||||
|
||||
let document = aEvent.target.ownerDocument;
|
||||
let documentId = document.documentElement.id;
|
||||
let draggedItemId = aEvent.dataTransfer.getData("text/toolbarwrapper-id/" + documentId);
|
||||
let draggedWrapper = document.getElementById("wrapper-" + draggedItemId);
|
||||
|
||||
draggedWrapper.removeAttribute("mousedown");
|
||||
|
||||
let targetNode = aEvent.target;
|
||||
let targetParent = targetNode.parentNode;
|
||||
let targetArea = this._getCustomizableParent(targetNode);
|
||||
let originArea = this._getCustomizableParent(draggedWrapper);
|
||||
|
||||
// Do nothing if the target area or origin area are not customizable.
|
||||
if (!targetArea || !originArea) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Do nothing if the target was dropped onto itself (ie, no change in area
|
||||
// or position).
|
||||
if (draggedWrapper == targetNode) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Is the target area the customization palette? If so, we have two cases -
|
||||
// either the originArea was the palette, or a customizable area.
|
||||
if (targetArea.id == kPaletteId) {
|
||||
if (originArea.id !== kPaletteId) {
|
||||
let widget = this.unwrapToolbarItem(draggedWrapper);
|
||||
CustomizableUI.removeWidgetFromArea(draggedItemId);
|
||||
draggedWrapper = this.wrapToolbarItem(widget, "palette");
|
||||
}
|
||||
|
||||
// If the targetNode is the palette itself, just append
|
||||
if (targetNode == this.visiblePalette) {
|
||||
this.visiblePalette.appendChild(draggedWrapper);
|
||||
} else {
|
||||
this.visiblePalette.insertBefore(draggedWrapper, targetNode);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// Is the target the customization area itself? If so, we just add the
|
||||
// widget to the end of the area.
|
||||
if (targetNode == targetArea.customizationTarget) {
|
||||
let widget = this.unwrapToolbarItem(draggedWrapper);
|
||||
CustomizableUI.addWidgetToArea(draggedItemId, targetArea.id);
|
||||
this.wrapToolbarItem(widget, getPlaceForItem(targetNode));
|
||||
return;
|
||||
}
|
||||
|
||||
// We need to determine the place that the widget is being dropped in
|
||||
// the target.
|
||||
let placement = CustomizableUI.getPlacementOfWidget(targetNode.firstChild.id);
|
||||
if (!placement) {
|
||||
ERROR("Could not get a position for " + targetNode.firstChild.id);
|
||||
return;
|
||||
}
|
||||
|
||||
let position = placement.position;
|
||||
|
||||
// Is the target area the same as the origin? Since we've already handled
|
||||
// the possibility that the target is the customization palette, we know
|
||||
// that the widget is moving within a customizable area.
|
||||
if (targetArea == originArea) {
|
||||
let properPlace = getPlaceForItem(targetNode);
|
||||
// We unwrap the moving widget, as well as the widget that we're dropping
|
||||
// on (the target) so that moveWidgetWithinArea can correctly insert the
|
||||
// moving widget before the target widget.
|
||||
let widget = this.unwrapToolbarItem(draggedWrapper);
|
||||
let targetWidget = this.unwrapToolbarItem(targetNode);
|
||||
CustomizableUI.moveWidgetWithinArea(draggedItemId, position);
|
||||
this.wrapToolbarItem(targetWidget, properPlace);
|
||||
this.wrapToolbarItem(widget, properPlace);
|
||||
return;
|
||||
}
|
||||
|
||||
// A little hackery - we quickly unwrap the item and use CustomizableUI's
|
||||
// addWidgetToArea to move the widget to the right place for every window,
|
||||
// then we re-wrap the widget. We have to unwrap the target widget too so
|
||||
// that addWidgetToArea inserts the new widget into the right place.
|
||||
let properPlace = getPlaceForItem(targetNode);
|
||||
let widget = this.unwrapToolbarItem(draggedWrapper);
|
||||
let targetWidget = this.unwrapToolbarItem(targetNode);
|
||||
CustomizableUI.addWidgetToArea(draggedItemId, targetArea.id, position);
|
||||
this.wrapToolbarItem(targetWidget, properPlace);
|
||||
draggedWrapper = this.wrapToolbarItem(widget, properPlace);
|
||||
},
|
||||
|
||||
_onDragExit: function(aEvent) {
|
||||
if (this._dragOverItem) {
|
||||
this._setDragActive(this._dragOverItem, false);
|
||||
}
|
||||
},
|
||||
|
||||
// XXXjaws Show a ghost image or blank area where the item could be added, instead of black bar
|
||||
_setDragActive: function(aItem, aValue) {
|
||||
let node = aItem;
|
||||
let window = aItem.ownerDocument.defaultView;
|
||||
let direction = window.getComputedStyle(aItem, null).direction;
|
||||
let value = direction == "ltr"? "left" : "right";
|
||||
if (aItem.localName == "toolbar") {
|
||||
node = aItem.lastChild;
|
||||
value = direction == "ltr"? "right" : "left";
|
||||
}
|
||||
|
||||
if (!node) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (aValue) {
|
||||
if (!node.hasAttribute("dragover")) {
|
||||
node.setAttribute("dragover", value);
|
||||
}
|
||||
} else {
|
||||
node.removeAttribute("dragover");
|
||||
}
|
||||
},
|
||||
|
||||
_getCustomizableParent: function(aElement) {
|
||||
let areas = CustomizableUI.areas;
|
||||
areas.push(kPaletteId);
|
||||
while (aElement) {
|
||||
if (areas.indexOf(aElement.id) != -1) {
|
||||
return aElement;
|
||||
}
|
||||
aElement = aElement.parentNode;
|
||||
}
|
||||
return null;
|
||||
},
|
||||
|
||||
_onMouseDown: function(aEvent) {
|
||||
let item = this._getWrapper(aEvent.target);
|
||||
if (item) {
|
||||
item.setAttribute("mousedown", "true");
|
||||
}
|
||||
},
|
||||
|
||||
_onMouseUp: function(aEvent) {
|
||||
let item = this._getWrapper(aEvent.target);
|
||||
if (item) {
|
||||
item.removeAttribute("mousedown");
|
||||
}
|
||||
},
|
||||
|
||||
_getWrapper: function(aElement) {
|
||||
while (aElement && aElement.localName != "toolbarpaletteitem") {
|
||||
if (aElement.localName == "toolbar")
|
||||
return null;
|
||||
aElement = aElement.parentNode;
|
||||
}
|
||||
return aElement;
|
||||
},
|
||||
|
||||
_onTabSelect: function(aEvent) {
|
||||
this._toggleCustomizationModeIfNecessary();
|
||||
},
|
||||
|
||||
onLocationChange: function(aBrowser, aProgress, aRequest, aLocation, aFlags) {
|
||||
if (this.browser.selectedBrowser != aBrowser) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._toggleCustomizationModeIfNecessary();
|
||||
},
|
||||
|
||||
/**
|
||||
* Looks at the currently selected browser tab, and if the location
|
||||
* is set to kAboutURI and we're not customizing, enters customize mode.
|
||||
* If we're not at kAboutURI and we are customizing, exits customize mode.
|
||||
*/
|
||||
_toggleCustomizationModeIfNecessary: function() {
|
||||
let browser = this.browser.selectedBrowser;
|
||||
if (browser.currentURI.spec == kAboutURI &&
|
||||
!this._customizing) {
|
||||
this.enter();
|
||||
} else if (browser.currentURI.spec != kAboutURI &&
|
||||
this._customizing) {
|
||||
this.exit();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function getPlaceForItem(aElement) {
|
||||
let place;
|
||||
let node = aElement;
|
||||
while (node && !place) {
|
||||
if (node.localName == "toolbar")
|
||||
place = "toolbar";
|
||||
else if (node.id == CustomizableUI.AREA_PANEL)
|
||||
place = "panel";
|
||||
else if (node.id == kPaletteId)
|
||||
place = "palette";
|
||||
|
||||
node = node.parentNode;
|
||||
}
|
||||
return place;
|
||||
}
|
||||
|
||||
function __dumpDragData(aEvent, caller) {
|
||||
let str = "Dumping drag data (CustomizeMode.jsm) {\n";
|
||||
str += " type: " + aEvent["type"] + "\n";
|
||||
for (let el of ["target", "currentTarget", "relatedTarget"]) {
|
||||
if (aEvent[el]) {
|
||||
str += " " + el + ": " + aEvent[el] + "(localName=" + aEvent[el].localName + "; id=" + aEvent[el].id + ")\n";
|
||||
}
|
||||
}
|
||||
for (let prop in aEvent.dataTransfer) {
|
||||
if (typeof aEvent.dataTransfer[prop] != "function") {
|
||||
str += " dataTransfer[" + prop + "]: " + aEvent.dataTransfer[prop] + "\n";
|
||||
}
|
||||
}
|
||||
str += "}";
|
||||
LOG(str);
|
||||
}
|
17
browser/components/customizableui/src/Makefile.in
Normal file
@ -0,0 +1,17 @@
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
# You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
DEPTH = @DEPTH@
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
EXTRA_JS_MODULES = \
|
||||
CustomizableUI.jsm \
|
||||
CustomizeMode.jsm \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
6
browser/components/customizableui/src/moz.build
Normal file
@ -0,0 +1,6 @@
|
||||
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
@ -7,6 +7,7 @@
|
||||
PARALLEL_DIRS += [
|
||||
'about',
|
||||
'certerror',
|
||||
'customizableui',
|
||||
'dirprovider',
|
||||
'downloads',
|
||||
'feeds',
|
||||
|
@ -1170,7 +1170,7 @@ BrowserGlue.prototype = {
|
||||
},
|
||||
|
||||
_migrateUI: function BG__migrateUI() {
|
||||
const UI_VERSION = 12;
|
||||
const UI_VERSION = 13;
|
||||
const BROWSER_DOCURL = "chrome://browser/content/browser.xul#";
|
||||
let currentUIVersion = 0;
|
||||
try {
|
||||
@ -1363,6 +1363,25 @@ BrowserGlue.prototype = {
|
||||
}
|
||||
}
|
||||
|
||||
if (currentUIVersion < 13) {
|
||||
// Migrate users from text or text&icons mode to icons mode.
|
||||
let toolbarResources = [this._rdf.GetResource(BROWSER_DOCURL + "navigator-toolbox"),
|
||||
this._rdf.GetResource(BROWSER_DOCURL + "nav-bar"),
|
||||
this._rdf.GetResource(BROWSER_DOCURL + "PersonalToolbar"),
|
||||
this._rdf.GetResource(BROWSER_DOCURL + "addon-bar")];
|
||||
let modeResource = this._rdf.GetResource("mode");
|
||||
let iconsizeResource = this._rdf.GetResource("iconsize");
|
||||
for (let toolbarResource of toolbarResources) {
|
||||
let toolbarMode = this._getPersist(toolbarResource, modeResource);
|
||||
if (toolbarMode != "icons") {
|
||||
this._setPersist(toolbarResource, modeResource, "icons");
|
||||
// If the user wasn't previously using icons mode, switch
|
||||
// them to the default (large icon mode).
|
||||
this._setPersist(toolbarResource, iconsizeResource, "large");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this._dirty)
|
||||
this._dataSource.QueryInterface(Ci.nsIRDFRemoteDataSource).Flush();
|
||||
|
||||
|
@ -15,6 +15,8 @@
|
||||
inside the private browsing mode -->
|
||||
<!ENTITY mainWindow.titlePrivateBrowsingSuffix "(Private Browsing)">
|
||||
|
||||
<!ENTITY appmenu.title "Customize and Control &brandFullName;">
|
||||
|
||||
<!-- Tab context menu -->
|
||||
<!ENTITY reloadTab.label "Reload Tab">
|
||||
<!ENTITY reloadTab.accesskey "R">
|
||||
@ -319,6 +321,10 @@ These should match what Safari and other Apple applications use on OS X Lion. --
|
||||
<!ENTITY appMenuGettingStarted.label "Getting Started">
|
||||
<!ENTITY appMenuSafeMode.label "Restart with Add-ons Disabled…">
|
||||
<!ENTITY appMenuSafeMode.accesskey "R">
|
||||
<!ENTITY appMenuBack.label "Back">
|
||||
<!ENTITY appMenuBookmarks.label "Bookmarks">
|
||||
<!ENTITY appMenuHistory.label "History">
|
||||
<!ENTITY appMenuHistoryMore.label "More…">
|
||||
|
||||
<!ENTITY openCmd.commandkey "l">
|
||||
<!ENTITY urlbar.placeholder2 "Search or enter address">
|
||||
@ -530,6 +536,9 @@ you can use these alternative items. Otherwise, their values should be empty. -
|
||||
<!ENTITY zoomOutButton.tooltip "Zoom out">
|
||||
<!ENTITY zoomInButton.tooltip "Zoom in">
|
||||
<!ENTITY zoomControls.label "Zoom Controls">
|
||||
<!ENTITY zoomReset.tooltip "Reset Zoom">
|
||||
<!-- LOCALIZATION NOTE(zoomReset.label): the % is the percent symbol. -->
|
||||
<!ENTITY zoomReset.label "100%">
|
||||
|
||||
<!ENTITY quitApplicationCmdWin.label "Exit">
|
||||
<!ENTITY quitApplicationCmdWin.accesskey "x">
|
||||
@ -640,6 +649,16 @@ just addresses the organization to follow, e.g. "This site is run by " -->
|
||||
<!ENTITY social.learnMore.accesskey "l">
|
||||
<!ENTITY social.closeNotificationItem.label "Not Now">
|
||||
|
||||
|
||||
|
||||
<!ENTITY customizeMode.tabTitle "Customize &brandShortName;">
|
||||
<!ENTITY customizeMode.menuAndToolbars.label "Menu and toolbars">
|
||||
<!ENTITY customizeMode.menuAndToolbars.header "More tools to add to the menu and toolbar">
|
||||
<!ENTITY customizeMode.appearance.label "Appearance">
|
||||
<!ENTITY customizeMode.appearance.header "Bling!">
|
||||
<!ENTITY customizeMode.restoreDefaults "Restore Defaults">
|
||||
<!ENTITY customizeMode.done "Done">
|
||||
|
||||
<!ENTITY social.chatBar.commandkey "c">
|
||||
<!ENTITY social.chatBar.label "Focus chats">
|
||||
<!ENTITY social.chatBar.accesskey "c">
|
||||
|
BIN
browser/themes/linux/appmenu.png
Normal file
After Width: | Height: | Size: 247 B |
29
browser/themes/linux/browser-lightweightTheme.css
Normal file
@ -0,0 +1,29 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
%include linuxShared.inc
|
||||
%filter substitution
|
||||
|
||||
/*
|
||||
* LightweightThemeListener will append the current lightweight theme's header
|
||||
* image to the background-image for each of the following rulesets.
|
||||
*/
|
||||
|
||||
/* Lightweight theme on tabs */
|
||||
#tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab > .tab-stack > .tab-background > .tab-background-start[selected=true]:-moz-lwtheme::before,
|
||||
#tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab > .tab-stack > .tab-background > .tab-background-end[selected=true]:-moz-lwtheme::before {
|
||||
background-attachment: scroll, fixed;
|
||||
background-color: transparent;
|
||||
background-image: @fgTabTexture@;/*, lwtHeader;*/
|
||||
background-position: 0 0, right top;
|
||||
}
|
||||
|
||||
#tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab > .tab-stack > .tab-background > .tab-background-middle[selected=true]:-moz-lwtheme {
|
||||
background-attachment: scroll, scroll, fixed;
|
||||
background-color: transparent;
|
||||
background-image: url(chrome://browser/skin/tabbrowser/tab-active-middle.png),
|
||||
@fgTabTexture@;/*,
|
||||
lwtHeader;*/
|
||||
background-position: 0 0, 0 0, right top;
|
||||
}
|
@ -10,12 +10,12 @@
|
||||
@namespace html url("http://www.w3.org/1999/xhtml");
|
||||
|
||||
%include ../shared/browser.inc
|
||||
%include linuxShared.inc
|
||||
%filter substitution
|
||||
%define toolbarHighlight rgba(255,255,255,.3)
|
||||
%define selectedTabHighlight rgba(255,255,255,.8) 1px, rgba(255,255,255,.5) 3px
|
||||
|
||||
%define forwardTransitionLength 150ms
|
||||
%define conditionalForwardWithUrlbar window:not([chromehidden~=toolbar]) :-moz-any(#nav-bar[currentset*="unified-back-forward-button,urlbar-container"][mode=icons], #nav-bar:not([currentset])[mode=icons]) > #unified-back-forward-button
|
||||
%define conditionalForwardWithUrlbar_small window:not([chromehidden~=toolbar]) :-moz-any(#nav-bar[currentset*="unified-back-forward-button,urlbar-container"][mode=icons][iconsize=small],#nav-bar:not([currentset])[mode=icons][iconsize=small]) > #unified-back-forward-button
|
||||
%define conditionalForwardWithUrlbar window:not([chromehidden~=toolbar]) :-moz-any(#nav-bar[currentset*="unified-back-forward-button,urlbar-container"], #nav-bar:not([currentset])) > #nav-bar-customizationtarget > #unified-back-forward-button
|
||||
%define conditionalForwardWithUrlbar_small window:not([chromehidden~=toolbar]) :-moz-any(#nav-bar[currentset*="unified-back-forward-button,urlbar-container"][iconsize=small],#nav-bar:not([currentset])[iconsize=small]) > #nav-bar-customizationtarget > #unified-back-forward-button
|
||||
%define conditionalForwardWithUrlbarWidth 32
|
||||
%define conditionalForwardWithUrlbarWidth_small 24
|
||||
|
||||
@ -91,7 +91,7 @@ toolbarbutton.bookmark-item[open="true"] {
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
/* Prevent [mode="icons"] from hiding the label */
|
||||
/* Force the display of the label for bookmarks */
|
||||
.bookmark-item > .toolbarbutton-text {
|
||||
display: -moz-box !important;
|
||||
}
|
||||
@ -537,11 +537,6 @@ menuitem:not([type]):not(.menuitem-tooltip):not(.menuitem-iconic-tooltip) {
|
||||
-moz-margin-end: 0;
|
||||
}
|
||||
|
||||
toolbar[mode="full"] .toolbarbutton-1:not([type="menu-button"]),
|
||||
toolbar[mode="full"] .toolbarbutton-1 > .toolbarbutton-menubutton-button {
|
||||
min-width: 57px;
|
||||
}
|
||||
|
||||
.toolbarbutton-1:not([type="menu-button"]),
|
||||
.toolbarbutton-1 > .toolbarbutton-menubutton-button {
|
||||
padding: 5px;
|
||||
@ -1541,6 +1536,8 @@ toolbar[iconsize="small"] #bookmarks-menu-button[starred],
|
||||
|
||||
/* Tabstrip */
|
||||
|
||||
%include ../shared/tabs.inc.css
|
||||
|
||||
#TabsToolbar {
|
||||
min-height: 0;
|
||||
padding: 0;
|
||||
@ -1549,6 +1546,9 @@ toolbar[iconsize="small"] #bookmarks-menu-button[starred],
|
||||
#TabsToolbar[tabsontop=true]:not(:-moz-lwtheme) {
|
||||
-moz-appearance: menubar;
|
||||
color: -moz-menubartext;
|
||||
}
|
||||
|
||||
#TabsToolbar[tabsontop=true] {
|
||||
box-shadow: 0 -1px 0 rgba(0,0,0,.1) inset;
|
||||
}
|
||||
|
||||
@ -1556,110 +1556,27 @@ toolbar[iconsize="small"] #bookmarks-menu-button[starred],
|
||||
-moz-binding: url("chrome://global/content/bindings/toolbar.xml#toolbar-drag");
|
||||
}
|
||||
|
||||
#TabsToolbar[tabsontop=true]:not(:-moz-lwtheme) > #tabbrowser-tabs > .tabbrowser-tab:not([selected]) {
|
||||
color: -moz-menubartext;
|
||||
}
|
||||
|
||||
#TabsToolbar[tabsontop=false] {
|
||||
background-image: linear-gradient(to top, rgba(0,0,0,.3) 1px, rgba(0,0,0,.05) 1px, transparent 50%);
|
||||
}
|
||||
|
||||
.tabbrowser-tab,
|
||||
.tabs-newtab-button {
|
||||
position: static;
|
||||
-moz-appearance: none;
|
||||
background: linear-gradient(hsla(0,0%,100%,.2), hsla(0,0%,45%,.2) 2px, hsla(0,0%,32%,.2) 80%);
|
||||
background-origin: border-box;
|
||||
background-position: 1px 2px;
|
||||
background-size: 100% calc(100% - 2px);
|
||||
background-repeat: no-repeat;
|
||||
color: inherit;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border-width: 4px 5px 3px 6px;
|
||||
border-style: solid;
|
||||
border-image: url(tabbrowser/tab.png) 4 5 3 6 fill repeat stretch;
|
||||
border-radius: 10px 8px 0 0;
|
||||
min-height: 25px; /* reserve space for the sometimes hidden close button */
|
||||
.tab-background-middle[selected=true]:-moz-lwtheme {
|
||||
background-image: url(chrome://browser/skin/tabbrowser/tab-active-middle.png),
|
||||
@fgTabTexture@;
|
||||
}
|
||||
|
||||
.tabbrowser-tab:hover,
|
||||
.tabs-newtab-button:hover {
|
||||
background-image: linear-gradient(hsla(0,0%,100%,.6), hsla(0,0%,100%,.2) 4px, hsla(0,0%,75%,.2) 80%);
|
||||
}
|
||||
|
||||
.tabbrowser-tab[selected="true"] {
|
||||
background-image: linear-gradient(@selectedTabHighlight@, @toolbarHighlight@ 32%),
|
||||
linear-gradient(-moz-dialog, -moz-dialog);
|
||||
color: -moz-dialogtext;
|
||||
}
|
||||
|
||||
#main-window[tabsontop=false]:not([disablechrome]) .tabbrowser-tab[selected=true]:not(:-moz-lwtheme) {
|
||||
background-image: linear-gradient(to top, rgba(0,0,0,.3) 1px, transparent 1px),
|
||||
linear-gradient(@selectedTabHighlight@, @toolbarHighlight@ 32%),
|
||||
linear-gradient(-moz-dialog, -moz-dialog);
|
||||
}
|
||||
|
||||
.tabbrowser-tab[selected="true"]:-moz-lwtheme {
|
||||
background-image: linear-gradient(@selectedTabHighlight@, @toolbarHighlight@ 32%);
|
||||
.tabbrowser-tab {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.tabbrowser-tab:-moz-lwtheme-brighttext:not([selected="true"]),
|
||||
.tabs-newtab-button:-moz-lwtheme-brighttext {
|
||||
background-image: linear-gradient(hsla(0,0%,60%,.6), hsla(0,0%,40%,.6) 4px, hsla(0,0%,30%,.6) 80%);
|
||||
}
|
||||
|
||||
.tabbrowser-tab:-moz-lwtheme-brighttext:not([selected="true"]):hover,
|
||||
.tabs-newtab-button:-moz-lwtheme-brighttext:hover {
|
||||
background-image: linear-gradient(hsla(0,0%,80%,.6), hsla(0,0%,60%,.6) 4px, hsla(0,0%,45%,.6) 80%);
|
||||
}
|
||||
|
||||
.tabbrowser-tab:-moz-lwtheme-darktext:not([selected="true"]),
|
||||
.tabs-newtab-button:-moz-lwtheme-darktext {
|
||||
background-image: linear-gradient(hsla(0,0%,100%,.5), hsla(0,0%,60%,.5) 4px, hsla(0,0%,45%,.5) 80%);
|
||||
}
|
||||
|
||||
.tabbrowser-tab:-moz-lwtheme-darktext:not([selected="true"]):hover,
|
||||
.tabs-newtab-button:-moz-lwtheme-darktext:hover {
|
||||
background-image: linear-gradient(hsla(0,0%,100%,.5), hsla(0,0%,80%,.5) 4px, hsla(0,0%,60%,.5) 80%);
|
||||
}
|
||||
|
||||
.tabbrowser-tab[pinned][titlechanged]:not([selected="true"]) {
|
||||
background-image: radial-gradient(circle farthest-corner at 50% 3px, rgba(233,242,252,1) 3%, rgba(172,206,255,.75) 40%, rgba(87,151,201,.5) 80%, rgba(87,151,201,0));
|
||||
}
|
||||
.tabbrowser-tab[pinned][titlechanged]:not([selected="true"]):hover {
|
||||
background-image: linear-gradient(hsla(0,0%,100%,.8), hsla(0,0%,100%,.6) 2px, hsla(0,0%,75%,.2) 80%),
|
||||
radial-gradient(circle farthest-corner at 50% 3px, rgba(233,242,252,1) 3%, rgba(172,206,255,.75) 40%, rgba(87,151,201,.5) 80%, rgba(87,151,201,0));
|
||||
}
|
||||
|
||||
#tabbrowser-tabs[positionpinnedtabs] > .tabbrowser-tab > .tab-stack > .tab-content[pinned] {
|
||||
min-height: 18px; /* corresponds to the max. height of non-textual tab contents, i.e. the tab close button */
|
||||
}
|
||||
|
||||
.tabbrowser-tab:focus > .tab-stack {
|
||||
.tabbrowser-tab:focus > .tab-stack > .tab-content > .tab-label {
|
||||
outline: 1px dotted;
|
||||
}
|
||||
|
||||
.tab-throbber,
|
||||
.tab-icon-image {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
-moz-margin-end: 3px;
|
||||
list-style-image: url("chrome://mozapps/skin/places/defaultFavicon.png");
|
||||
}
|
||||
|
||||
.tab-throbber {
|
||||
list-style-image: url("chrome://browser/skin/tabbrowser/connecting.png");
|
||||
}
|
||||
|
||||
.tab-throbber[progress] {
|
||||
list-style-image: url("chrome://browser/skin/tabbrowser/loading.png");
|
||||
}
|
||||
|
||||
.tab-throbber[pinned],
|
||||
.tab-icon-image[pinned],
|
||||
.tabs-newtab-button > .toolbarbutton-icon {
|
||||
-moz-margin-start: 2px;
|
||||
-moz-margin-end: 2px;
|
||||
}
|
||||
|
||||
#context_reloadTab {
|
||||
list-style-image: url("moz-icon://stock/gtk-refresh?size=menu");
|
||||
}
|
||||
@ -1694,11 +1611,10 @@ toolbar[iconsize="small"] #bookmarks-menu-button[starred],
|
||||
}
|
||||
|
||||
.tab-close-button {
|
||||
padding: 0;
|
||||
list-style-image: url("moz-icon://stock/gtk-close?size=menu");
|
||||
margin-top: -1px;
|
||||
margin-top: 0;
|
||||
margin-bottom: -1px;
|
||||
-moz-margin-end: -1px;
|
||||
-moz-margin-end: -4px;
|
||||
}
|
||||
|
||||
/* Tabstrip new tab button */
|
||||
@ -1819,10 +1735,6 @@ toolbarbutton.chevron > .toolbarbutton-icon {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
toolbar[mode="text"] toolbarbutton.chevron > .toolbarbutton-icon {
|
||||
display: -moz-box; /* display chevron icon in text mode */
|
||||
}
|
||||
|
||||
/* Ctrl-Tab */
|
||||
|
||||
.ctrlTab-preview {
|
||||
@ -2200,6 +2112,12 @@ chatbox {
|
||||
border-top-right-radius: 2.5px;
|
||||
}
|
||||
|
||||
/* Customization mode */
|
||||
|
||||
%include ../shared/customizableui/customizeMode.inc.css
|
||||
|
||||
/* End customization mode */
|
||||
|
||||
.click-to-play-plugins-notification-content {
|
||||
margin: -10px;
|
||||
}
|
||||
|
After Width: | Height: | Size: 90 KiB |
41
browser/themes/linux/customizableui/panelUIOverlay.css
Normal file
@ -0,0 +1,41 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
%filter substitution
|
||||
%define menuPanelWidth 21em
|
||||
|
||||
%include ../../shared/customizableui/panelUIOverlay.inc.css
|
||||
|
||||
#PanelUI-cut-btn {
|
||||
list-style-image: url("moz-icon://stock/gtk-cut?size=toolbar");
|
||||
}
|
||||
#PanelUI-cut-btn[disabled="true"] {
|
||||
list-style-image: url("moz-icon://stock/gtk-cut?size=toolbar&state=disabled");
|
||||
}
|
||||
|
||||
#PanelUI-copy-btn {
|
||||
list-style-image: url("moz-icon://stock/gtk-copy?size=toolbar");
|
||||
}
|
||||
#PanelUI-copy-btn[disabled="true"] {
|
||||
list-style-image: url("moz-icon://stock/gtk-copy?size=toolbar&state=disabled");
|
||||
}
|
||||
|
||||
#PanelUI-paste-btn {
|
||||
list-style-image: url("moz-icon://stock/gtk-paste?size=toolbar");
|
||||
}
|
||||
#PanelUI-paste-btn[disabled="true"] {
|
||||
list-style-image: url("moz-icon://stock/gtk-paste?size=toolbar&state=disabled");
|
||||
}
|
||||
|
||||
#PanelUI-zoomOut-btn {
|
||||
list-style-image: url("moz-icon://stock/gtk-zoom-out?size=toolbar");
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
}
|
||||
|
||||
#PanelUI-zoomIn-btn {
|
||||
list-style-image: url("moz-icon://stock/gtk-zoom-in?size=toolbar");
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
}
|
@ -18,8 +18,11 @@ browser.jar:
|
||||
skin/classic/browser/aboutSyncTabs.css
|
||||
#endif
|
||||
skin/classic/browser/actionicon-tab.png
|
||||
skin/classic/browser/appmenu.png
|
||||
* skin/classic/browser/browser.css
|
||||
* skin/classic/browser/browser-lightweightTheme.css
|
||||
skin/classic/browser/click-to-play-warning-stripes.png
|
||||
skin/classic/browser/customizableui/customization-mode-background.jpg (customizableui/customization-mode-background.jpg)
|
||||
* skin/classic/browser/engineManager.css
|
||||
skin/classic/browser/Geolocation-16.png
|
||||
skin/classic/browser/Geolocation-64.png
|
||||
@ -55,6 +58,7 @@ browser.jar:
|
||||
skin/classic/browser/webRTC-shareDevice-16.png
|
||||
skin/classic/browser/webRTC-shareDevice-64.png
|
||||
skin/classic/browser/webRTC-sharingDevice-16.png
|
||||
* skin/classic/browser/customizableui/panelUIOverlay.css (customizableui/panelUIOverlay.css)
|
||||
skin/classic/browser/downloads/buttons.png (downloads/buttons.png)
|
||||
skin/classic/browser/downloads/download-glow.png (downloads/download-glow.png)
|
||||
skin/classic/browser/downloads/download-glow-small.png (downloads/download-glow-small.png)
|
||||
@ -107,8 +111,15 @@ browser.jar:
|
||||
skin/classic/browser/tabbrowser/connecting.png (tabbrowser/connecting.png)
|
||||
skin/classic/browser/tabbrowser/loading.png (tabbrowser/loading.png)
|
||||
skin/classic/browser/tabbrowser/tab.png (tabbrowser/tab.png)
|
||||
skin/classic/browser/tabbrowser/tab-overflow-border.png (tabbrowser/tab-overflow-border.png)
|
||||
skin/classic/browser/tabbrowser/tabDragIndicator.png (tabbrowser/tabDragIndicator.png)
|
||||
skin/classic/browser/tabbrowser/tab-active-middle.png (tabbrowser/tab-active-middle.png)
|
||||
skin/classic/browser/tabbrowser/tab-background-end.png (tabbrowser/tab-background-end.png)
|
||||
skin/classic/browser/tabbrowser/tab-background-middle.png (tabbrowser/tab-background-middle.png)
|
||||
skin/classic/browser/tabbrowser/tab-background-start.png (tabbrowser/tab-background-start.png)
|
||||
skin/classic/browser/tabbrowser/tab-overflow-border.png (tabbrowser/tab-overflow-border.png)
|
||||
skin/classic/browser/tabbrowser/tab-stroke-end.png (tabbrowser/tab-stroke-end.png)
|
||||
skin/classic/browser/tabbrowser/tab-stroke-start.png (tabbrowser/tab-stroke-start.png)
|
||||
skin/classic/browser/tabbrowser/tabDragIndicator.png (tabbrowser/tabDragIndicator.png)
|
||||
skin/classic/browser/tabbrowser/tab-separator.png (tabbrowser/tab-separator.png)
|
||||
skin/classic/browser/tabview/edit-light.png (tabview/edit-light.png)
|
||||
skin/classic/browser/tabview/search.png (tabview/search.png)
|
||||
skin/classic/browser/tabview/stack-expander.png (tabview/stack-expander.png)
|
||||
|
9
browser/themes/linux/linuxShared.inc
Normal file
@ -0,0 +1,9 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
%filter substitution
|
||||
|
||||
%define toolbarHighlight rgba(255,255,255,.3)
|
||||
%define fgTabTexture linear-gradient(transparent 0px, transparent 1px, hsla(0,0%,100%,0.35) 1px, hsla(0,0%,100%,0.35) 2px, hsla(0,0%,100%,0.65) 2px, hsla(0,0%,100%,0.65) 3px, @toolbarHighlight@)
|
||||
%define fgTabBackgroundMiddle @fgTabTexture@, linear-gradient(transparent 0px, transparent 2px, -moz-dialog 2px, -moz-dialog)
|
BIN
browser/themes/linux/tabbrowser/tab-active-middle.png
Normal file
After Width: | Height: | Size: 96 B |
BIN
browser/themes/linux/tabbrowser/tab-background-end.png
Normal file
After Width: | Height: | Size: 721 B |
BIN
browser/themes/linux/tabbrowser/tab-background-middle.png
Normal file
After Width: | Height: | Size: 161 B |
BIN
browser/themes/linux/tabbrowser/tab-background-start.png
Normal file
After Width: | Height: | Size: 705 B |
BIN
browser/themes/linux/tabbrowser/tab-separator.png
Normal file
After Width: | Height: | Size: 192 B |
BIN
browser/themes/linux/tabbrowser/tab-stroke-end.png
Normal file
After Width: | Height: | Size: 439 B |
BIN
browser/themes/linux/tabbrowser/tab-stroke-start.png
Normal file
After Width: | Height: | Size: 433 B |
BIN
browser/themes/osx/Toolbar-background-noise.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
browser/themes/osx/appmenu.png
Normal file
After Width: | Height: | Size: 247 B |
@ -6,8 +6,10 @@
|
||||
|
||||
%include shared.inc
|
||||
%filter substitution
|
||||
%define fgTabTexture linear-gradient(hsla(0,0%,100%,0.6), hsla(0,0%,100%,0.6) 0px, hsl(0,0%,99%) 1px, hsl(0,0%,92%))
|
||||
%define fgTabBackgroundMiddle linear-gradient(transparent, transparent)
|
||||
%define forwardTransitionLength 150ms
|
||||
%define conditionalForwardWithUrlbar window:not([chromehidden~=toolbar]) #navigator-toolbox[iconsize=large][mode=icons] > :-moz-any(#nav-bar[currentset*="unified-back-forward-button,urlbar-container"],#nav-bar:not([currentset])) > #unified-back-forward-button
|
||||
%define conditionalForwardWithUrlbar window:not([chromehidden~=toolbar]) #navigator-toolbox[iconsize=large] > :-moz-any(#nav-bar[currentset*="unified-back-forward-button,urlbar-container"],#nav-bar:not([currentset])) > #nav-bar-customizationtarget > #unified-back-forward-button
|
||||
%define conditionalForwardWithUrlbarWidth 27
|
||||
|
||||
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
|
||||
@ -38,13 +40,16 @@
|
||||
background-color: #eeeeee;
|
||||
}
|
||||
|
||||
#titlebar-buttonbox-container,
|
||||
#main-window:not([drawintitlebar=true]) > #titlebar {
|
||||
#titlebar-buttonbox > .titlebar-button {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#titlebar {
|
||||
height: 22px;
|
||||
padding-top: 9px;
|
||||
}
|
||||
|
||||
#main-window:not(:-moz-lwtheme):not([privatebrowsingmode=temporary]) > #titlebar {
|
||||
-moz-appearance: -moz-window-titlebar;
|
||||
}
|
||||
|
||||
#main-window[chromehidden~="toolbar"][chromehidden~="location"][chromehidden~="directories"] {
|
||||
@ -62,9 +67,15 @@ toolbarseparator {
|
||||
min-height: 22px;
|
||||
}
|
||||
|
||||
/* We need more height when toolbar buttons show both icon and text. */
|
||||
toolbar[mode="full"] toolbarseparator {
|
||||
min-height: 36px;
|
||||
toolbox[tabsontop=true] > toolbar:not(#TabsToolbar):not(#nav-bar):not(#toolbar-menubar),
|
||||
toolbox[tabsontop=false] > toolbar:not(#nav-bar) {
|
||||
margin-top: -2px; /* overlay the bottom border of the toolbar above us */
|
||||
padding-top: 1px !important;
|
||||
}
|
||||
|
||||
toolbox[tabsontop=true] > toolbar:not(#TabsToolbar):not(#nav-bar):not(:-moz-lwtheme) {
|
||||
-moz-appearance: none;
|
||||
background: url(chrome://browser/skin/Toolbar-background-noise.png) hsl(0,0%,83%);
|
||||
}
|
||||
|
||||
#nav-bar {
|
||||
@ -73,10 +84,9 @@ toolbar[mode="full"] toolbarseparator {
|
||||
|
||||
#PersonalToolbar {
|
||||
-moz-appearance: none;
|
||||
margin-top: -2px; /* overlay the bottom border of the toolbar above us */
|
||||
padding-top: 1px !important;
|
||||
background-color: -moz-mac-chrome-active;
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.57);
|
||||
border-bottom: 2px solid;
|
||||
-moz-border-bottom-colors: hsla(0,0%,0%,.15) hsla(0,0%,100%,.15);
|
||||
}
|
||||
|
||||
#nav-bar[tabsontop=true],
|
||||
@ -85,9 +95,11 @@ toolbar[mode="full"] toolbarseparator {
|
||||
-moz-appearance: none;
|
||||
margin-top: 0; /* don't overlay the bottom border of the tabs toolbar */
|
||||
padding-top: 4px !important;
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.57);
|
||||
background-color: -moz-mac-chrome-active;
|
||||
background-image: linear-gradient(rgba(255,255,255,.43), rgba(255,255,255,0)) !important; /* override lwtheme style */
|
||||
border-bottom: 2px solid;
|
||||
-moz-border-bottom-colors: hsla(0,0%,0%,.15) hsla(0,0%,100%,.15);
|
||||
background: url(chrome://browser/skin/Toolbar-background-noise.png),
|
||||
linear-gradient(hsl(0,0%,93%), hsl(0,0%,83%)); !important; /* override lwtheme style */
|
||||
background-clip: border-box;
|
||||
background-origin: border-box !important;
|
||||
}
|
||||
|
||||
@ -104,7 +116,6 @@ toolbar[mode="full"] toolbarseparator {
|
||||
#nav-bar[tabsontop=true][collapsed=true]:not([customizing]) + toolbar:not(:-moz-lwtheme):-moz-window-inactive,
|
||||
#nav-bar[tabsontop=true][collapsed=true]:not([customizing]) + #customToolbars + #PersonalToolbar:not(:-moz-lwtheme):-moz-window-inactive {
|
||||
background-color: -moz-mac-chrome-inactive;
|
||||
border-bottom-color: rgba(0, 0, 0, 0.32);
|
||||
}
|
||||
|
||||
/* ----- BOOKMARK TOOLBAR ----- */
|
||||
@ -123,10 +134,6 @@ toolbarbutton.chevron > .toolbarbutton-text {
|
||||
display: none;
|
||||
}
|
||||
|
||||
toolbar[mode="text"] toolbarbutton.chevron > .toolbarbutton-icon {
|
||||
display: -moz-box; /* display chevron icon in text mode */
|
||||
}
|
||||
|
||||
toolbarbutton.chevron:-moz-locale-dir(rtl) > .toolbarbutton-icon {
|
||||
transform: scaleX(-1);
|
||||
}
|
||||
@ -172,7 +179,7 @@ toolbarbutton.bookmark-item {
|
||||
}
|
||||
|
||||
.bookmark-item > .toolbarbutton-text {
|
||||
display: -moz-box !important; /* prevent [mode="icons"] from hiding the label */
|
||||
display: -moz-box !important; /* Force the display of the label for bookmarks */
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
@ -428,30 +435,12 @@ toolbarbutton.bookmark-item > menupopup {
|
||||
}
|
||||
}
|
||||
|
||||
toolbar:not([mode="icons"]) .toolbarbutton-1:not([type="menu-button"]),
|
||||
toolbar:not([mode="icons"]) .toolbarbutton-1 > .toolbarbutton-menubutton-button,
|
||||
toolbar:not([mode="icons"]) .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker,
|
||||
toolbar:not([mode="icons"]) #restore-button {
|
||||
-moz-appearance: none;
|
||||
padding: 0;
|
||||
height: auto;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
background: none;
|
||||
}
|
||||
|
||||
.toolbarbutton-1:not([type="menu-button"]),
|
||||
.toolbarbutton-1 > .toolbarbutton-menubutton-button,
|
||||
#restore-button {
|
||||
min-width: 28px;
|
||||
}
|
||||
|
||||
toolbar:not([mode="icons"]) .toolbarbutton-1:not([type="menu-button"]),
|
||||
toolbar:not([mode="icons"]) .toolbarbutton-1 > .toolbarbutton-menubutton-button,
|
||||
toolbar:not([mode="icons"]) #restore-button {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.toolbarbutton-1:not(:-moz-any(@primaryToolbarButtons@)) > .toolbarbutton-icon,
|
||||
.toolbarbutton-1 > .toolbarbutton-menubutton-button > .toolbarbutton-icon {
|
||||
margin: 2px;
|
||||
@ -514,11 +503,6 @@ toolbar:not([mode="icons"]) #restore-button {
|
||||
-moz-border-start: none !important;
|
||||
}
|
||||
|
||||
toolbar:not([mode="icons"]) .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker {
|
||||
width: auto;
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.toolbarbutton-1 > .toolbarbutton-menubutton-button:-moz-locale-dir(rtl),
|
||||
.toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker:-moz-locale-dir(ltr) {
|
||||
border-top-left-radius: 0;
|
||||
@ -531,36 +515,32 @@ toolbar:not([mode="icons"]) .toolbarbutton-1 > .toolbarbutton-menubutton-dropmar
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
|
||||
toolbar:not([mode="icons"]) .toolbarbutton-1:not([open="true"]) > .toolbarbutton-menubutton-dropmarker {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.toolbarbutton-1 > .toolbarbutton-text,
|
||||
.toolbarbutton-1 > .toolbarbutton-menubutton-button > .toolbarbutton-text {
|
||||
margin: 2px 0 0;
|
||||
}
|
||||
|
||||
toolbar[mode="icons"] .toolbarbutton-1:not([type="menu-button"]):not([disabled="true"]):active:hover:-moz-lwtheme,
|
||||
toolbar[mode="icons"] .toolbarbutton-1:not([type="menu-button"])[open="true"]:-moz-lwtheme,
|
||||
toolbar[mode="icons"] .toolbarbutton-1:not([disabled="true"]) > .toolbarbutton-menubutton-button:active:hover:-moz-lwtheme,
|
||||
toolbar[mode="icons"] .toolbarbutton-1[open="true"] > .toolbarbutton-menubutton-dropmarker:-moz-lwtheme,
|
||||
toolbar[mode="icons"] #restore-button:not([disabled="true"]):active:hover:-moz-lwtheme {
|
||||
.toolbarbutton-1:not([type="menu-button"]):not([disabled="true"]):active:hover:-moz-lwtheme,
|
||||
.toolbarbutton-1:not([type="menu-button"])[open="true"]:-moz-lwtheme,
|
||||
.toolbarbutton-1:not([disabled="true"]) > .toolbarbutton-menubutton-button:active:hover:-moz-lwtheme,
|
||||
.toolbarbutton-1[open="true"] > .toolbarbutton-menubutton-dropmarker:-moz-lwtheme,
|
||||
#restore-button:not([disabled="true"]):active:hover:-moz-lwtheme {
|
||||
text-shadow: @loweredShadow@;
|
||||
background-color: rgba(0,0,0,0.2);
|
||||
box-shadow: inset 0 2px 5px rgba(0,0,0,0.6), 0 1px rgba(255,255,255,0.2);
|
||||
}
|
||||
|
||||
toolbar[mode="icons"] .toolbarbutton-1:not([type="menu-button"]):not(#fullscreen-button)[checked="true"]:-moz-lwtheme {
|
||||
.toolbarbutton-1:not([type="menu-button"]):not(#fullscreen-button)[checked="true"]:-moz-lwtheme {
|
||||
background-color: rgba(0,0,0,0.4);
|
||||
box-shadow: inset 0 2px 5px rgba(0,0,0,0.7), 0 1px rgba(255,255,255,0.2);
|
||||
}
|
||||
|
||||
toolbar[mode="icons"] .toolbarbutton-1:not([type="menu-button"]):not(#fullscreen-button)[checked="true"]:not([disabled="true"]):active:hover:-moz-lwtheme {
|
||||
.toolbarbutton-1:not([type="menu-button"]):not(#fullscreen-button)[checked="true"]:not([disabled="true"]):active:hover:-moz-lwtheme {
|
||||
background-color: rgba(0, 0, 0, 0.6);
|
||||
box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.8), 0 1px rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
toolbar[mode="icons"] .toolbarbutton-1 > menupopup {
|
||||
.toolbarbutton-1 > menupopup {
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
@ -577,42 +557,42 @@ toolbar[mode="icons"] .toolbarbutton-1 > menupopup {
|
||||
|
||||
#back-button,
|
||||
#forward-button:-moz-locale-dir(rtl),
|
||||
toolbar[mode="icons"] #back-button:-moz-locale-dir(rtl):-moz-lwtheme {
|
||||
#back-button:-moz-locale-dir(rtl):-moz-lwtheme {
|
||||
-moz-image-region: rect(0, 40px, 20px, 20px);
|
||||
}
|
||||
|
||||
@media (min-resolution: 2dppx) {
|
||||
#back-button,
|
||||
#forward-button:-moz-locale-dir(rtl),
|
||||
toolbar[mode="icons"] #back-button:-moz-locale-dir(rtl):-moz-lwtheme {
|
||||
#back-button:-moz-locale-dir(rtl):-moz-lwtheme {
|
||||
-moz-image-region: rect(0, 80px, 40px, 40px);
|
||||
}
|
||||
}
|
||||
|
||||
#forward-button,
|
||||
#back-button:-moz-locale-dir(rtl),
|
||||
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #forward-button:-moz-locale-dir(rtl),
|
||||
toolbar[mode="icons"] #forward-button:-moz-locale-dir(rtl):-moz-lwtheme {
|
||||
#navigator-toolbox[iconsize="large"] > #nav-bar #forward-button:-moz-locale-dir(rtl),
|
||||
#forward-button:-moz-locale-dir(rtl):-moz-lwtheme {
|
||||
-moz-image-region: rect(0, 60px, 20px, 40px);
|
||||
}
|
||||
|
||||
@media (min-resolution: 2dppx) {
|
||||
#forward-button,
|
||||
#back-button:-moz-locale-dir(rtl),
|
||||
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #forward-button:-moz-locale-dir(rtl),
|
||||
toolbar[mode="icons"] #forward-button:-moz-locale-dir(rtl):-moz-lwtheme {
|
||||
#navigator-toolbox[iconsize="large"] > #nav-bar #forward-button:-moz-locale-dir(rtl),
|
||||
#forward-button:-moz-locale-dir(rtl):-moz-lwtheme {
|
||||
-moz-image-region: rect(0, 120px, 40px, 80px);
|
||||
}
|
||||
}
|
||||
|
||||
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #back-button:-moz-locale-dir(rtl),
|
||||
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #forward-button:-moz-locale-dir(rtl),
|
||||
toolbar[mode="icons"] #back-button:-moz-locale-dir(rtl):-moz-lwtheme,
|
||||
toolbar[mode="icons"] #forward-button:-moz-locale-dir(rtl):-moz-lwtheme {
|
||||
#navigator-toolbox[iconsize="large"] > #nav-bar #back-button:-moz-locale-dir(rtl),
|
||||
#navigator-toolbox[iconsize="large"] > #nav-bar #forward-button:-moz-locale-dir(rtl),
|
||||
#back-button:-moz-locale-dir(rtl):-moz-lwtheme,
|
||||
#forward-button:-moz-locale-dir(rtl):-moz-lwtheme {
|
||||
transform: scaleX(-1);
|
||||
}
|
||||
|
||||
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #back-button {
|
||||
#navigator-toolbox[iconsize="large"] > #nav-bar #back-button {
|
||||
-moz-appearance: none;
|
||||
-moz-margin-end: -7px;
|
||||
position: relative;
|
||||
@ -625,12 +605,12 @@ toolbar[mode="icons"] #forward-button:-moz-locale-dir(rtl):-moz-lwtheme {
|
||||
}
|
||||
|
||||
@media (min-resolution: 2dppx) {
|
||||
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #back-button {
|
||||
#navigator-toolbox[iconsize="large"] > #nav-bar #back-button {
|
||||
-moz-image-region: rect(0, 40px, 40px, 0);
|
||||
}
|
||||
}
|
||||
|
||||
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #back-button:not(:-moz-lwtheme) {
|
||||
#navigator-toolbox[iconsize="large"] > #nav-bar #back-button:not(:-moz-lwtheme) {
|
||||
height: 31px;
|
||||
padding: 4px 5px 5px 3px;
|
||||
margin-bottom: -1px;
|
||||
@ -639,32 +619,32 @@ toolbar[mode="icons"] #forward-button:-moz-locale-dir(rtl):-moz-lwtheme {
|
||||
}
|
||||
|
||||
@media (min-resolution: 2dppx) {
|
||||
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #back-button:not(:-moz-lwtheme) {
|
||||
#navigator-toolbox[iconsize="large"] > #nav-bar #back-button:not(:-moz-lwtheme) {
|
||||
background-image: url(chrome://browser/skin/keyhole-circle@2x.png);
|
||||
background-size: 90px;
|
||||
}
|
||||
}
|
||||
|
||||
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #back-button:-moz-window-inactive:not(:-moz-lwtheme) {
|
||||
#navigator-toolbox[iconsize="large"] > #nav-bar #back-button:-moz-window-inactive:not(:-moz-lwtheme) {
|
||||
background-position: -60px 0;
|
||||
}
|
||||
|
||||
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #back-button:not([disabled="true"]):active:hover:not(:-moz-lwtheme),
|
||||
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #back-button[open="true"]:not(:-moz-lwtheme) {
|
||||
#navigator-toolbox[iconsize="large"] > #nav-bar #back-button:not([disabled="true"]):active:hover:not(:-moz-lwtheme),
|
||||
#navigator-toolbox[iconsize="large"] > #nav-bar #back-button[open="true"]:not(:-moz-lwtheme) {
|
||||
background-position: -30px 0;
|
||||
}
|
||||
|
||||
toolbar[mode="icons"] #forward-button {
|
||||
#forward-button {
|
||||
-moz-margin-start: 0;
|
||||
}
|
||||
|
||||
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #forward-button > .toolbarbutton-icon {
|
||||
#navigator-toolbox[iconsize="large"] > #nav-bar #forward-button > .toolbarbutton-icon {
|
||||
/* shift the icon away from the back button */
|
||||
margin-left: 3px;
|
||||
margin-right: -1px;
|
||||
}
|
||||
|
||||
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #forward-button {
|
||||
#navigator-toolbox[iconsize="large"] > #nav-bar #forward-button {
|
||||
clip-path: url(chrome://browser/content/browser.xul#osx-keyhole-forward-clip-path);
|
||||
}
|
||||
|
||||
@ -733,25 +713,25 @@ toolbar[mode="icons"] #forward-button {
|
||||
}
|
||||
}
|
||||
|
||||
#navigator-toolbox[iconsize="small"][mode="icons"] > #nav-bar #forward-button {
|
||||
#navigator-toolbox[iconsize="small"] > #nav-bar #forward-button {
|
||||
width: 27px;
|
||||
}
|
||||
|
||||
#navigator-toolbox[iconsize="small"][mode="icons"] > #nav-bar #forward-button:-moz-lwtheme {
|
||||
#navigator-toolbox[iconsize="small"] > #nav-bar #forward-button:-moz-lwtheme {
|
||||
padding-left: 2px;
|
||||
}
|
||||
|
||||
toolbar[mode="icons"] #forward-button:-moz-lwtheme {
|
||||
#forward-button:-moz-lwtheme {
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
|
||||
#navigator-toolbox[iconsize="small"][mode="icons"] > #nav-bar #back-button {
|
||||
#navigator-toolbox[iconsize="small"] > #nav-bar #back-button {
|
||||
-moz-margin-end: 0;
|
||||
width: 26px;
|
||||
}
|
||||
|
||||
#navigator-toolbox[iconsize="small"][mode="icons"] > #nav-bar #back-button:-moz-lwtheme {
|
||||
#navigator-toolbox[iconsize="small"] > #nav-bar #back-button:-moz-lwtheme {
|
||||
padding-right: 2px;
|
||||
border-right-width: 0;
|
||||
border-top-right-radius: 0;
|
||||
@ -1049,11 +1029,11 @@ toolbar[mode="icons"] #forward-button:-moz-lwtheme {
|
||||
}
|
||||
}
|
||||
|
||||
toolbar[mode="icons"] #zoom-out-button {
|
||||
#zoom-out-button {
|
||||
-moz-margin-end: 0;
|
||||
}
|
||||
|
||||
toolbar[mode="icons"] #zoom-in-button {
|
||||
#zoom-in-button {
|
||||
-moz-border-start: none;
|
||||
-moz-margin-start: 0;
|
||||
}
|
||||
@ -2123,19 +2103,12 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.tab-throbber,
|
||||
.tab-icon-image {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
list-style-image: url("chrome://mozapps/skin/places/defaultFavicon.png");
|
||||
}
|
||||
%include ../shared/tabs.inc.css
|
||||
|
||||
.tab-throbber {
|
||||
list-style-image: url("chrome://browser/skin/tabbrowser/connecting.png");
|
||||
}
|
||||
|
||||
.tab-throbber[progress] {
|
||||
list-style-image: url("chrome://browser/skin/tabbrowser/loading.png");
|
||||
.tab-label {
|
||||
margin-top: 3px;
|
||||
margin-bottom: 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@media (min-resolution: 2dppx) {
|
||||
@ -2154,66 +2127,38 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
|
||||
}
|
||||
|
||||
.tabbrowser-tab:not(:hover) > .tab-stack > .tab-content > .tab-icon-image:not([selected="true"]) {
|
||||
opacity: .8;
|
||||
opacity: .9;
|
||||
}
|
||||
|
||||
.tab-label:not([selected="true"]) {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.tabbrowser-tab:not([pinned]):not([fadein]) {
|
||||
transition: min-width 200ms ease-out /* copied from browser/base/content/browser.css */,
|
||||
max-width 250ms ease-out /* copied from browser/base/content/browser.css */,
|
||||
opacity 50ms ease-out 100ms /* hide the tab for the last 100ms of the max-width transition */;
|
||||
}
|
||||
|
||||
.tab-stack {
|
||||
/* ensure stable tab height with and without toolbarbuttons on the tab bar */
|
||||
height: 26px;
|
||||
max-width 230ms ease-out /* copied from browser/base/content/browser.css */,
|
||||
opacity 50ms ease-out 80ms /* hide the tab for the last 100ms of the max-width transition */;
|
||||
}
|
||||
|
||||
.tabbrowser-tab,
|
||||
.tabs-newtab-button {
|
||||
-moz-appearance: none;
|
||||
font: message-box;
|
||||
font-weight: bold;
|
||||
text-shadow: @loweredShadow@;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: none;
|
||||
text-align: center;
|
||||
-moz-box-align: stretch;
|
||||
}
|
||||
|
||||
%define TABSONTOP_TAB #tabbrowser-tabs[tabsontop="true"] > .tabbrowser-tab
|
||||
%define TABSONBOTTOM_TAB #tabbrowser-tabs[tabsontop="false"] > .tabbrowser-tab
|
||||
%define TABSONTOP_TAB_STACK #tabbrowser-tabs[tabsontop="true"] > .tabbrowser-tab > .tab-stack
|
||||
%define TABSONBOTTOM_TAB_STACK #tabbrowser-tabs[tabsontop="false"] > .tabbrowser-tab > .tab-stack
|
||||
.tabbrowser-tab {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
%define TABSONTOP_NEWTAB_BUTTON #tabbrowser-tabs[tabsontop="true"] > .tabbrowser-arrowscrollbox > .tabs-newtab-button
|
||||
%define TABSONBOTTOM_NEWTAB_BUTTON #tabbrowser-tabs[tabsontop="false"] > .tabbrowser-arrowscrollbox > .tabs-newtab-button
|
||||
|
||||
@TABSONTOP_TAB_STACK@ > .tab-background {
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
@TABSONBOTTOM_TAB_STACK@ > .tab-background {
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
@TABSONTOP_TAB_STACK@ > .tab-background:not([selected="true"]):not(:-moz-lwtheme) {
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
@TABSONBOTTOM_TAB_STACK@ > .tab-background:not([selected="true"]) {
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.tab-background,
|
||||
.tab-content,
|
||||
.tabs-newtab-button > .toolbarbutton-icon {
|
||||
-moz-margin-start: -5px;
|
||||
-moz-margin-end: -4px;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.tab-close-button {
|
||||
pointer-events: auto;
|
||||
.tab-background-start[selected=true]::before,
|
||||
.tab-background-end[selected=true]::before {
|
||||
/* The fill is in the image of ::after on OS X */
|
||||
background: none;
|
||||
}
|
||||
|
||||
.tabbrowser-tabs[closebuttons="hidden"] > * > * > * > .tab-close-button:not([pinned]) {
|
||||
@ -2221,178 +2166,16 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.tabbrowser-arrowscrollbox > .arrowscrollbox-scrollbox {
|
||||
-moz-padding-start: 5px;
|
||||
-moz-padding-end: 4px;
|
||||
}
|
||||
|
||||
.tab-content,
|
||||
.tabs-newtab-button > .toolbarbutton-icon {
|
||||
-moz-box-align: center;
|
||||
border: solid transparent;
|
||||
border-width: 0 11px;
|
||||
}
|
||||
|
||||
.tab-background-start,
|
||||
.tab-background-end {
|
||||
width: 12px;
|
||||
height: 21px;
|
||||
}
|
||||
|
||||
.tab-background-middle {
|
||||
-moz-box-flex: 1;
|
||||
}
|
||||
|
||||
@TABSONTOP_TAB_STACK@ > .tab-background > .tab-background-start:-moz-locale-dir(ltr),
|
||||
@TABSONTOP_TAB_STACK@ > .tab-background > .tab-background-end:-moz-locale-dir(rtl) {
|
||||
clip-path: url(chrome://browser/content/browser.xul#osx-tab-ontop-left-curve-clip-path);
|
||||
}
|
||||
|
||||
@TABSONTOP_TAB_STACK@ > .tab-background > .tab-background-end:-moz-locale-dir(ltr),
|
||||
@TABSONTOP_TAB_STACK@ > .tab-background > .tab-background-start:-moz-locale-dir(rtl) {
|
||||
clip-path: url(chrome://browser/content/browser.xul#osx-tab-ontop-right-curve-clip-path);
|
||||
}
|
||||
|
||||
@TABSONBOTTOM_TAB_STACK@ > .tab-background > .tab-background-start:-moz-locale-dir(ltr),
|
||||
@TABSONBOTTOM_TAB_STACK@ > .tab-background > .tab-background-end:-moz-locale-dir(rtl) {
|
||||
clip-path: url(chrome://browser/content/browser.xul#osx-tab-onbottom-left-curve-clip-path);
|
||||
}
|
||||
|
||||
@TABSONBOTTOM_TAB_STACK@ > .tab-background > .tab-background-end:-moz-locale-dir(ltr),
|
||||
@TABSONBOTTOM_TAB_STACK@ > .tab-background > .tab-background-start:-moz-locale-dir(rtl) {
|
||||
clip-path: url(chrome://browser/content/browser.xul#osx-tab-onbottom-right-curve-clip-path);
|
||||
}
|
||||
|
||||
.tab-background-start[selected="true"]:not(:-moz-lwtheme),
|
||||
.tab-background-middle[selected="true"]:not(:-moz-lwtheme),
|
||||
.tab-background-end[selected="true"]:not(:-moz-lwtheme) {
|
||||
background-color: -moz-mac-chrome-active;
|
||||
}
|
||||
|
||||
.tab-background-start[selected="true"]:not(:-moz-lwtheme):-moz-window-inactive,
|
||||
.tab-background-middle[selected="true"]:not(:-moz-lwtheme):-moz-window-inactive,
|
||||
.tab-background-end[selected="true"]:not(:-moz-lwtheme):-moz-window-inactive {
|
||||
background-color: -moz-mac-chrome-inactive;
|
||||
}
|
||||
|
||||
.tab-background-start[pinned][titlechanged]:not([selected="true"]),
|
||||
.tab-background-end[pinned][titlechanged]:not([selected="true"]) {
|
||||
background-image: linear-gradient(rgba(148,205,253,.2), rgba(148,205,253,.2)) !important;
|
||||
}
|
||||
|
||||
@TABSONBOTTOM_TAB_STACK@ > .tab-background > .tab-background-middle[pinned][titlechanged]:not([selected="true"]) {
|
||||
background-image: radial-gradient(circle farthest-corner at 50% 99%, rgba(254,254,255,1) 3%, rgba(210,235,255,.9) 12%, rgba(148,205,253,.6) 30%, rgba(148,205,253,.2) 70%);
|
||||
}
|
||||
|
||||
@TABSONTOP_TAB_STACK@ > .tab-background > .tab-background-middle[pinned][titlechanged]:not([selected="true"]) {
|
||||
background-image: radial-gradient(circle farthest-corner at 50% 2px, rgba(254,254,255,1) 3%, rgba(210,235,255,.9) 12%, rgba(148,205,253,.6) 30%, rgba(148,205,253,.2) 70%);
|
||||
}
|
||||
|
||||
.tabbrowser-tab > .tab-stack > .tab-background > .tab-background-start:-moz-lwtheme-brighttext:not([selected="true"]),
|
||||
.tabbrowser-tab > .tab-stack > .tab-background > .tab-background-middle:-moz-lwtheme-brighttext:not([selected="true"]),
|
||||
.tabbrowser-tab > .tab-stack > .tab-background > .tab-background-end:-moz-lwtheme-brighttext:not([selected="true"]) {
|
||||
background-image: linear-gradient(hsla(0,0%,40%,.6), hsla(0,0%,30%,.6) 50%);
|
||||
}
|
||||
|
||||
.tabbrowser-tab > .tab-stack > .tab-background > .tab-background-start:-moz-lwtheme-darktext:not([selected="true"]),
|
||||
.tabbrowser-tab > .tab-stack > .tab-background > .tab-background-middle:-moz-lwtheme-darktext:not([selected="true"]),
|
||||
.tabbrowser-tab > .tab-stack > .tab-background > .tab-background-end:-moz-lwtheme-darktext:not([selected="true"]) {
|
||||
background-image: linear-gradient(hsla(0,0%,60%,.5), hsla(0,0%,45%,.5) 50%);
|
||||
}
|
||||
|
||||
@TABSONTOP_TAB_STACK@ > .tab-content,
|
||||
@TABSONTOP_NEWTAB_BUTTON@ > .toolbarbutton-icon {
|
||||
border-image: url(chrome://browser/skin/tabbrowser/tab-top-normal-active.png) 0 11 fill repeat stretch;
|
||||
}
|
||||
|
||||
@TABSONTOP_TAB@:hover > .tab-stack > .tab-content:not([selected="true"]),
|
||||
@TABSONTOP_NEWTAB_BUTTON@:hover > .toolbarbutton-icon {
|
||||
border-image: url(chrome://browser/skin/tabbrowser/tab-top-hover-active.png) 0 11 fill repeat stretch;
|
||||
}
|
||||
|
||||
@TABSONTOP_TAB_STACK@ > .tab-content[selected="true"] {
|
||||
border-image: url(chrome://browser/skin/tabbrowser/tab-top-selected-active.png) 0 11 fill repeat stretch;
|
||||
}
|
||||
|
||||
@TABSONBOTTOM_TAB_STACK@ > .tab-content,
|
||||
@TABSONBOTTOM_NEWTAB_BUTTON@ > .toolbarbutton-icon {
|
||||
border-image: url(chrome://browser/skin/tabbrowser/tab-bottom-normal-active.png) 0 11 fill repeat stretch;
|
||||
}
|
||||
|
||||
@media (min-resolution: 2dppx) {
|
||||
@TABSONTOP_TAB_STACK@ > .tab-content,
|
||||
@TABSONTOP_NEWTAB_BUTTON@ > .toolbarbutton-icon {
|
||||
border-image: url(chrome://browser/skin/tabbrowser/tab-top-normal-active@2x.png) 0 22 fill repeat stretch;
|
||||
}
|
||||
|
||||
@TABSONTOP_TAB@:hover > .tab-stack > .tab-content:not([selected="true"]),
|
||||
@TABSONTOP_NEWTAB_BUTTON@:hover > .toolbarbutton-icon {
|
||||
border-image: url(chrome://browser/skin/tabbrowser/tab-top-hover-active@2x.png) 0 22 fill repeat stretch;
|
||||
}
|
||||
|
||||
@TABSONTOP_TAB_STACK@ > .tab-content[selected="true"] {
|
||||
border-image: url(chrome://browser/skin/tabbrowser/tab-top-selected-active@2x.png) 0 22 fill repeat stretch;
|
||||
}
|
||||
}
|
||||
|
||||
@TABSONBOTTOM_TAB@:hover > .tab-stack > .tab-content:not([selected="true"]),
|
||||
@TABSONBOTTOM_NEWTAB_BUTTON@:hover > .toolbarbutton-icon {
|
||||
border-image: url(chrome://browser/skin/tabbrowser/tab-bottom-hover-active.png) 0 11 fill repeat stretch;
|
||||
}
|
||||
|
||||
@TABSONBOTTOM_TAB_STACK@ > .tab-content[selected="true"] {
|
||||
border-image: url(chrome://browser/skin/tabbrowser/tab-bottom-selected-active.png) 0 11 fill repeat stretch;
|
||||
}
|
||||
|
||||
/* preloading hack */
|
||||
#TabsToolbar::after {
|
||||
content: '';
|
||||
display: block;
|
||||
background-image:
|
||||
url(chrome://browser/skin/tabbrowser/tab-top-normal-active.png),
|
||||
url(chrome://browser/skin/tabbrowser/tab-top-hover-active.png),
|
||||
url(chrome://browser/skin/tabbrowser/tab-top-selected-active.png),
|
||||
url(chrome://browser/skin/tabbrowser/tab-bottom-normal-active.png),
|
||||
url(chrome://browser/skin/tabbrowser/tab-bottom-hover-active.png),
|
||||
url(chrome://browser/skin/tabbrowser/tab-bottom-selected-active.png),
|
||||
url(chrome://browser/skin/tabbrowser/tabbar-top-bg-active.png),
|
||||
url(chrome://browser/skin/tabbrowser/tabbar-top-bg-inactive.png),
|
||||
url(chrome://browser/skin/tabbrowser/tabbar-bottom-bg-active.png),
|
||||
url(chrome://browser/skin/tabbrowser/tabbar-bottom-bg-inactive.png);
|
||||
}
|
||||
|
||||
@media (min-resolution: 2dppx) {
|
||||
#TabsToolbar::after {
|
||||
content: '';
|
||||
display: block;
|
||||
background-image:
|
||||
url(chrome://browser/skin/tabbrowser/tab-top-normal-active@2x.png),
|
||||
url(chrome://browser/skin/tabbrowser/tab-top-hover-active@2x.png),
|
||||
url(chrome://browser/skin/tabbrowser/tab-top-selected-active@2x.png),
|
||||
url(chrome://browser/skin/tabbrowser/tab-bottom-normal-active.png),
|
||||
url(chrome://browser/skin/tabbrowser/tab-bottom-hover-active.png),
|
||||
url(chrome://browser/skin/tabbrowser/tab-bottom-selected-active.png),
|
||||
url(chrome://browser/skin/tabbrowser/tabbar-top-bg-active.png),
|
||||
url(chrome://browser/skin/tabbrowser/tabbar-top-bg-inactive.png),
|
||||
url(chrome://browser/skin/tabbrowser/tabbar-bottom-bg-active.png),
|
||||
url(chrome://browser/skin/tabbrowser/tabbar-bottom-bg-inactive.png);
|
||||
}
|
||||
}
|
||||
|
||||
.tabbrowser-tab:focus > .tab-stack {
|
||||
.tabbrowser-tab:focus > .tab-stack > .tab-content > .tab-label {
|
||||
box-shadow: @focusRingShadow@;
|
||||
}
|
||||
|
||||
.tabbrowser-tab:not([selected="true"]):not(:hover):not(:-moz-lwtheme) {
|
||||
color: #222;
|
||||
}
|
||||
|
||||
.tabbrowser-tab[selected="true"] {
|
||||
color: #000;
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.tabbrowser-tab:-moz-lwtheme {
|
||||
color: inherit;
|
||||
text-shadow: inherit;
|
||||
@ -2407,13 +2190,13 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
|
||||
content: '';
|
||||
display: block;
|
||||
-moz-appearance: toolbar;
|
||||
height: 25px;
|
||||
margin-bottom: -25px;
|
||||
height: calc(@tabHeight@ + 1px);
|
||||
margin-bottom: calc(-1px - @tabHeight@);
|
||||
}
|
||||
|
||||
#TabsToolbar {
|
||||
position: relative;
|
||||
-moz-appearance: none;
|
||||
height: 26px;
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
|
||||
@ -2422,59 +2205,40 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
|
||||
padding-top: 2px;
|
||||
}
|
||||
|
||||
/* For tabs-on-top, only fill the bottom 2px with the chrome background
|
||||
* color, so that the borders in tabbar-top-bg-*.png can mix with it.
|
||||
* In the top 24px the unified toolbar (from the ::before above) will show.
|
||||
/*
|
||||
* Draw the bottom border of the tabstrip:
|
||||
*/
|
||||
#TabsToolbar[tabsontop="true"]:not(:-moz-lwtheme) {
|
||||
padding-bottom: 2px;
|
||||
background: url(chrome://browser/skin/tabbrowser/tabbar-top-bg-active.png),
|
||||
linear-gradient(to top, -moz-mac-chrome-active 2px, transparent 2px);
|
||||
}
|
||||
|
||||
#TabsToolbar[tabsontop="true"]:not(:-moz-lwtheme):-moz-window-inactive {
|
||||
background: url(chrome://browser/skin/tabbrowser/tabbar-top-bg-inactive.png),
|
||||
linear-gradient(to top, -moz-mac-chrome-inactive 2px, transparent 2px);
|
||||
#TabsToolbar[tabsontop="true"]:not(:-moz-lwtheme)::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 0;
|
||||
border-bottom: 1px solid hsla(0,0%,0%,.22);
|
||||
}
|
||||
|
||||
/* In tabs-on-bottom mode, fill the whole toolbar with the chrome
|
||||
* background color.
|
||||
*/
|
||||
#TabsToolbar[tabsontop="false"]:not(:-moz-lwtheme) {
|
||||
background: url(chrome://browser/skin/tabbrowser/tabbar-bottom-bg-active.png) -moz-mac-chrome-active;
|
||||
background: -moz-mac-chrome-active;
|
||||
}
|
||||
|
||||
#TabsToolbar[tabsontop="false"]:not(:-moz-lwtheme):-moz-window-inactive {
|
||||
background: url(chrome://browser/skin/tabbrowser/tabbar-bottom-bg-inactive.png) -moz-mac-chrome-inactive;
|
||||
background: -moz-mac-chrome-inactive;
|
||||
}
|
||||
|
||||
#tabbrowser-tabs {
|
||||
-moz-box-align: stretch;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
#tabbrowser-tabs[tabsontop="true"] > .tabbrowser-arrowscrollbox > .arrowscrollbox-scrollbox:not(:-moz-lwtheme) {
|
||||
margin-bottom: -2px;
|
||||
}
|
||||
|
||||
#tabbrowser-tabs[tabsontop="false"] > .tabbrowser-arrowscrollbox > .arrowscrollbox-scrollbox {
|
||||
margin-top: -2px;
|
||||
}
|
||||
|
||||
@TABSONTOP_NEWTAB_BUTTON@ > .toolbarbutton-icon {
|
||||
padding: 4px 0 2px;
|
||||
}
|
||||
|
||||
@TABSONTOP_TAB_STACK@ > .tab-content {
|
||||
padding-top: 2px;
|
||||
padding: 6px 0 4px;
|
||||
}
|
||||
|
||||
@TABSONBOTTOM_NEWTAB_BUTTON@ > .toolbarbutton-icon {
|
||||
padding: 2px 0 4px;
|
||||
}
|
||||
|
||||
@TABSONBOTTOM_TAB_STACK@ > .tab-content {
|
||||
padding-bottom: 2px;
|
||||
padding: 4px 0 6px;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2505,8 +2269,6 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
|
||||
list-style-image: url("chrome://global/skin/icons/close.png");
|
||||
-moz-appearance: none;
|
||||
border: none !important;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
background: none;
|
||||
cursor: default;
|
||||
-moz-image-region: rect(0, 16px, 16px, 0);
|
||||
@ -3765,6 +3527,12 @@ chatbox {
|
||||
border-top-right-radius: @toolbarbuttonCornerRadius@;
|
||||
}
|
||||
|
||||
/* Customization mode */
|
||||
|
||||
%include ../shared/customizableui/customizeMode.inc.css
|
||||
|
||||
/* End customization mode */
|
||||
|
||||
panel[type="arrow"][popupid="click-to-play-plugins"] > .panel-arrowcontainer > .panel-arrowbox > .panel-arrow[side="top"],
|
||||
panel[type="arrow"][popupid="click-to-play-plugins"] > .panel-arrowcontainer > .panel-arrowbox > .panel-arrow[side="bottom"] {
|
||||
list-style-image: url("chrome://global/skin/arrow/panelarrow-light-vertical.png");
|
||||
|
After Width: | Height: | Size: 90 KiB |
46
browser/themes/osx/customizableui/panelUIOverlay.css
Normal file
@ -0,0 +1,46 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
%filter substitution
|
||||
%define menuPanelWidth 26em
|
||||
|
||||
%include ../../shared/customizableui/panelUIOverlay.inc.css
|
||||
|
||||
.PanelUI-pageControls toolbarbutton {
|
||||
list-style-image: url("chrome://browser/skin/Toolbar.png");
|
||||
}
|
||||
|
||||
#PanelUI-cut-btn {
|
||||
-moz-image-region: rect(0, 260px, 20px, 240px);
|
||||
}
|
||||
#PanelUI-copy-btn {
|
||||
-moz-image-region: rect(0, 280px, 20px, 260px);
|
||||
}
|
||||
#PanelUI-paste-btn {
|
||||
-moz-image-region: rect(0, 300px, 20px, 280px);
|
||||
}
|
||||
|
||||
#PanelUI-zoomOut-btn {
|
||||
-moz-image-region: rect(0, 400px, 20px, 380px);
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
}
|
||||
#PanelUI-zoomIn-btn {
|
||||
-moz-image-region: rect(0, 420px, 20px, 400px);
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
}
|
||||
|
||||
.PanelUI-editControls #PanelUI-copy-btn,
|
||||
.PanelUI-zoomControls #PanelUI-zoomReset-btn {
|
||||
border-left: none;
|
||||
border-right: none;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
#PanelUI-zoomIn-btn .toolbarbutton-text,
|
||||
#PanelUI-zoomOut-btn .toolbarbutton-text,
|
||||
#PanelUI-zoomReset-btn .toolbarbutton-icon {
|
||||
display: none;
|
||||
}
|
@ -18,8 +18,10 @@ browser.jar:
|
||||
#endif
|
||||
skin/classic/browser/actionicon-tab.png
|
||||
skin/classic/browser/actionicon-tab@2x.png
|
||||
skin/classic/browser/appmenu.png
|
||||
* skin/classic/browser/browser.css (browser.css)
|
||||
skin/classic/browser/click-to-play-warning-stripes.png
|
||||
skin/classic/browser/customizableui/customization-mode-background.jpg (customizableui/customization-mode-background.jpg)
|
||||
* skin/classic/browser/engineManager.css (engineManager.css)
|
||||
skin/classic/browser/Geolocation-16.png
|
||||
skin/classic/browser/Geolocation-16@2x.png
|
||||
@ -90,6 +92,7 @@ browser.jar:
|
||||
skin/classic/browser/webRTC-shareDevice-64@2x.png
|
||||
skin/classic/browser/webRTC-sharingDevice-16.png
|
||||
skin/classic/browser/webRTC-sharingDevice-16@2x.png
|
||||
* skin/classic/browser/customizableui/panelUIOverlay.css (customizableui/panelUIOverlay.css)
|
||||
skin/classic/browser/downloads/buttons.png (downloads/buttons.png)
|
||||
skin/classic/browser/downloads/buttons@2x.png (downloads/buttons@2x.png)
|
||||
skin/classic/browser/downloads/download-glow.png (downloads/download-glow.png)
|
||||
@ -176,26 +179,24 @@ browser.jar:
|
||||
skin/classic/browser/tabbrowser/connecting@2x.png (tabbrowser/connecting@2x.png)
|
||||
skin/classic/browser/tabbrowser/loading.png (tabbrowser/loading.png)
|
||||
skin/classic/browser/tabbrowser/loading@2x.png (tabbrowser/loading@2x.png)
|
||||
skin/classic/browser/tabbrowser/tab-active-middle.png (tabbrowser/tab-active-middle.png)
|
||||
skin/classic/browser/tabbrowser/tab-arrow-left.png (tabbrowser/tab-arrow-left.png)
|
||||
skin/classic/browser/tabbrowser/tab-arrow-left@2x.png (tabbrowser/tab-arrow-left@2x.png)
|
||||
skin/classic/browser/tabbrowser/tab-arrow-right.png (tabbrowser/tab-arrow-right.png)
|
||||
skin/classic/browser/tabbrowser/tab-arrow-right@2x.png (tabbrowser/tab-arrow-right@2x.png)
|
||||
skin/classic/browser/tabbrowser/tab-background-end.png (tabbrowser/tab-background-end.png)
|
||||
skin/classic/browser/tabbrowser/tab-background-middle.png (tabbrowser/tab-background-middle.png)
|
||||
skin/classic/browser/tabbrowser/tab-background-start.png (tabbrowser/tab-background-start.png)
|
||||
skin/classic/browser/tabbrowser/tab-stroke-end.png (tabbrowser/tab-stroke-end.png)
|
||||
skin/classic/browser/tabbrowser/tab-stroke-start.png (tabbrowser/tab-stroke-start.png)
|
||||
skin/classic/browser/tabbrowser/tabbar-bottom-bg-active.png (tabbrowser/tabbar-bottom-bg-active.png)
|
||||
skin/classic/browser/tabbrowser/tabbar-bottom-bg-inactive.png (tabbrowser/tabbar-bottom-bg-inactive.png)
|
||||
skin/classic/browser/tabbrowser/tab-bottom-normal-active.png (tabbrowser/tab-bottom-normal-active.png)
|
||||
skin/classic/browser/tabbrowser/tab-bottom-hover-active.png (tabbrowser/tab-bottom-hover-active.png)
|
||||
skin/classic/browser/tabbrowser/tab-bottom-selected-active.png (tabbrowser/tab-bottom-selected-active.png)
|
||||
skin/classic/browser/tabbrowser/tabbar-top-bg-active.png (tabbrowser/tabbar-top-bg-active.png)
|
||||
skin/classic/browser/tabbrowser/tabbar-top-bg-inactive.png (tabbrowser/tabbar-top-bg-inactive.png)
|
||||
skin/classic/browser/tabbrowser/tab-top-normal-active.png (tabbrowser/tab-top-normal-active.png)
|
||||
skin/classic/browser/tabbrowser/tab-top-normal-active@2x.png (tabbrowser/tab-top-normal-active@2x.png)
|
||||
skin/classic/browser/tabbrowser/tab-top-hover-active.png (tabbrowser/tab-top-hover-active.png)
|
||||
skin/classic/browser/tabbrowser/tab-top-hover-active@2x.png (tabbrowser/tab-top-hover-active@2x.png)
|
||||
skin/classic/browser/tabbrowser/tab-top-selected-active.png (tabbrowser/tab-top-selected-active.png)
|
||||
skin/classic/browser/tabbrowser/tab-top-selected-active@2x.png (tabbrowser/tab-top-selected-active@2x.png)
|
||||
skin/classic/browser/tabbrowser/tab-overflow-border.png (tabbrowser/tab-overflow-border.png)
|
||||
skin/classic/browser/tabbrowser/tabDragIndicator.png (tabbrowser/tabDragIndicator.png)
|
||||
skin/classic/browser/tabbrowser/tabDragIndicator@2x.png (tabbrowser/tabDragIndicator.png)
|
||||
skin/classic/browser/tabbrowser/tab-separator.png (tabbrowser/tab-separator.png)
|
||||
skin/classic/browser/tabview/close.png (tabview/close.png)
|
||||
skin/classic/browser/tabview/edit-light.png (tabview/edit-light.png)
|
||||
skin/classic/browser/tabview/search.png (tabview/search.png)
|
||||
@ -313,6 +314,7 @@ browser.jar:
|
||||
skin/classic/browser/keyhole-circle@2x.png (keyhole-circle-lion@2x.png)
|
||||
skin/classic/browser/lion/Toolbar.png (Toolbar-lion.png)
|
||||
skin/classic/browser/Toolbar@2x.png (Toolbar-lion@2x.png)
|
||||
skin/classic/browser/Toolbar-background-noise.png (Toolbar-background-noise.png)
|
||||
skin/classic/browser/lion/toolbarbutton-dropmarker.png (toolbarbutton-dropmarker-lion.png)
|
||||
skin/classic/browser/toolbarbutton-dropmarker@2x.png (toolbarbutton-dropmarker-lion@2x.png)
|
||||
skin/classic/browser/lion/tabbrowser/alltabs-box-bkgnd-icon.png (tabbrowser/alltabs-box-bkgnd-icon-lion.png)
|
||||
|
BIN
browser/themes/osx/tabbrowser/tab-active-middle.png
Normal file
After Width: | Height: | Size: 227 B |
BIN
browser/themes/osx/tabbrowser/tab-background-end.png
Normal file
After Width: | Height: | Size: 677 B |
BIN
browser/themes/osx/tabbrowser/tab-background-middle.png
Normal file
After Width: | Height: | Size: 153 B |
BIN
browser/themes/osx/tabbrowser/tab-background-start.png
Normal file
After Width: | Height: | Size: 657 B |
Before Width: | Height: | Size: 422 B |
Before Width: | Height: | Size: 405 B |
Before Width: | Height: | Size: 487 B |
BIN
browser/themes/osx/tabbrowser/tab-separator.png
Normal file
After Width: | Height: | Size: 159 B |
BIN
browser/themes/osx/tabbrowser/tab-stroke-end.png
Executable file
After Width: | Height: | Size: 932 B |
BIN
browser/themes/osx/tabbrowser/tab-stroke-start.png
Executable file
After Width: | Height: | Size: 903 B |
Before Width: | Height: | Size: 466 B |
Before Width: | Height: | Size: 891 B |
Before Width: | Height: | Size: 520 B |
Before Width: | Height: | Size: 968 B |
Before Width: | Height: | Size: 611 B |
Before Width: | Height: | Size: 1.1 KiB |
86
browser/themes/shared/customizableui/customizeMode.inc.css
Normal file
@ -0,0 +1,86 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
/* Customization mode */
|
||||
|
||||
#main-window[customizing] {
|
||||
background-image: url("chrome://browser/skin/customizableui/customization-mode-background.jpg");
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
#main-window[customizing] #tab-view-deck {
|
||||
transition-property: padding;
|
||||
transition-duration: 300ms;
|
||||
transition-timing-function: ease-out;
|
||||
padding: 8em;
|
||||
}
|
||||
|
||||
#main-window:not([customizing]) #tab-view-deck {
|
||||
transition-property: padding;
|
||||
transition-duration: 200ms;
|
||||
transition-timing-function: ease-out;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#main-window[customizing] .tabbrowser-tab:not([selected]),
|
||||
#main-window[customizing] .tabs-newtab-button {
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
||||
#main-window[customizing] .customization-target,
|
||||
#customization-panelHolder > #PanelUI-mainView {
|
||||
box-shadow: inset 0 0 3px hsl(204,100%,40%);
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
#main-window[customizing] .customization-target {
|
||||
min-width: 100px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
#customization-panelWrapper {
|
||||
padding: 0px 8px;
|
||||
}
|
||||
|
||||
toolbarpaletteitem {
|
||||
cursor: -moz-grab;
|
||||
transition: transform, background-color, border-color, box-shadow;
|
||||
transition-duration: 50ms, 10ms, 10ms, 10ms;
|
||||
transition-timing-function: ease-in-out, linear, linear, linear;
|
||||
}
|
||||
|
||||
toolbarpaletteitem[mousedown] {
|
||||
box-shadow: inset 0 0 3px hsl(204,100%,40%);
|
||||
cursor: -moz-grabbing;
|
||||
opacity: 0.8;
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
#customization-palette {
|
||||
display: block;
|
||||
overflow: auto;
|
||||
min-height: 3em;
|
||||
}
|
||||
|
||||
#customization-palette > toolbarpaletteitem {
|
||||
width: 110px;
|
||||
height: 94px;
|
||||
overflow: hidden;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
#customization-palette .toolbarpaletteitem-box {
|
||||
-moz-box-pack: center;
|
||||
-moz-box-flex: 1;
|
||||
width: 110px;
|
||||
max-width: 110px;
|
||||
}
|
||||
|
||||
#customization-palette > toolbarpaletteitem > label {
|
||||
text-align: center;
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
}
|
243
browser/themes/shared/customizableui/panelUIOverlay.inc.css
Normal file
@ -0,0 +1,243 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
|
||||
#PanelUI-contents[type="list"] > toolbarbutton {
|
||||
-moz-binding: url("chrome://browser/content/panelUI.xml#toolbarbutton");
|
||||
}
|
||||
|
||||
#app-extension-point-end > #PanelUI-menu-button {
|
||||
padding: 2px 5px;
|
||||
}
|
||||
#app-extension-point-end > #PanelUI-menu-button .toolbarbutton-text {
|
||||
display: none;
|
||||
}
|
||||
#app-extension-point-end > #PanelUI-menu-button .toolbarbutton-icon {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#PanelUI-popup > arrowscrollbox > autorepeatbutton {
|
||||
display: none;
|
||||
}
|
||||
#PanelUI-popup > arrowscrollbox > scrollbox {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
#PanelUI-popup > .panel-arrowcontainer > .panel-arrowcontent {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#PanelUI-menu-button > .toolbarbutton-icon {
|
||||
list-style-image: url("chrome://browser/skin/appmenu.png");
|
||||
}
|
||||
|
||||
#PanelUI-menu-button {
|
||||
list-style-image: none;
|
||||
}
|
||||
|
||||
#PanelUI-mainView .toolbarbutton-text {
|
||||
display: -moz-box;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.PanelUI-pageControls {
|
||||
padding: 1em 0 0;
|
||||
}
|
||||
|
||||
.PanelUI-footer,
|
||||
.PanelUI-editControls,
|
||||
.PanelUI-zoomControls,
|
||||
#PanelUI-contents,
|
||||
.PanelUI-footer,
|
||||
#customizationui-widget-panel {
|
||||
max-width: @menuPanelWidth@;
|
||||
padding: .5em 1em;
|
||||
}
|
||||
|
||||
#PanelUI-container {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#PanelUI-popup[panelopen="true"] > #PanelUI-container,
|
||||
#PanelUI-mainView-spring {
|
||||
transition: height 150ms;
|
||||
}
|
||||
|
||||
#PanelUI-popup[panelopen="true"] > #PanelUI-container > #PanelUI-viewStack > #PanelUI-mainView {
|
||||
transition: transform 150ms;
|
||||
}
|
||||
|
||||
#PanelUI-viewStack[view="main"] > #PanelUI-clickCapturer {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
#PanelUI-viewStack {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#PanelUI-viewStack,
|
||||
#PanelUI-container {
|
||||
min-width: @menuPanelWidth@;
|
||||
}
|
||||
|
||||
#PanelUI-mainView-spring {
|
||||
height: 0;
|
||||
}
|
||||
|
||||
#PanelUI-subViews {
|
||||
-moz-stack-sizing: ignore;
|
||||
background-image: linear-gradient(to bottom, white 1px, rgba(255, 255, 255, 0) 15px);
|
||||
background-color: -moz-dialog;
|
||||
box-shadow: -1px 0px 0px rgba(0, 0, 0, 0.2), -1px 0px 2px rgba(0, 0, 0, 0.1), 1px 0px 0px rgba(255, 255, 255, 0.2) inset;
|
||||
margin-left: 38px;
|
||||
transform: translateX(@menuPanelWidth@);
|
||||
transition: transform 150ms;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
#PanelUI-subViews > .PanelUI-subView:not([current]) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#PanelUI-viewStack[view="subview"] > #PanelUI-subViews {
|
||||
transform: translateX(0);
|
||||
}
|
||||
|
||||
#PanelUI-contents[type="list"] > toolbarbutton {
|
||||
-moz-box-orient: horizontal;
|
||||
}
|
||||
|
||||
#PanelUI-contents[type="list"] toolbarbutton > .toolbarbutton-text,
|
||||
#PanelUI-subViews toolbarbutton > .toolbarbutton-text,
|
||||
#customizationui-widget-panel toolbarbutton > .toolbarbutton-text {
|
||||
text-align: start;
|
||||
-moz-padding-start: 8px;
|
||||
display: -moz-box;
|
||||
}
|
||||
|
||||
#PanelUI-contents[type="list"] toolbarbutton .toolbarbutton-acceltext {
|
||||
font-size: calc(5em / 6);
|
||||
color: GrayText;
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
#PanelUI-contents[type="list"] toolbarbutton .toolbarbutton-icon {
|
||||
min-width: 2em;
|
||||
max-width: 2em;
|
||||
min-height: 2em;
|
||||
max-height: 2em;
|
||||
}
|
||||
|
||||
#PanelUI-contents[type="grid"] {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.PanelUI-pageControls toolbarbutton {
|
||||
min-width: 7em;
|
||||
max-width: 7em;
|
||||
}
|
||||
|
||||
.PanelUI-pageControls toolbarbutton > .toolbarbutton-icon {
|
||||
-moz-margin-end: 0;
|
||||
}
|
||||
|
||||
#PanelUI-contents[type="grid"] toolbarbutton {
|
||||
-moz-box-orient: vertical;
|
||||
min-width: 7em;
|
||||
max-width: 7em;
|
||||
min-height: 6em;
|
||||
max-height: 6em;
|
||||
}
|
||||
|
||||
#PanelUI-contents[type="grid"] toolbarbutton .toolbarbutton-icon {
|
||||
min-width: calc(8em / 3);
|
||||
max-width: calc(8em / 3);
|
||||
min-height: calc(8em / 3);
|
||||
max-height: calc(8em / 3);
|
||||
margin: calc(5em / 12);
|
||||
}
|
||||
|
||||
.PanelUI-editControls #PanelUI-copy-btn,
|
||||
.PanelUI-zoomControls #PanelUI-zoomReset-btn {
|
||||
border-left: none;
|
||||
border-right: none;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
#PanelUI-zoomIn-btn .toolbarbutton-text,
|
||||
#PanelUI-zoomOut-btn .toolbarbutton-text,
|
||||
#PanelUI-zoomReset-btn .toolbarbutton-icon {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.PanelUI-footer {
|
||||
background-color: rgba(0, 0, 0, 0.05);
|
||||
border-top: 1px solid rgba(0,0,0,.1);
|
||||
}
|
||||
|
||||
.PanelUI-footer toolbarbutton > .toolbarbutton-icon {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#PanelUI-help-btn {
|
||||
-moz-appearance: none;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
background: transparent;
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#customization-palette .toolbarbutton-text {
|
||||
display: none;
|
||||
}
|
||||
|
||||
:-moz-any(#PanelUI-mainView, #PanelUI-subViews, #customizationui-widget-panel) toolbarbutton {
|
||||
-moz-appearance: none;
|
||||
padding: 2px 6px;
|
||||
background: hsla(210,32%,93%,0) padding-box;
|
||||
border-radius: 2px;
|
||||
border: 1px solid;
|
||||
border-color: hsla(210,54%,20%,0) hsla(210,54%,20%,0) hsla(210,54%,20%,0);
|
||||
box-shadow: 0 1px hsla(0,0%,100%,0) inset,
|
||||
0 1px hsla(210,54%,20%,0),
|
||||
0 0 2px hsla(210,54%,20%,0);
|
||||
transition-property: background-color, border-color, box-shadow;
|
||||
transition-duration: 150ms;
|
||||
}
|
||||
|
||||
:-moz-any(#PanelUI-mainView, #PanelUI-subViews, #customizationui-widget-panel) toolbarbutton:not([disabled]):not([checked]):not([open]):not(:active):hover,
|
||||
#PanelUI-mainView .PanelUI-pageControls toolbarbutton,
|
||||
#PanelUI-mainView #PanelUI-customize-btn {
|
||||
background-image: -moz-linear-gradient(hsla(0,0%,100%,.6), hsla(0,0%,100%,.1));
|
||||
border-color: hsla(210,54%,20%,.15) hsla(210,54%,20%,.2) hsla(210,54%,20%,.25);
|
||||
box-shadow: 0 1px hsla(0,0%,100%,.3) inset,
|
||||
0 1px hsla(210,54%,20%,.03),
|
||||
0 0 2px hsla(210,54%,20%,.1);
|
||||
}
|
||||
|
||||
:-moz-any(#PanelUI-mainView, #PanelUI-subViews, #customizationui-widget-panel) toolbarbutton:not([disabled]):-moz-any([open],[checked],:hover:active),
|
||||
#PanelUI-mainView .PanelUI-pageControls toolbarbutton:hover:active {
|
||||
background-image: -moz-linear-gradient(hsla(0,0%,100%,.6), hsla(0,0%,100%,.1));
|
||||
background-color: hsla(210,54%,20%,.15);
|
||||
border-color: hsla(210,54%,20%,.3) hsla(210,54%,20%,.35) hsla(210,54%,20%,.4);
|
||||
box-shadow: 0 1px 1px hsla(210,54%,20%,.1) inset,
|
||||
0 0 1px hsla(210,54%,20%,.2) inset,
|
||||
0 1px 0 hsla(210,54%,20%,0),
|
||||
0 0 2px hsla(210,54%,20%,0);
|
||||
text-shadow: none;
|
||||
transition: none;
|
||||
}
|
||||
|
||||
#PanelUI-historyItems > toolbarbutton {
|
||||
list-style-image: url("chrome://mozapps/skin/places/defaultFavicon.png");
|
||||
}
|
||||
|
||||
#PanelUI-contents > .panelui-mainview-anchor {
|
||||
background-color: Highlight;
|
||||
background-image: linear-gradient(rgba(255,255,255,0.3), rgba(255,255,255,0));
|
||||
background-repeat: repeat-x;
|
||||
color: HighlightText;
|
||||
}
|
247
browser/themes/shared/tabs.inc.css
Normal file
@ -0,0 +1,247 @@
|
||||
%if 0
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
%endif
|
||||
|
||||
%define tabHeight 30px
|
||||
%define tabCurveWidth 30px
|
||||
%define tabCurveHalfWidth 15px
|
||||
|
||||
/* image preloading hack */
|
||||
#TabsToolbar::before {
|
||||
content: '';
|
||||
display: block;
|
||||
background-image:
|
||||
url(chrome://browser/skin/tabbrowser/tab-background-end.png),
|
||||
url(chrome://browser/skin/tabbrowser/tab-background-middle.png),
|
||||
url(chrome://browser/skin/tabbrowser/tab-background-start.png);
|
||||
}
|
||||
|
||||
.tabbrowser-tab,
|
||||
.tabs-newtab-button {
|
||||
-moz-appearance: none;
|
||||
background-color: transparent;
|
||||
border-radius: 0;
|
||||
border-width: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.tabbrowser-tab {
|
||||
-moz-box-align: stretch;
|
||||
}
|
||||
|
||||
/* The selected tab should appear above adjacent tabs and .tabs-newtab-button */
|
||||
.tabbrowser-tab[selected=true] {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.tab-background-middle {
|
||||
-moz-box-flex: 1;
|
||||
background-clip: padding-box;
|
||||
border-left: @tabCurveHalfWidth@ solid transparent;
|
||||
border-right: @tabCurveHalfWidth@ solid transparent;
|
||||
margin: 0 -@tabCurveHalfWidth@;
|
||||
}
|
||||
|
||||
.tab-content {
|
||||
-moz-padding-end: 9px;
|
||||
-moz-padding-start: 9px;
|
||||
}
|
||||
|
||||
.tab-throbber,
|
||||
.tab-icon-image,
|
||||
.tab-close-button {
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
.tab-throbber,
|
||||
.tab-icon-image {
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
.tab-icon-image {
|
||||
list-style-image: url("chrome://mozapps/skin/places/defaultFavicon.png");
|
||||
}
|
||||
|
||||
.tab-throbber {
|
||||
list-style-image: url("chrome://browser/skin/tabbrowser/connecting.png");
|
||||
}
|
||||
|
||||
.tab-throbber[progress] {
|
||||
list-style-image: url("chrome://browser/skin/tabbrowser/loading.png");
|
||||
}
|
||||
|
||||
.tab-throbber:not([pinned]),
|
||||
.tab-icon-image:not([pinned]) {
|
||||
-moz-margin-end: 6px;
|
||||
}
|
||||
|
||||
.tab-label {
|
||||
-moz-margin-end: 0;
|
||||
-moz-margin-start: 0;
|
||||
}
|
||||
|
||||
.tab-close-button {
|
||||
-moz-margin-start: 4px;
|
||||
-moz-margin-end: -2px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.tab-background,
|
||||
.tabs-newtab-button {
|
||||
/* overlap the tab curves */
|
||||
-moz-margin-end: -@tabCurveHalfWidth@;
|
||||
-moz-margin-start: -@tabCurveHalfWidth@;
|
||||
}
|
||||
|
||||
.tabbrowser-arrowscrollbox > .arrowscrollbox-scrollbox {
|
||||
-moz-padding-end: @tabCurveHalfWidth@;
|
||||
-moz-padding-start: @tabCurveHalfWidth@;
|
||||
}
|
||||
|
||||
.tab-background-start[selected=true]::after,
|
||||
.tab-background-start[selected=true]::before,
|
||||
.tab-background-start,
|
||||
.tab-background-end,
|
||||
.tab-background-end[selected=true]::after,
|
||||
.tab-background-end[selected=true]::before {
|
||||
min-height: @tabHeight@;
|
||||
width: @tabCurveWidth@;
|
||||
}
|
||||
|
||||
/* Selected tab */
|
||||
|
||||
/*
|
||||
Tab background pseudo-elements which are positioned above .tab-background-start/end:
|
||||
- ::before - provides the fill of the tab curve and is clipped to the tab shape. This is where
|
||||
pointer events go for the curve.
|
||||
- ::after - provides the border/stroke of the tab curve and is overlayed above ::before. Pointer
|
||||
events go through to ::before to get the proper shape.
|
||||
*/
|
||||
|
||||
|
||||
.tab-background-start[selected=true]::after,
|
||||
.tab-background-end[selected=true]::after {
|
||||
/* position ::after on top of its parent */
|
||||
-moz-margin-start: -@tabCurveWidth@;
|
||||
margin-bottom: -1px;
|
||||
display: -moz-box;
|
||||
}
|
||||
|
||||
.tab-background-start[selected=true]::before,
|
||||
.tab-background-end[selected=true]::before {
|
||||
/* all ::before pseudo elements */
|
||||
content: "";
|
||||
display: -moz-box;
|
||||
}
|
||||
|
||||
.tab-background-start[selected=true]:-moz-locale-dir(ltr)::before,
|
||||
.tab-background-end[selected=true]:-moz-locale-dir(rtl)::before {
|
||||
clip-path: url(chrome://browser/content/browser.xul#tab-curve-clip-path-start);
|
||||
}
|
||||
|
||||
.tab-background-end[selected=true]:-moz-locale-dir(ltr)::before,
|
||||
.tab-background-start[selected=true]:-moz-locale-dir(rtl)::before {
|
||||
clip-path: url(chrome://browser/content/browser.xul#tab-curve-clip-path-end);
|
||||
}
|
||||
|
||||
.tab-background-start[selected=true]:-moz-locale-dir(ltr)::after,
|
||||
.tab-background-end[selected=true]:-moz-locale-dir(rtl)::after {
|
||||
content: url(chrome://browser/skin/tabbrowser/tab-stroke-start.png);
|
||||
}
|
||||
|
||||
.tab-background-end[selected=true]:-moz-locale-dir(ltr)::after,
|
||||
.tab-background-start[selected=true]:-moz-locale-dir(rtl)::after {
|
||||
content: url(chrome://browser/skin/tabbrowser/tab-stroke-end.png);
|
||||
}
|
||||
|
||||
.tab-background-start[selected=true]::before,
|
||||
.tab-background-end[selected=true]::before {
|
||||
background-color: -moz-dialog;
|
||||
background-image: @fgTabTexture@;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.tab-background-middle[selected=true] {
|
||||
background-color: transparent;
|
||||
background-image: url(chrome://browser/skin/tabbrowser/tab-active-middle.png),
|
||||
@fgTabBackgroundMiddle@;
|
||||
background-size: 100% 100%;
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
|
||||
.tab-background-middle[selected=true]:-moz-lwtheme {
|
||||
background-image: url(chrome://browser/skin/tabbrowser/tab-active-middle.png);
|
||||
}
|
||||
|
||||
/* Same as above but without border or -moz-dialog background */
|
||||
.tab-background-start[selected=true]:-moz-lwtheme::before,
|
||||
.tab-background-end[selected=true]:-moz-lwtheme::before,
|
||||
.tab-background-middle[selected=true]:-moz-lwtheme {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
/* End selected tab */
|
||||
|
||||
/* new tab button border and gradient on hover */
|
||||
.tabbrowser-tab:hover > .tab-stack > .tab-background:not([selected=true]),
|
||||
.tabs-newtab-button:hover {
|
||||
background-image: url(chrome://browser/skin/tabbrowser/tab-background-start.png),
|
||||
url(chrome://browser/skin/tabbrowser/tab-background-middle.png),
|
||||
url(chrome://browser/skin/tabbrowser/tab-background-end.png);
|
||||
background-position: left bottom, @tabCurveWidth@ bottom, right bottom;
|
||||
background-repeat: no-repeat;
|
||||
background-size: @tabCurveWidth@ 100%, calc(100% - (2 * @tabCurveWidth@)) 100%, @tabCurveWidth@ 100%;
|
||||
}
|
||||
|
||||
/* Tab pointer-events */
|
||||
.tabbrowser-tab {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/* Allow pointer-events on ::before of the ends of selected tabs
|
||||
since they are clipped to the curve shape. */
|
||||
.tab-background-start[selected=true]::before,
|
||||
.tab-background-end[selected=true]::before,
|
||||
.tab-background-middle,
|
||||
.tabs-newtab-button,
|
||||
.tab-close-button {
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
/* Pinned tabs */
|
||||
|
||||
/* pinned tabs need position: fixed for separator when overflowing */
|
||||
#tabbrowser-tabs[positionpinnedtabs] > .tabbrowser-tab[pinned]::before {
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
.tabbrowser-tab[pinned][titlechanged]:not([selected="true"]) > .tab-stack > .tab-content {
|
||||
background-image: radial-gradient(farthest-corner at center bottom, rgb(255,255,255) 3%, rgba(186,221,251,0.75) 20%, rgba(127,179,255,0.25) 40%, rgba(127,179,255,0) 70%);
|
||||
background-position: center bottom 1px;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 85% 100%;
|
||||
}
|
||||
|
||||
/* Background tab separators (3px wide).
|
||||
Also show separators beside the selected tab when dragging it. */
|
||||
#tabbrowser-tabs[movingtab] > .tabbrowser-tab[beforeselected]:not([last-visible-tab])::after,
|
||||
.tabbrowser-tab:not([selected]):not([afterselected-visible]):not([afterhovered]):not([first-visible-tab]):not(:hover)::before,
|
||||
#tabbrowser-tabs:not([overflow]) > .tabbrowser-tab[last-visible-tab]:not([selected]):not([beforehovered]):not(:hover)::after {
|
||||
-moz-margin-start: -1.5px;
|
||||
-moz-margin-end: -1.5px;
|
||||
content: url(chrome://browser/skin/tabbrowser/tab-separator.png);
|
||||
display: -moz-box;
|
||||
width: 3px;
|
||||
}
|
||||
|
||||
/* New tab button */
|
||||
|
||||
.tabs-newtab-button {
|
||||
clip-path: url(chrome://browser/content/browser.xul#tab-clip-path-outer);
|
||||
width: 66px;
|
||||
}
|
BIN
browser/themes/windows/appmenu.png
Normal file
After Width: | Height: | Size: 247 B |
@ -11,7 +11,8 @@
|
||||
%define glassInactiveBorderColor rgb(102, 102, 102)
|
||||
|
||||
@media not all and (-moz-windows-classic) {
|
||||
#main-window[sizemode="normal"] > #titlebar > #titlebar-content > #appmenu-button-container {
|
||||
#main-window[sizemode="normal"] > #titlebar > #titlebar-content > #appmenu-button-container,
|
||||
#main-window[sizemode="normal"] > #tab-view-deck > #browser-panel > #navigator-toolbox > #toolbar-menubar {
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
@ -47,27 +48,15 @@
|
||||
background-color: @customToolbarColor@;
|
||||
}
|
||||
|
||||
.tabbrowser-tab:not(:-moz-lwtheme),
|
||||
.tabs-newtab-button:not(:-moz-lwtheme) {
|
||||
background-image: @toolbarShadowOnTab@, @bgTabTexture@,
|
||||
linear-gradient(@customToolbarColor@, @customToolbarColor@);
|
||||
.tab-background-start[selected=true]:not(:-moz-lwtheme)::before,
|
||||
.tab-background-end[selected=true]:not(:-moz-lwtheme)::before {
|
||||
background-color: @customToolbarColor@;
|
||||
background-image: @fgTabTexture@;
|
||||
}
|
||||
|
||||
.tabbrowser-tab:not(:-moz-lwtheme):hover,
|
||||
.tabs-newtab-button:not(:-moz-lwtheme):hover {
|
||||
background-image: @toolbarShadowOnTab@, @bgTabTextureHover@,
|
||||
linear-gradient(@customToolbarColor@, @customToolbarColor@);
|
||||
}
|
||||
|
||||
.tabbrowser-tab[selected="true"]:not(:-moz-lwtheme) {
|
||||
background-image: linear-gradient(#fff, @toolbarHighlight@ 50%),
|
||||
linear-gradient(@customToolbarColor@, @customToolbarColor@);
|
||||
}
|
||||
|
||||
#main-window[tabsontop=false]:not([disablechrome]) .tabbrowser-tab[selected=true]:not(:-moz-lwtheme) {
|
||||
background-image: @toolbarShadowOnTab@,
|
||||
linear-gradient(#fff, @toolbarHighlight@ 50%),
|
||||
linear-gradient(@customToolbarColor@, @customToolbarColor@);
|
||||
.tab-background-middle[selected=true]:not(:-moz-lwtheme) {
|
||||
background-image: url(chrome://browser/skin/tabbrowser/tab-active-middle.png),
|
||||
linear-gradient(transparent, transparent 2px, @customToolbarColor@ 2px, @customToolbarColor@);
|
||||
}
|
||||
|
||||
#navigator-toolbox:not(:-moz-lwtheme)::after {
|
||||
@ -137,10 +126,6 @@
|
||||
-moz-appearance: -moz-win-exclude-glass;
|
||||
}
|
||||
|
||||
#main-window[chromemargin^="0,"][sizemode=normal] #navigator-toolbox {
|
||||
margin-top: -7px;
|
||||
}
|
||||
|
||||
/* Artificially draw window borders that are covered by lwtheme, see bug 591930. */
|
||||
#main-window[sizemode="normal"] > #titlebar > #titlebar-content:-moz-lwtheme {
|
||||
border-top: 2px solid;
|
||||
@ -163,11 +148,6 @@
|
||||
margin-bottom: -1px; /* compensate white outer border */
|
||||
}
|
||||
|
||||
#main-window[sizemode=fullscreen]:not(:-moz-lwtheme) {
|
||||
-moz-appearance: none;
|
||||
background-color: #556;
|
||||
}
|
||||
|
||||
#toolbar-menubar:not(:-moz-lwtheme),
|
||||
#TabsToolbar[tabsontop=true]:not(:-moz-lwtheme),
|
||||
#nav-bar[tabsontop=false]:not(:-moz-lwtheme),
|
||||
@ -179,17 +159,13 @@
|
||||
border-right-style: none !important;
|
||||
}
|
||||
|
||||
:-moz-any(#toolbar-menubar, #nav-bar[tabsontop=false]) :-moz-any(@primaryToolbarButtons@):not(:-moz-any(#alltabs-button,#tabview-button,#sync-button[status])) > .toolbarbutton-icon:not(:-moz-lwtheme),
|
||||
:-moz-any(#toolbar-menubar, #nav-bar[tabsontop=false]) :-moz-any(@primaryToolbarButtons@) > toolbarbutton > .toolbarbutton-icon:not(:-moz-lwtheme),
|
||||
#TabsToolbar[tabsontop=true] :-moz-any(@primaryToolbarButtons@):not(:-moz-any(#alltabs-button,#tabview-button,#new-tab-button,#sync-button[status])) > .toolbarbutton-icon:not(:-moz-lwtheme),
|
||||
#TabsToolbar[tabsontop=true] :-moz-any(@primaryToolbarButtons@) > toolbarbutton > .toolbarbutton-icon:not(:-moz-lwtheme),
|
||||
#nav-bar + #customToolbars + #PersonalToolbar[collapsed=true] + #TabsToolbar[tabsontop=false]:last-child :-moz-any(@primaryToolbarButtons@):not(:-moz-any(#alltabs-button,#tabview-button,#new-tab-button,#sync-button[status])) > .toolbarbutton-icon:not(:-moz-lwtheme),
|
||||
#nav-bar + #customToolbars + #PersonalToolbar[collapsed=true] + #TabsToolbar[tabsontop=false]:last-child :-moz-any(@primaryToolbarButtons@) > toolbarbutton > .toolbarbutton-icon:not(:-moz-lwtheme) {
|
||||
#navigator-toolbox[tabsontop=false] > :-moz-any(#toolbar-menubar, #nav-bar) :-moz-any(@primaryToolbarButtons@):not(:-moz-any(#alltabs-button,#tabview-button,#sync-button[status],#bookmarks-menu-button)) > .toolbarbutton-icon:not(:-moz-lwtheme),
|
||||
#nav-bar + #customToolbars + #PersonalToolbar[collapsed=true] + #TabsToolbar[tabsontop=false]:last-child :-moz-any(@primaryToolbarButtons@):not(:-moz-any(#alltabs-button,#tabview-button,#new-tab-button,#sync-button[status],#bookmarks-menu-button)) > .toolbarbutton-icon:not(:-moz-lwtheme) {
|
||||
list-style-image: url("chrome://browser/skin/Toolbar-inverted.png");
|
||||
}
|
||||
|
||||
:-moz-any(#toolbar-menubar, #TabsToolbar[tabsontop=true], #nav-bar[tabsontop=false]) .toolbarbutton-1 > .toolbarbutton-menu-dropmarker:not(:-moz-lwtheme),
|
||||
:-moz-any(#toolbar-menubar, #TabsToolbar[tabsontop=true], #nav-bar[tabsontop=false]) .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker:not(:-moz-lwtheme),
|
||||
#navigator-toolbox[tabsontop=false] > :-moz-any(#toolbar-menubar, #nav-bar) .toolbarbutton-1 > .toolbarbutton-menu-dropmarker:not(:-moz-lwtheme),
|
||||
#navigator-toolbox[tabsontop=false] > :-moz-any(#toolbar-menubar, #nav-bar) .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker:not(:-moz-lwtheme),
|
||||
#nav-bar + #customToolbars + #PersonalToolbar[collapsed=true] + #TabsToolbar[tabsontop=false]:last-child .toolbarbutton-1 > .toolbarbutton-menu-dropmarker:not(:-moz-lwtheme),
|
||||
#nav-bar + #customToolbars + #PersonalToolbar[collapsed=true] + #TabsToolbar[tabsontop=false]:last-child .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker:not(:-moz-lwtheme) {
|
||||
list-style-image: url("chrome://browser/skin/toolbarbutton-dropdown-arrow-inverted.png");
|
||||
@ -203,9 +179,6 @@
|
||||
border-right: 1px solid @toolbarShadowColor@;
|
||||
background-clip: padding-box;
|
||||
}
|
||||
#main-window[sizemode=normal] #navigator-toolbox > toolbar:-moz-lwtheme {
|
||||
border-color: transparent !important;
|
||||
}
|
||||
#main-window[sizemode=normal] #browser-border-start,
|
||||
#main-window[sizemode=normal] #browser-border-end {
|
||||
display: -moz-box;
|
||||
@ -224,23 +197,31 @@
|
||||
}
|
||||
|
||||
/* Toolbar shadow behind tabs */
|
||||
#nav-bar[tabsontop=true],
|
||||
#main-window[disablechrome] #navigator-toolbox[tabsontop=true]::after {
|
||||
border-top: 1px solid @toolbarShadowColor@ !important;
|
||||
background-clip: padding-box;
|
||||
}
|
||||
|
||||
#main-window[disablechrome] #navigator-toolbox[tabsontop=true]::after {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
/* This code is only needed for restored windows (i.e. sizemode=normal)
|
||||
because of the border radius on the toolbar below the tab bar. */
|
||||
#main-window[sizemode=normal] #nav-bar[tabsontop=true]:not(:-moz-lwtheme),
|
||||
#main-window[sizemode=normal] #nav-bar[tabsontop=true][collapsed=true]:not([customizing]) + toolbar:not(:-moz-lwtheme),
|
||||
#main-window[sizemode=normal] #nav-bar[tabsontop=true][collapsed=true]:not([customizing]) + #customToolbars + #PersonalToolbar:not(:-moz-lwtheme),
|
||||
#main-window[sizemode=normal][disablechrome] #navigator-toolbox[tabsontop=true]:not(:-moz-lwtheme)::after {
|
||||
#main-window[sizemode=normal] #nav-bar[tabsontop=true],
|
||||
#main-window[sizemode=normal] #nav-bar[tabsontop=true][collapsed=true]:not([customizing]) + toolbar,
|
||||
#main-window[sizemode=normal] #nav-bar[tabsontop=true][collapsed=true]:not([customizing]) + #customToolbars + #PersonalToolbar,
|
||||
#main-window[sizemode=normal][disablechrome] #navigator-toolbox[tabsontop=true]::after {
|
||||
border-top: 1px solid @toolbarShadowColor@;
|
||||
border-top-left-radius: 2.5px;
|
||||
border-top-right-radius: 2.5px;
|
||||
background-clip: padding-box;
|
||||
}
|
||||
#main-window[sizemode=normal] #TabsToolbar[tabsontop=true]:not(:-moz-lwtheme) {
|
||||
|
||||
/* Cover the top border of the adjacent toolbar */
|
||||
#TabsToolbar[tabsontop=true] {
|
||||
margin-bottom: -1px;
|
||||
background-image: none !important;
|
||||
}
|
||||
#main-window[sizemode=normal] #tabbrowser-tabs[tabsontop=true] > .tabbrowser-arrowscrollbox > .arrowscrollbox-scrollbox > .scrollbox-innerbox:not(:-moz-lwtheme) {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#navigator-toolbox[tabsontop=false] > #PersonalToolbar {
|
||||
@ -276,7 +257,7 @@
|
||||
#nav-bar[tabsontop=false],
|
||||
#nav-bar + #customToolbars + #PersonalToolbar[collapsed="true"] + #TabsToolbar[tabsontop="false"]:last-child,
|
||||
#navigator-toolbox > toolbar:not(#toolbar-menubar):-moz-lwtheme {
|
||||
-moz-binding: url("chrome://global/content/bindings/toolbar.xml#toolbar-drag");
|
||||
-moz-binding: url("chrome://browser/content/customizableui/toolbar.xml#toolbar-drag");
|
||||
}
|
||||
|
||||
#appcontent:not(:-moz-lwtheme) {
|
||||
@ -338,6 +319,41 @@
|
||||
}
|
||||
}
|
||||
|
||||
@media (-moz-windows-glass) {
|
||||
#main-window[sizemode=fullscreen]:not(:-moz-lwtheme) {
|
||||
-moz-appearance: none;
|
||||
background-color: #556;
|
||||
}
|
||||
|
||||
/* Glass Fog */
|
||||
|
||||
#TabsToolbar:not(:-moz-lwtheme) {
|
||||
background-image: none;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#TabsToolbar:not(:-moz-lwtheme)::before {
|
||||
box-shadow: 0 0 30px 30px rgb(174,189,204);
|
||||
content: "";
|
||||
display: -moz-box;
|
||||
height: 0;
|
||||
margin: 0 60px; /* (30px + 30px) from box-shadow */
|
||||
opacity: 0.85;
|
||||
position: absolute;
|
||||
pointer-events: none;
|
||||
top: 50%;
|
||||
width: -moz-available;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
#main-window[sizemode=normal] #tabbrowser-tabs[tabsontop=true] > .tabbrowser-arrowscrollbox > .arrowscrollbox-scrollbox > .scrollbox-innerbox:not(:-moz-lwtheme) {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* End Glass Fog */
|
||||
}
|
||||
|
||||
|
||||
@media not all and (-moz-windows-compositor) {
|
||||
@media (-moz-windows-default-theme) {
|
||||
#main-window {
|
||||
|
29
browser/themes/windows/browser-lightweightTheme.css
Normal file
@ -0,0 +1,29 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
%include windowsShared.inc
|
||||
%filter substitution
|
||||
|
||||
/*
|
||||
* LightweightThemeListener will append the current lightweight theme's header
|
||||
* image to the background-image for each of the following rulesets.
|
||||
*/
|
||||
|
||||
/* Lightweight theme on tabs */
|
||||
#tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab > .tab-stack > .tab-background > .tab-background-start[selected=true]:-moz-lwtheme::before,
|
||||
#tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab > .tab-stack > .tab-background > .tab-background-end[selected=true]:-moz-lwtheme::before {
|
||||
background-attachment: scroll, fixed;
|
||||
background-color: transparent;
|
||||
background-image: @fgTabTexture@;/*, lwtHeader;*/
|
||||
background-position: 0 0, right top;
|
||||
}
|
||||
|
||||
#tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab > .tab-stack > .tab-background > .tab-background-middle[selected=true]:-moz-lwtheme {
|
||||
background-attachment: scroll, scroll, fixed;
|
||||
background-color: transparent;
|
||||
background-image: url(chrome://browser/skin/tabbrowser/tab-active-middle-lwtheme.png),
|
||||
@fgTabTexture@;/*,
|
||||
lwtHeader;*/
|
||||
background-position: 0 0, 0 0, right top;
|
||||
}
|
@ -8,17 +8,14 @@
|
||||
@namespace html url("http://www.w3.org/1999/xhtml");
|
||||
|
||||
%include ../shared/browser.inc
|
||||
%include windowsShared.inc
|
||||
%filter substitution
|
||||
%define toolbarHighlight rgba(255,255,255,.5)
|
||||
%define selectedTabHighlight rgba(255,255,255,.7)
|
||||
%define toolbarShadowColor rgba(10%,10%,10%,.4)
|
||||
%define toolbarShadowOnTab linear-gradient(to top, rgba(10%,10%,10%,.4) 1px, transparent 1px)
|
||||
%define bgTabTexture linear-gradient(transparent, hsla(0,0%,45%,.1) 1px, hsla(0,0%,32%,.2) 80%, hsla(0,0%,0%,.2))
|
||||
%define bgTabTextureHover linear-gradient(hsla(0,0%,100%,.3) 1px, hsla(0,0%,75%,.2) 80%, hsla(0,0%,60%,.2))
|
||||
%define toolbarShadowColor hsla(209,67%,12%,0.35)
|
||||
%define fgTabBackgroundMiddle linear-gradient(transparent, transparent 2px, -moz-dialog 2px, -moz-dialog)
|
||||
%define navbarTextboxCustomBorder border-color: rgba(0,0,0,.32);
|
||||
%define navbarLargeIcons #navigator-toolbox[iconsize=large][mode=icons] > #nav-bar
|
||||
%define navbarLargeIcons #navigator-toolbox[iconsize=large] > #nav-bar
|
||||
%define forwardTransitionLength 150ms
|
||||
%define conditionalForwardWithUrlbar window:not([chromehidden~=toolbar]) #navigator-toolbox[iconsize=large][mode=icons] > :-moz-any(#nav-bar[currentset*="unified-back-forward-button,urlbar-container"],#nav-bar:not([currentset])) > #unified-back-forward-button
|
||||
%define conditionalForwardWithUrlbar window:not([chromehidden~=toolbar]) #navigator-toolbox[iconsize=large] > :-moz-any(#nav-bar[currentset*="unified-back-forward-button,urlbar-container"],#nav-bar:not([currentset])) > #nav-bar-customizationtarget > #unified-back-forward-button
|
||||
%define conditionalForwardWithUrlbarWidth 27
|
||||
|
||||
%ifdef MOZ_OFFICIAL_BRANDING
|
||||
@ -39,6 +36,21 @@
|
||||
-moz-box-flex: 1; /* make menu items expand to fill toolbar height */
|
||||
}
|
||||
|
||||
#main-window[tabsintitlebar][sizemode="normal"] #toolbar-menubar[autohide="true"][inactive="true"]:not([customizing="true"]) {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
#main-window[sizemode="normal"] #toolbar-menubar,
|
||||
/* We want a 4px gap between the TabsToolbar and the toolbar-menubar when the
|
||||
toolbar-menu is displayed in either restored or maximized mode. */
|
||||
#main-window:not([sizemode="fullscreen"]) #toolbar-menubar:-moz-any(:not([autohide="true"]), :not([inactive="true"])) {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
#toolbar-menubar:not([autohide="true"]) {
|
||||
-moz-binding: url("chrome://global/content/bindings/toolbar.xml#toolbar-drag");
|
||||
}
|
||||
|
||||
#navigator-toolbox {
|
||||
-moz-appearance: none;
|
||||
background-color: transparent;
|
||||
@ -66,17 +78,23 @@
|
||||
%ifdef WINDOWS_AERO
|
||||
@media not all and (-moz-windows-compositor) {
|
||||
%endif
|
||||
#main-window[tabsintitlebar]:not([inFullscreen]) #toolbar-menubar[inactive] ~ #TabsToolbar:not(:-moz-lwtheme) {
|
||||
#toolbar-menubar {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
#main-window[tabsintitlebar][sizemode="maximized"] #toolbar-menubar[inactive] ~ #TabsToolbar:not(:-moz-lwtheme) {
|
||||
background: linear-gradient(to top, @toolbarShadowColor@ 1px, transparent 1px),
|
||||
linear-gradient(rgba(50%,50%,50%,0), ActiveCaption 85%);
|
||||
color: CaptionText;
|
||||
}
|
||||
#main-window[tabsintitlebar]:not([inFullscreen]) #toolbar-menubar[inactive] ~ #TabsToolbar:not(:-moz-lwtheme):-moz-window-inactive {
|
||||
#main-window[tabsintitlebar][sizemode="maximized"] #toolbar-menubar[inactive] ~ #TabsToolbar:not(:-moz-lwtheme):-moz-window-inactive {
|
||||
background: linear-gradient(to top, @toolbarShadowColor@ 1px, transparent 1px),
|
||||
linear-gradient(rgba(50%,50%,50%,0), InactiveCaption 85%);
|
||||
color: InactiveCaptionText;
|
||||
}
|
||||
|
||||
#TabsToolbar:-moz-lwtheme {
|
||||
background: linear-gradient(to top, @toolbarShadowColor@ 1px, transparent 1px);
|
||||
}
|
||||
#main-window[tabsintitlebar] #titlebar:-moz-lwtheme {
|
||||
visibility: hidden;
|
||||
}
|
||||
@ -108,6 +126,16 @@
|
||||
|
||||
/* ::::: app menu button ::::: */
|
||||
|
||||
/* The app menu button must appear on top of the navigator-toolbox in order
|
||||
* for click and hover mouse events to work properly for the button in the
|
||||
* restored window state. Otherwise, elements in the navigator-toolbox, like the
|
||||
* menubar can swallow these events. It will also place the button above the
|
||||
* fog on themes with Aero Glass.
|
||||
*/
|
||||
#main-window[tabsintitlebar] #appmenu-button-container {
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
#appmenu-button {
|
||||
-moz-appearance: none;
|
||||
background-clip: padding-box;
|
||||
@ -130,6 +158,10 @@
|
||||
|
||||
%ifndef WINDOWS_AERO
|
||||
@media (-moz-windows-default-theme) {
|
||||
#main-window[tabsintitlebar][sizemode="normal"] #toolbar-menubar {
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
#main-window[sizemode="normal"] #appmenu-button {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
@ -543,17 +575,20 @@
|
||||
}
|
||||
|
||||
@media (-moz-windows-classic) {
|
||||
#main-window[sizemode="normal"] > #titlebar > #titlebar-content > #appmenu-button-container {
|
||||
#main-window[tabsintitlebar][sizemode="normal"] > #titlebar > #titlebar-content > #appmenu-button-container,
|
||||
#main-window[tabsintitlebar][sizemode="normal"] > #tab-view-deck > #browser-panel > #navigator-toolbox > #toolbar-menubar {
|
||||
margin-top: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
/* The button box must appear on top of the navigator-toolbox in order for
|
||||
* click and hover mouse events to work properly for the button in the restored
|
||||
* window state. Otherwise, elements in the navigator-toolbox, like the menubar,
|
||||
* can swallow those events. It will also place the buttons above the fog on
|
||||
* themes with Aero Glass.
|
||||
*/
|
||||
#titlebar-buttonbox {
|
||||
-moz-appearance: -moz-window-button-box;
|
||||
}
|
||||
|
||||
#main-window[sizemode="maximized"] #titlebar-buttonbox {
|
||||
-moz-appearance: -moz-window-button-box-maximized;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.titlebar-placeholder[type="appmenu-button"] {
|
||||
@ -612,7 +647,7 @@ toolbarbutton.bookmark-item[open="true"] {
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
/* Prevent [mode="icons"] from hiding the label */
|
||||
/* Force the display of the label for bookmarks */
|
||||
.bookmark-item > .toolbarbutton-text {
|
||||
display: -moz-box !important;
|
||||
}
|
||||
@ -744,15 +779,6 @@ menuitem.bookmark-item {
|
||||
-moz-margin-end: 0;
|
||||
}
|
||||
|
||||
toolbar[mode=full] .toolbarbutton-1:not([type=menu-button]) {
|
||||
-moz-box-orient: vertical;
|
||||
}
|
||||
|
||||
toolbar[mode=full] .toolbarbutton-1,
|
||||
toolbar[mode=full] .toolbarbutton-1 > .toolbarbutton-menubutton-button {
|
||||
min-width: 57px;
|
||||
}
|
||||
|
||||
#nav-bar {
|
||||
/* force iconsize="small" on this toolbar */
|
||||
counter-reset: smallicons;
|
||||
@ -773,7 +799,7 @@ toolbar[mode=full] .toolbarbutton-1 > .toolbarbutton-menubutton-button {
|
||||
-moz-box-pack: center;
|
||||
}
|
||||
|
||||
@navbarLargeIcons@ .toolbarbutton-1[type=menu]:not(#back-button):not(#forward-button):not(#feed-button):not(#social-provider-button) {
|
||||
@navbarLargeIcons@ .toolbarbutton-1[type=menu]:not(#back-button):not(#forward-button):not(#feed-button):not(#social-provider-button):not(#PanelUI-menu-button) {
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
}
|
||||
@ -813,7 +839,7 @@ toolbar[mode=full] .toolbarbutton-1 > .toolbarbutton-menubutton-button {
|
||||
padding: 3px 7px;
|
||||
}
|
||||
|
||||
@navbarLargeIcons@ .toolbarbutton-1[type=menu]:not(#back-button):not(#forward-button):not(#feed-button):not(#social-provider-button) > .toolbarbutton-icon,
|
||||
@navbarLargeIcons@ .toolbarbutton-1[type=menu]:not(#back-button):not(#forward-button):not(#feed-button):not(#social-provider-button):not(#PanelUI-menu-button) > .toolbarbutton-icon,
|
||||
@navbarLargeIcons@ .toolbarbutton-1[type=menu] > .toolbarbutton-text /* hack for add-ons that forcefully display the label */ {
|
||||
-moz-padding-end: 17px;
|
||||
}
|
||||
@ -1148,10 +1174,6 @@ toolbar[mode=full] .toolbarbutton-1 > .toolbarbutton-menubutton-button {
|
||||
list-style-image: url(chrome://browser/skin/tabview/tabview.png);
|
||||
}
|
||||
|
||||
%ifdef WINDOWS_AERO
|
||||
:-moz-any(#TabsToolbar, #nav-bar[tabsontop=false], #toolbar-menubar) > #tabview-button:-moz-system-metric(windows-compositor):not(:-moz-lwtheme),
|
||||
:-moz-any(#TabsToolbar, #nav-bar[tabsontop=false], #toolbar-menubar) > toolbarpaletteitem > #tabview-button:-moz-system-metric(windows-compositor):not(:-moz-lwtheme),
|
||||
%endif
|
||||
#tabview-button:-moz-lwtheme-brighttext {
|
||||
list-style-image: url(chrome://browser/skin/tabview/tabview-inverted.png);
|
||||
}
|
||||
@ -1853,6 +1875,10 @@ richlistitem[type~="action"][actiontype="switchtab"] > .ac-url-box > .ac-action-
|
||||
background-image: linear-gradient(to top, @toolbarShadowColor@ 1px, rgba(0,0,0,.05) 1px, transparent 50%);
|
||||
}
|
||||
|
||||
#main-window[tabsintitlebar] #TabsToolbar {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
%ifndef WINDOWS_AERO
|
||||
@media (-moz-windows-default-theme) {
|
||||
#main-window[sizemode=normal] #TabsToolbar {
|
||||
@ -1862,117 +1888,62 @@ richlistitem[type~="action"][actiontype="switchtab"] > .ac-url-box > .ac-action-
|
||||
}
|
||||
%endif
|
||||
|
||||
.tabbrowser-tab,
|
||||
.tabs-newtab-button {
|
||||
-moz-appearance: none;
|
||||
background: @toolbarShadowOnTab@, @bgTabTexture@,
|
||||
linear-gradient(-moz-dialog, -moz-dialog);
|
||||
background-origin: border-box;
|
||||
background-position: 1px 2px;
|
||||
background-size: calc(100% - 2px) calc(100% - 2px);
|
||||
background-repeat: no-repeat;
|
||||
margin: 0;
|
||||
padding: 2px 0 4px;
|
||||
border-width: 4px 3px 0;
|
||||
border-style: solid;
|
||||
border-image: url(tabbrowser/tab.png) 4 3 0 fill repeat stretch;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.tabbrowser-tab:hover,
|
||||
.tabs-newtab-button:hover {
|
||||
background-image: @toolbarShadowOnTab@, @bgTabTextureHover@,
|
||||
linear-gradient(-moz-dialog, -moz-dialog);
|
||||
}
|
||||
%include ../shared/tabs.inc.css
|
||||
|
||||
%ifndef WINDOWS_AERO
|
||||
/* Use lighter colors of buttons and text in the titlebar on luna-blue */
|
||||
@media (-moz-windows-theme: luna-blue) {
|
||||
.tabbrowser-tab,
|
||||
.tabs-newtab-button {
|
||||
background-image: @toolbarShadowOnTab@,
|
||||
linear-gradient(hsla(51,34%,89%,.9), hsla(51,15%,79%,.9) 1px, hsla(51,9%,68%,.9));
|
||||
#main-window[tabsintitlebar] #main-menubar > menu {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.tabbrowser-tab:hover,
|
||||
.tabs-newtab-button:hover {
|
||||
background-image: @toolbarShadowOnTab@,
|
||||
linear-gradient(hsla(51,34%,100%,.9), hsla(51,15%,94%,.9) 1px, hsla(51,9%,83%,.9));
|
||||
#main-window[tabsintitlebar]:not([inFullscreen]) .tabbrowser-arrowscrollbox > .scrollbutton-up,
|
||||
#main-window[tabsintitlebar]:not([inFullscreen]) .tabbrowser-arrowscrollbox > .scrollbutton-down {
|
||||
list-style-image: url(chrome://browser/skin/tabbrowser/tab-arrow-left-inverted.png);
|
||||
}
|
||||
|
||||
#main-window[tabsintitlebar]:not([inFullscreen]) .tabs-newtab-button,
|
||||
#main-window[tabsintitlebar]:not([inFullscreen]) #TabsToolbar > #new-tab-button,
|
||||
#main-window[tabsintitlebar]:not([inFullscreen]) #TabsToolbar > toolbarpaletteitem > #new-tab-button {
|
||||
list-style-image: url(chrome://browser/skin/tabbrowser/newtab-inverted.png);
|
||||
}
|
||||
|
||||
#main-window[tabsintitlebar]:not([inFullscreen]) #TabsToolbar > #alltabs-button {
|
||||
list-style-image: url("chrome://browser/skin/toolbarbutton-dropdown-arrow-inverted.png");
|
||||
}
|
||||
|
||||
#main-window[tabsintitlebar]:not([inFullscreen]) #TabsToolbar > #tabview-button {
|
||||
list-style-image: url(chrome://browser/skin/tabview/tabview-inverted.png);
|
||||
}
|
||||
|
||||
#main-window[tabsintitlebar]:not([inFullscreen]) .tab-close-button:not(:hover):not([selected="true"]) {
|
||||
-moz-image-region: rect(0, 64px, 16px, 48px);
|
||||
}
|
||||
|
||||
#tabbrowser-tabs[movingtab] > .tabbrowser-tab[beforeselected]:not([last-visible-tab])::after,
|
||||
.tabbrowser-tab:not([selected]):not([afterselected-visible]):not([afterhovered]):not([first-visible-tab]):not(:hover)::before,
|
||||
#tabbrowser-tabs:not([overflow]) > .tabbrowser-tab[last-visible-tab]:not([selected]):not([beforehovered]):not(:hover)::after {
|
||||
content: url("chrome://browser/skin/tabbrowser/tab-separator-luna-blue.png");
|
||||
}
|
||||
}
|
||||
%endif
|
||||
|
||||
.tabbrowser-tab[selected="true"] {
|
||||
background-image: linear-gradient(@selectedTabHighlight@, @toolbarHighlight@ 50%),
|
||||
linear-gradient(-moz-dialog, -moz-dialog);
|
||||
#main-window[tabsintitlebar]:not([inFullscreen]) .tabbrowser-tab:not([selected]):not(:-moz-lwtheme) {
|
||||
color: CaptionText;
|
||||
}
|
||||
|
||||
#main-window[tabsontop=false]:not([disablechrome]) .tabbrowser-tab[selected=true]:not(:-moz-lwtheme) {
|
||||
background-image: @toolbarShadowOnTab@,
|
||||
linear-gradient(@selectedTabHighlight@, @toolbarHighlight@ 50%),
|
||||
linear-gradient(-moz-dialog, -moz-dialog);
|
||||
}
|
||||
|
||||
.tabbrowser-tab:-moz-lwtheme {
|
||||
/* The selected tab should keep dark text with lightweight themes */
|
||||
.tabbrowser-tab:-moz-lwtheme:not([selected=true]) {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.tabbrowser-tab[selected="true"]:-moz-lwtheme {
|
||||
background-image: linear-gradient(@selectedTabHighlight@, @toolbarHighlight@ 50%);
|
||||
}
|
||||
|
||||
.tabbrowser-tab:-moz-lwtheme-brighttext:not([selected="true"]),
|
||||
.tabs-newtab-button:-moz-lwtheme-brighttext {
|
||||
background-image: linear-gradient(hsla(0,0%,40%,.6), hsla(0,0%,30%,.6) 80%);
|
||||
}
|
||||
|
||||
.tabbrowser-tab:-moz-lwtheme-brighttext:not([selected="true"]):hover,
|
||||
.tabs-newtab-button:-moz-lwtheme-brighttext:hover {
|
||||
background-image: linear-gradient(hsla(0,0%,60%,.6), hsla(0,0%,45%,.6) 80%);
|
||||
}
|
||||
|
||||
.tabbrowser-tab:-moz-lwtheme-darktext:not([selected="true"]),
|
||||
.tabs-newtab-button:-moz-lwtheme-darktext {
|
||||
background-image: linear-gradient(hsla(0,0%,60%,.5), hsla(0,0%,45%,.5) 80%);
|
||||
}
|
||||
|
||||
.tabbrowser-tab:-moz-lwtheme-darktext:not([selected="true"]):hover,
|
||||
.tabs-newtab-button:-moz-lwtheme-darktext:hover {
|
||||
background-image: linear-gradient(hsla(0,0%,80%,.5), hsla(0,0%,60%,.5) 80%);
|
||||
}
|
||||
|
||||
.tabbrowser-tab[pinned][titlechanged]:not([selected="true"]) {
|
||||
background-image: radial-gradient(circle farthest-corner at 50% 3px, rgba(255,255,255,1) 3%, rgba(186,221,251,.75) 40%, rgba(127,179,255,.5) 80%, rgba(127,179,255,.25));
|
||||
}
|
||||
.tabbrowser-tab[pinned][titlechanged]:not([selected="true"]):hover {
|
||||
background-image: linear-gradient(hsla(0,0%,100%,.4), hsla(0,0%,75%,.4) 80%),
|
||||
radial-gradient(circle farthest-corner at 50% 3px, rgba(255,255,255,1) 3%, rgba(186,221,251,.75) 40%, rgba(127,179,255,.5) 80%, rgba(127,179,255,.25));
|
||||
}
|
||||
|
||||
.tab-throbber,
|
||||
.tab-icon-image {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
list-style-image: url("chrome://mozapps/skin/places/defaultFavicon.png");
|
||||
-moz-margin-start: 2px;
|
||||
-moz-margin-end: 3px;
|
||||
}
|
||||
|
||||
.tab-throbber {
|
||||
list-style-image: url("chrome://browser/skin/tabbrowser/connecting.png");
|
||||
}
|
||||
|
||||
.tab-throbber[progress] {
|
||||
list-style-image: url("chrome://browser/skin/tabbrowser/loading.png");
|
||||
}
|
||||
|
||||
.tab-throbber[pinned],
|
||||
.tab-icon-image[pinned] {
|
||||
-moz-margin-start: 5px;
|
||||
-moz-margin-end: 5px;
|
||||
.tabbrowser-tab[selected=true]:-moz-lwtheme {
|
||||
/* Copied from :root:-moz-lwtheme-darktext in global.css */
|
||||
text-shadow: 0 -0.5px 1.5px white;
|
||||
}
|
||||
|
||||
/* tabbrowser-tab focus ring */
|
||||
.tabbrowser-tab:focus > .tab-stack {
|
||||
.tabbrowser-tab:focus > .tab-stack > .tab-content > .tab-label {
|
||||
outline: 1px dotted;
|
||||
}
|
||||
|
||||
@ -1985,9 +1956,8 @@ richlistitem[type~="action"][actiontype="switchtab"] > .ac-url-box > .ac-action-
|
||||
/* Tab close button */
|
||||
.tab-close-button {
|
||||
-moz-appearance: none;
|
||||
-moz-image-region: rect(0, 64px, 16px, 48px);
|
||||
-moz-image-region: rect(0, 16px, 16px, 0);
|
||||
border: none;
|
||||
padding: 0px;
|
||||
list-style-image: url("chrome://global/skin/icons/close.png");
|
||||
}
|
||||
|
||||
@ -2016,10 +1986,6 @@ richlistitem[type~="action"][actiontype="switchtab"] > .ac-url-box > .ac-action-
|
||||
background-origin: border-box;
|
||||
}
|
||||
|
||||
%ifdef WINDOWS_AERO
|
||||
.tabbrowser-arrowscrollbox > .scrollbutton-up:-moz-system-metric(windows-compositor):not(:-moz-lwtheme),
|
||||
.tabbrowser-arrowscrollbox > .scrollbutton-down:-moz-system-metric(windows-compositor):not(:-moz-lwtheme),
|
||||
%endif
|
||||
.tabbrowser-arrowscrollbox > .scrollbutton-up:-moz-lwtheme-brighttext,
|
||||
.tabbrowser-arrowscrollbox > .scrollbutton-down:-moz-lwtheme-brighttext {
|
||||
list-style-image: url(chrome://browser/skin/tabbrowser/tab-arrow-left-inverted.png);
|
||||
@ -2063,20 +2029,12 @@ richlistitem[type~="action"][actiontype="switchtab"] > .ac-url-box > .ac-action-
|
||||
-moz-image-region: auto;
|
||||
}
|
||||
|
||||
%ifdef WINDOWS_AERO
|
||||
#TabsToolbar > #new-tab-button:-moz-system-metric(windows-compositor):not(:-moz-lwtheme),
|
||||
#TabsToolbar > toolbarpaletteitem > #new-tab-button:-moz-system-metric(windows-compositor):not(:-moz-lwtheme),
|
||||
%endif
|
||||
.tabs-newtab-button:-moz-lwtheme-brighttext,
|
||||
#TabsToolbar > #new-tab-button:-moz-lwtheme-brighttext,
|
||||
#TabsToolbar > toolbarpaletteitem > #new-tab-button:-moz-lwtheme-brighttext {
|
||||
list-style-image: url(chrome://browser/skin/tabbrowser/newtab-inverted.png);
|
||||
}
|
||||
|
||||
.tabs-newtab-button {
|
||||
width: 28px;
|
||||
}
|
||||
|
||||
#TabsToolbar > #new-tab-button {
|
||||
width: 26px;
|
||||
}
|
||||
@ -2085,10 +2043,6 @@ richlistitem[type~="action"][actiontype="switchtab"] > .ac-url-box > .ac-action-
|
||||
list-style-image: url("chrome://browser/skin/toolbarbutton-dropdown-arrow.png");
|
||||
}
|
||||
|
||||
%ifdef WINDOWS_AERO
|
||||
:-moz-any(#TabsToolbar, #nav-bar[tabsontop=false], #toolbar-menubar) > #alltabs-button:-moz-system-metric(windows-compositor):not(:-moz-lwtheme),
|
||||
:-moz-any(#TabsToolbar, #nav-bar[tabsontop=false], #toolbar-menubar) > toolbarpaletteitem > #alltabs-button:-moz-system-metric(windows-compositor):not(:-moz-lwtheme),
|
||||
%endif
|
||||
#alltabs-button:-moz-lwtheme-brighttext {
|
||||
list-style-image: url("chrome://browser/skin/toolbarbutton-dropdown-arrow-inverted.png");
|
||||
}
|
||||
@ -2160,10 +2114,6 @@ toolbarbutton.chevron > .toolbarbutton-icon {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
toolbar[mode="text"] toolbarbutton.chevron > .toolbarbutton-icon {
|
||||
display: -moz-box; /* display chevron icon in text mode */
|
||||
}
|
||||
|
||||
#sidebar-throbber[loading="true"] {
|
||||
list-style-image: url("chrome://global/skin/icons/loading_16.png");
|
||||
-moz-margin-end: 4px;
|
||||
@ -2924,6 +2874,12 @@ chatbox {
|
||||
border-top-right-radius: 2.5px;
|
||||
}
|
||||
|
||||
/* Customization mode */
|
||||
|
||||
%include ../shared/customizableui/customizeMode.inc.css
|
||||
|
||||
/* End customization mode */
|
||||
|
||||
.click-to-play-plugins-notification-content {
|
||||
margin: -10px;
|
||||
border-radius: 4px;
|
||||
|
After Width: | Height: | Size: 90 KiB |
33
browser/themes/windows/customizableui/panelUIOverlay.css
Normal file
@ -0,0 +1,33 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
%filter substitution
|
||||
%define menuPanelWidth 23em
|
||||
|
||||
%include ../../shared/customizableui/panelUIOverlay.inc.css
|
||||
|
||||
.PanelUI-pageControls toolbarbutton {
|
||||
list-style-image: url("chrome://browser/skin/Toolbar.png");
|
||||
}
|
||||
|
||||
#PanelUI-cut-btn {
|
||||
-moz-image-region: rect(0, 216px, 18px, 198px);
|
||||
}
|
||||
#PanelUI-copy-btn {
|
||||
-moz-image-region: rect(0, 234px, 18px, 216px);
|
||||
}
|
||||
#PanelUI-paste-btn {
|
||||
-moz-image-region: rect(0, 252px, 18px, 234px);
|
||||
}
|
||||
|
||||
#PanelUI-zoomOut-btn {
|
||||
-moz-image-region: rect(0, 288px, 18px, 270px);
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
}
|
||||
#PanelUI-zoomIn-btn {
|
||||
-moz-image-region: rect(0, 306px, 18px, 288px);
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
}
|
@ -20,10 +20,13 @@ browser.jar:
|
||||
skin/classic/browser/aboutSyncTabs.css
|
||||
#endif
|
||||
skin/classic/browser/actionicon-tab.png
|
||||
skin/classic/browser/appmenu.png
|
||||
skin/classic/browser/appmenu-icons.png
|
||||
skin/classic/browser/appmenu-dropmarker.png
|
||||
* skin/classic/browser/browser.css
|
||||
* skin/classic/browser/browser-lightweightTheme.css
|
||||
skin/classic/browser/click-to-play-warning-stripes.png
|
||||
skin/classic/browser/customizableui/customization-mode-background.jpg (customizableui/customization-mode-background.jpg)
|
||||
* skin/classic/browser/engineManager.css
|
||||
skin/classic/browser/Geolocation-16.png
|
||||
skin/classic/browser/Geolocation-64.png
|
||||
@ -72,6 +75,7 @@ browser.jar:
|
||||
skin/classic/browser/webRTC-shareDevice-16.png
|
||||
skin/classic/browser/webRTC-shareDevice-64.png
|
||||
skin/classic/browser/webRTC-sharingDevice-16.png
|
||||
* skin/classic/browser/customizableui/panelUIOverlay.css (customizableui/panelUIOverlay.css)
|
||||
skin/classic/browser/downloads/buttons.png (downloads/buttons.png)
|
||||
skin/classic/browser/downloads/download-glow.png (downloads/download-glow.png)
|
||||
skin/classic/browser/downloads/download-notification-finish.png (downloads/download-notification-finish.png)
|
||||
@ -129,10 +133,19 @@ browser.jar:
|
||||
skin/classic/browser/tabbrowser/connecting.png (tabbrowser/connecting.png)
|
||||
skin/classic/browser/tabbrowser/loading.png (tabbrowser/loading.png)
|
||||
skin/classic/browser/tabbrowser/tab.png (tabbrowser/tab.png)
|
||||
skin/classic/browser/tabbrowser/tab-active-middle.png (tabbrowser/tab-active-middle.png)
|
||||
skin/classic/browser/tabbrowser/tab-active-middle-lwtheme.png (tabbrowser/tab-active-middle-lwtheme.png)
|
||||
skin/classic/browser/tabbrowser/tab-arrow-left.png (tabbrowser/tab-arrow-left.png)
|
||||
skin/classic/browser/tabbrowser/tab-arrow-left-inverted.png (tabbrowser/tab-arrow-left-inverted.png)
|
||||
skin/classic/browser/tabbrowser/tab-background-start.png (tabbrowser/tab-background-start.png)
|
||||
skin/classic/browser/tabbrowser/tab-background-middle.png (tabbrowser/tab-background-middle.png)
|
||||
skin/classic/browser/tabbrowser/tab-background-end.png (tabbrowser/tab-background-end.png)
|
||||
skin/classic/browser/tabbrowser/tab-overflow-border.png (tabbrowser/tab-overflow-border.png)
|
||||
skin/classic/browser/tabbrowser/tab-stroke-end.png (tabbrowser/tab-stroke-end.png)
|
||||
skin/classic/browser/tabbrowser/tab-stroke-start.png (tabbrowser/tab-stroke-start.png)
|
||||
skin/classic/browser/tabbrowser/tabDragIndicator.png (tabbrowser/tabDragIndicator.png)
|
||||
skin/classic/browser/tabbrowser/tab-separator-luna-blue.png (tabbrowser/tab-separator-luna-blue.png)
|
||||
skin/classic/browser/tabbrowser/tab-separator.png (tabbrowser/tab-separator.png)
|
||||
skin/classic/browser/tabview/close.png (tabview/close.png)
|
||||
skin/classic/browser/tabview/edit-light.png (tabview/edit-light.png)
|
||||
skin/classic/browser/tabview/grain.png (tabview/grain.png)
|
||||
@ -265,10 +278,13 @@ browser.jar:
|
||||
skin/classic/aero/browser/aboutSyncTabs.css
|
||||
#endif
|
||||
skin/classic/aero/browser/actionicon-tab.png
|
||||
skin/classic/aero/browser/appmenu.png
|
||||
skin/classic/aero/browser/appmenu-dropmarker.png
|
||||
skin/classic/aero/browser/appmenu-icons.png
|
||||
* skin/classic/aero/browser/browser.css (browser-aero.css)
|
||||
* skin/classic/aero/browser/browser-lightweightTheme.css
|
||||
skin/classic/aero/browser/click-to-play-warning-stripes.png
|
||||
skin/classic/aero/browser/customizableui/customization-mode-background.jpg (customizableui/customization-mode-background.jpg)
|
||||
* skin/classic/aero/browser/engineManager.css
|
||||
skin/classic/aero/browser/Geolocation-16.png
|
||||
skin/classic/aero/browser/Geolocation-64.png
|
||||
@ -317,6 +333,7 @@ browser.jar:
|
||||
skin/classic/aero/browser/webRTC-shareDevice-16.png
|
||||
skin/classic/aero/browser/webRTC-shareDevice-64.png
|
||||
skin/classic/aero/browser/webRTC-sharingDevice-16.png
|
||||
* skin/classic/aero/browser/customizableui/panelUIOverlay.css (customizableui/panelUIOverlay.css)
|
||||
skin/classic/aero/browser/downloads/buttons.png (downloads/buttons-aero.png)
|
||||
skin/classic/aero/browser/downloads/download-glow.png (downloads/download-glow.png)
|
||||
skin/classic/aero/browser/downloads/download-notification-finish.png (downloads/download-notification-finish.png)
|
||||
@ -374,10 +391,18 @@ browser.jar:
|
||||
skin/classic/aero/browser/tabbrowser/connecting.png (tabbrowser/connecting.png)
|
||||
skin/classic/aero/browser/tabbrowser/loading.png (tabbrowser/loading.png)
|
||||
skin/classic/aero/browser/tabbrowser/tab.png (tabbrowser/tab.png)
|
||||
skin/classic/aero/browser/tabbrowser/tab-active-middle.png (tabbrowser/tab-active-middle.png)
|
||||
skin/classic/aero/browser/tabbrowser/tab-active-middle-lwtheme.png (tabbrowser/tab-active-middle-lwtheme.png)
|
||||
skin/classic/aero/browser/tabbrowser/tab-arrow-left.png (tabbrowser/tab-arrow-left.png)
|
||||
skin/classic/aero/browser/tabbrowser/tab-arrow-left-inverted.png (tabbrowser/tab-arrow-left-inverted.png)
|
||||
skin/classic/aero/browser/tabbrowser/tab-background-start.png (tabbrowser/tab-background-start.png)
|
||||
skin/classic/aero/browser/tabbrowser/tab-background-middle.png (tabbrowser/tab-background-middle.png)
|
||||
skin/classic/aero/browser/tabbrowser/tab-background-end.png (tabbrowser/tab-background-end.png)
|
||||
skin/classic/aero/browser/tabbrowser/tab-overflow-border.png (tabbrowser/tab-overflow-border.png)
|
||||
skin/classic/aero/browser/tabbrowser/tab-stroke-end.png (tabbrowser/tab-stroke-end.png)
|
||||
skin/classic/aero/browser/tabbrowser/tab-stroke-start.png (tabbrowser/tab-stroke-start.png)
|
||||
skin/classic/aero/browser/tabbrowser/tabDragIndicator.png (tabbrowser/tabDragIndicator.png)
|
||||
skin/classic/aero/browser/tabbrowser/tab-separator.png (tabbrowser/tab-separator-aero.png)
|
||||
skin/classic/aero/browser/tabview/close.png (tabview/close.png)
|
||||
skin/classic/aero/browser/tabview/edit-light.png (tabview/edit-light.png)
|
||||
skin/classic/aero/browser/tabview/grain.png (tabview/grain.png)
|
||||
|
BIN
browser/themes/windows/tabbrowser/tab-active-middle-lwtheme.png
Normal file
After Width: | Height: | Size: 226 B |
BIN
browser/themes/windows/tabbrowser/tab-active-middle.png
Normal file
After Width: | Height: | Size: 438 B |
BIN
browser/themes/windows/tabbrowser/tab-background-end.png
Normal file
After Width: | Height: | Size: 837 B |
BIN
browser/themes/windows/tabbrowser/tab-background-middle.png
Normal file
After Width: | Height: | Size: 157 B |
BIN
browser/themes/windows/tabbrowser/tab-background-start.png
Normal file
After Width: | Height: | Size: 811 B |
BIN
browser/themes/windows/tabbrowser/tab-separator-aero.png
Normal file
After Width: | Height: | Size: 166 B |
BIN
browser/themes/windows/tabbrowser/tab-separator-luna-blue.png
Normal file
After Width: | Height: | Size: 172 B |
BIN
browser/themes/windows/tabbrowser/tab-separator.png
Normal file
After Width: | Height: | Size: 168 B |
BIN
browser/themes/windows/tabbrowser/tab-stroke-end.png
Normal file
After Width: | Height: | Size: 439 B |
BIN
browser/themes/windows/tabbrowser/tab-stroke-start.png
Normal file
After Width: | Height: | Size: 433 B |
8
browser/themes/windows/windowsShared.inc
Normal file
@ -0,0 +1,8 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
%filter substitution
|
||||
|
||||
%define toolbarHighlight rgba(253,253,253,0.45)
|
||||
%define fgTabTexture linear-gradient(transparent, transparent 2px, rgba(254,254,254,0.72) 2px, rgba(254,254,254,0.72) 2px, rgba(250,250,250,0.88) 3px, rgba(250,250,250,0.88) 3px, rgba(254,254,254,0.72) 4px, rgba(254,254,254,0.72) 4px, @toolbarHighlight@)
|
@ -246,8 +246,9 @@
|
||||
#define NS_THEME_WIN_MEDIA_TOOLBOX 222
|
||||
#define NS_THEME_WIN_BROWSER_TAB_BAR_TOOLBOX 223
|
||||
|
||||
// Unified toolbar on the Mac
|
||||
// Unified toolbar and titlebar elements on the Mac
|
||||
#define NS_THEME_MOZ_MAC_UNIFIED_TOOLBAR 224
|
||||
#define NS_THEME_MOZ_MAC_FULLSCREEN_BUTTON 226
|
||||
|
||||
// Vista glass
|
||||
#define NS_THEME_WIN_BORDERLESS_GLASS 229
|
||||
|
@ -107,6 +107,7 @@ CSS_KEY(-moz-mac-alternateprimaryhighlight, _moz_mac_alternateprimaryhighlight)
|
||||
CSS_KEY(-moz-mac-chrome-active, _moz_mac_chrome_active)
|
||||
CSS_KEY(-moz-mac-chrome-inactive, _moz_mac_chrome_inactive)
|
||||
CSS_KEY(-moz-mac-focusring, _moz_mac_focusring)
|
||||
CSS_KEY(-moz-mac-fullscreen-button, _moz_mac_fullscreen_button)
|
||||
CSS_KEY(-moz-mac-menuselect, _moz_mac_menuselect)
|
||||
CSS_KEY(-moz-mac-menushadow, _moz_mac_menushadow)
|
||||
CSS_KEY(-moz-mac-menutextdisable, _moz_mac_menutextdisable)
|
||||
|
@ -596,6 +596,7 @@ const int32_t nsCSSProps::kAppearanceKTable[] = {
|
||||
eCSSKeyword__moz_win_glass, NS_THEME_WIN_GLASS,
|
||||
eCSSKeyword__moz_win_borderless_glass, NS_THEME_WIN_BORDERLESS_GLASS,
|
||||
eCSSKeyword__moz_mac_unified_toolbar, NS_THEME_MOZ_MAC_UNIFIED_TOOLBAR,
|
||||
eCSSKeyword__moz_mac_fullscreen_button, NS_THEME_MOZ_MAC_FULLSCREEN_BUTTON,
|
||||
eCSSKeyword__moz_window_titlebar, NS_THEME_WINDOW_TITLEBAR,
|
||||
eCSSKeyword__moz_window_titlebar_maximized, NS_THEME_WINDOW_TITLEBAR_MAXIMIZED,
|
||||
eCSSKeyword__moz_window_frame_left, NS_THEME_WINDOW_FRAME_LEFT,
|
||||
|
@ -41,6 +41,9 @@ LightweightThemeConsumer.prototype = {
|
||||
_lastData: null,
|
||||
_lastScreenWidth: null,
|
||||
_lastScreenHeight: null,
|
||||
#ifdef XP_MACOSX
|
||||
_chromemarginDefault: undefined,
|
||||
#endif
|
||||
|
||||
observe: function (aSubject, aTopic, aData) {
|
||||
if (aTopic != "lightweight-theme-styling-update")
|
||||
@ -108,10 +111,21 @@ LightweightThemeConsumer.prototype = {
|
||||
}
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
if (active)
|
||||
root.setAttribute("drawintitlebar", "true");
|
||||
else
|
||||
root.removeAttribute("drawintitlebar");
|
||||
// Sample whether or not we draw in the titlebar by default the first time we update.
|
||||
// If the root has no chromemargin attribute, getAttribute will return null, and
|
||||
// we'll remove the attribute when the lw-theme is deactivated.
|
||||
if (this._chromemarginDefault === undefined)
|
||||
this._chromemarginDefault = root.getAttribute("chromemargin");
|
||||
|
||||
if (active) {
|
||||
root.setAttribute("chromemargin", "0,-1,-1,-1");
|
||||
}
|
||||
else {
|
||||
if (this._chromemarginDefault)
|
||||
root.setAttribute("chromemargin", this._chromemarginDefault);
|
||||
else
|
||||
root.removeAttribute("chromemargin");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -272,20 +272,15 @@ toolbar[customizing="true"][hidden="true"] {
|
||||
|
||||
%ifdef XP_MACOSX
|
||||
toolbar[type="menubar"] {
|
||||
min-height: 0 !important;
|
||||
border: 0 !important;
|
||||
visibility: collapse;
|
||||
}
|
||||
%else
|
||||
toolbar[type="menubar"][autohide="true"] {
|
||||
-moz-binding: url("chrome://global/content/bindings/toolbar.xml#toolbar-menubar-autohide");
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
toolbar[type="menubar"][autohide="true"][inactive="true"]:not([customizing="true"]) {
|
||||
min-height: 0 !important;
|
||||
height: 0 !important;
|
||||
-moz-appearance: none !important;
|
||||
border-style: none !important;
|
||||
visibility: collapse;
|
||||
}
|
||||
%endif
|
||||
|
||||
|
@ -9,7 +9,6 @@
|
||||
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
|
||||
@namespace html url("http://www.w3.org/1999/xhtml");
|
||||
|
||||
|
||||
/* Page background */
|
||||
*|*:root {
|
||||
-moz-appearance: none;
|
||||
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.1 KiB |
@ -17,7 +17,7 @@
|
||||
color: -moz-dialogText;
|
||||
background-color: -moz-dialog;
|
||||
background-image: /* Fade-out texture at the top, and blend with browser tab */
|
||||
linear-gradient(rgba(255,255,255,0.5), rgba(255,255,255,0) 30%),
|
||||
linear-gradient(rgba(255,255,255,0.45), rgba(255,255,255,0) 30%),
|
||||
/* Texture */
|
||||
url("chrome://global/skin/inContentUI/background-texture.png");
|
||||
}
|
||||
|
@ -551,6 +551,9 @@ public:
|
||||
}
|
||||
|
||||
// unit conversion convenience functions
|
||||
int32_t CocoaPointsToDevPixels(CGFloat aPts) {
|
||||
return nsCocoaUtils::CocoaPointsToDevPixels(aPts, BackingScaleFactor());
|
||||
}
|
||||
nsIntPoint CocoaPointsToDevPixels(const NSPoint& aPt) {
|
||||
return nsCocoaUtils::CocoaPointsToDevPixels(aPt, BackingScaleFactor());
|
||||
}
|
||||
|