Bug 1041685 - show hidpi icons in the mac global webrtc sharing indicator, r=dolske.

--HG--
extra : rebase_source : 6557cce5fdc7ea6412df536a3f06a71743115ebb
This commit is contained in:
Florian Quèze 2014-08-01 15:17:51 +02:00
parent d72e0b5e2c
commit 33e9c5798c
13 changed files with 49 additions and 5 deletions

View File

@ -7,6 +7,7 @@
#ifdef XP_MACOSX
<?xul-overlay href="chrome://browser/content/macBrowserOverlay.xul"?>
<?xml-stylesheet href="chrome://browser/skin/webRTC-indicator.css" type="text/css"?>
<window id="main-window"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"

View File

@ -513,8 +513,11 @@ function getGlobalIndicator() {
let field = "_" + aName.toLowerCase();
if (aState && !this[field]) {
let menu = this._hiddenDoc.createElement("menu");
let uri = "chrome://browser/skin/webRTC-" + aName.toLowerCase() + "-black-16.png";
menu.setAttribute("image", uri);
menu.setAttribute("id", "webRTC-sharing" + aName + "-menu");
// The CSS will only be applied if the menu is actually inserted in the DOM.
this._hiddenDoc.documentElement.appendChild(menu);
this._statusBar.addItem(menu);
let menupopup = this._hiddenDoc.createElement("menupopup");
@ -528,6 +531,7 @@ function getGlobalIndicator() {
}
else if (this[field] && !aState) {
this._statusBar.removeItem(this[field]);
this[field].remove();
this[field] = null
}
},

View File

@ -131,9 +131,13 @@ browser.jar:
skin/classic/browser/webRTC-shareScreen-64@2x.png (../shared/webrtc/webRTC-shareScreen-64@2x.png)
skin/classic/browser/webRTC-sharingScreen-16.png (../shared/webrtc/webRTC-sharingScreen-16.png)
skin/classic/browser/webRTC-sharingScreen-16@2x.png (../shared/webrtc/webRTC-sharingScreen-16@2x.png)
skin/classic/browser/webRTC-camera-black-16.png
skin/classic/browser/webRTC-microphone-black-16.png
skin/classic/browser/webRTC-screen-black-16.png
skin/classic/browser/webRTC-sharingDevice-menubar.png
skin/classic/browser/webRTC-sharingDevice-menubar@2x.png
skin/classic/browser/webRTC-sharingMicrophone-menubar.png
skin/classic/browser/webRTC-sharingMicrophone-menubar@2x.png
skin/classic/browser/webRTC-sharingScreen-menubar.png
skin/classic/browser/webRTC-sharingScreen-menubar@2x.png
skin/classic/browser/webRTC-indicator.css
skin/classic/browser/loop/toolbar.png (loop/toolbar.png)
skin/classic/browser/loop/toolbar@2x.png (loop/toolbar@2x.png)
skin/classic/browser/loop/toolbar-inverted.png (loop/toolbar-inverted.png)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

View File

@ -0,0 +1,35 @@
/* 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/. */
#webRTC-sharingCamera-menu {
list-style-image: url("chrome://browser/skin/webRTC-sharingDevice-menubar.png");
}
#webRTC-sharingMicrophone-menu {
list-style-image: url("chrome://browser/skin/webRTC-sharingMicrophone-menubar.png");
}
#webRTC-sharingScreen-menu {
list-style-image: url("chrome://browser/skin/webRTC-sharingScreen-menubar.png");
}
@media (min-resolution: 2dppx) {
#webRTC-sharingCamera-menu {
list-style-image: url("chrome://browser/skin/webRTC-sharingDevice-menubar@2x.png");
}
#webRTC-sharingMicrophone-menu {
list-style-image: url("chrome://browser/skin/webRTC-sharingMicrophone-menubar@2x.png");
}
#webRTC-sharingScreen-menu {
list-style-image: url("chrome://browser/skin/webRTC-sharingScreen-menubar@2x.png");
}
}
#webRTC-sharingCamera-menu > menupopup,
#webRTC-sharingMicrophone-menu > menupopup,
#webRTC-sharingScreen-menu > menupopup {
list-style-image: none; /* don't inherit into menu items */
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB