Bug 947836 - Non-toolbox devtools toolbars are grey;r=paul

This commit is contained in:
Brian Grinstead 2013-12-09 16:21:26 -06:00
Родитель e73aeda7d3
Коммит fa25d4d3d6
4 изменённых файлов: 133 добавлений и 16 удалений

Просмотреть файл

@ -1096,7 +1096,6 @@
<vbox id="browser-bottombox" layer="true">
<notificationbox id="global-notificationbox"/>
<toolbar id="developer-toolbar"
class="devtools-toolbar"
hidden="true">
#ifdef XP_MACOSX
<toolbarbutton id="developer-toolbar-closebutton"

Просмотреть файл

@ -356,11 +356,11 @@ ResponsiveUI.prototype = {
* Build the toolbar and the resizers.
*
* <vbox class="browserContainer"> From tabbrowser.xml
* <toolbar class="devtools-toolbar devtools-responsiveui-toolbar">
* <menulist class="devtools-menulist"/> // presets
* <toolbarbutton tabindex="0" class="devtools-toolbarbutton" tooltiptext="rotate"/> // rotate
* <toolbarbutton tabindex="0" class="devtools-toolbarbutton" tooltiptext="screenshot"/> // screenshot
* <toolbarbutton tabindex="0" class="devtools-toolbarbutton" tooltiptext="Leave Responsive Design View"/> // close
* <toolbar class="devtools-responsiveui-toolbar">
* <menulist class="devtools-responsiveui-menulist"/> // presets
* <toolbarbutton tabindex="0" class="devtools-responsiveui-toolbarbutton" tooltiptext="rotate"/> // rotate
* <toolbarbutton tabindex="0" class="devtools-responsiveui-toolbarbutton" tooltiptext="screenshot"/> // screenshot
* <toolbarbutton tabindex="0" class="devtools-responsiveui-toolbarbutton" tooltiptext="Leave Responsive Design View"/> // close
* </toolbar>
* <stack class="browserStack"> From tabbrowser.xml
* <browser/>
@ -373,10 +373,10 @@ ResponsiveUI.prototype = {
buildUI: function RUI_buildUI() {
// Toolbar
this.toolbar = this.chromeDoc.createElement("toolbar");
this.toolbar.className = "devtools-toolbar devtools-responsiveui-toolbar";
this.toolbar.className = "devtools-responsiveui-toolbar";
this.menulist = this.chromeDoc.createElement("menulist");
this.menulist.className = "devtools-menulist";
this.menulist.className = "devtools-responsiveui-menulist";
this.menulist.addEventListener("select", this.bound_presetSelected, true);
@ -401,24 +401,24 @@ ResponsiveUI.prototype = {
this.rotatebutton = this.chromeDoc.createElement("toolbarbutton");
this.rotatebutton.setAttribute("tabindex", "0");
this.rotatebutton.setAttribute("tooltiptext", this.strings.GetStringFromName("responsiveUI.rotate2"));
this.rotatebutton.className = "devtools-toolbarbutton devtools-responsiveui-rotate";
this.rotatebutton.className = "devtools-responsiveui-toolbarbutton devtools-responsiveui-rotate";
this.rotatebutton.addEventListener("command", this.bound_rotate, true);
this.screenshotbutton = this.chromeDoc.createElement("toolbarbutton");
this.screenshotbutton.setAttribute("tabindex", "0");
this.screenshotbutton.setAttribute("tooltiptext", this.strings.GetStringFromName("responsiveUI.screenshot"));
this.screenshotbutton.className = "devtools-toolbarbutton devtools-responsiveui-screenshot";
this.screenshotbutton.className = "devtools-responsiveui-toolbarbutton devtools-responsiveui-screenshot";
this.screenshotbutton.addEventListener("command", this.bound_screenshot, true);
this.touchbutton = this.chromeDoc.createElement("toolbarbutton");
this.touchbutton.setAttribute("tabindex", "0");
this.touchbutton.setAttribute("tooltiptext", this.strings.GetStringFromName("responsiveUI.touch"));
this.touchbutton.className = "devtools-toolbarbutton devtools-responsiveui-touch";
this.touchbutton.className = "devtools-responsiveui-toolbarbutton devtools-responsiveui-touch";
this.touchbutton.addEventListener("command", this.bound_touch, true);
this.closebutton = this.chromeDoc.createElement("toolbarbutton");
this.closebutton.setAttribute("tabindex", "0");
this.closebutton.className = "devtools-toolbarbutton devtools-responsiveui-close";
this.closebutton.className = "devtools-responsiveui-toolbarbutton devtools-responsiveui-close";
this.closebutton.setAttribute("tooltiptext", this.strings.GetStringFromName("responsiveUI.close"));
this.closebutton.addEventListener("command", this.bound_close, true);

Просмотреть файл

@ -7,6 +7,7 @@
/* Developer toolbar */
#developer-toolbar {
-moz-appearance: none;
padding: 0;
min-height: 32px;
background-image: url(devtools/background-noise-toolbar.png), linear-gradient(#303840, #2d3640);
@ -14,7 +15,7 @@
box-shadow: 0 1px 0 hsla(204,45%,98%,.05) inset, 0 -1px 0 hsla(206,37%,4%,.1) inset;
}
.developer-toolbar-button {
#developer-toolbar > toolbarbutton {
-moz-appearance: none;
border: none;
background: transparent;
@ -48,6 +49,34 @@
-moz-image-region: rect(0px, 64px, 16px, 48px);
}
#developer-toolbar-closebutton {
list-style-image: url("chrome://browser/skin/devtools/close.png");
-moz-appearance: none;
border: none;
margin: 0 4px;
min-width: 16px;
width: 16px;
opacity: 0.6;
}
#developer-toolbar-closebutton > .toolbarbutton-icon {
/* XXX Buttons have padding in widget/ that we don't want here but can't override with good CSS, so we must
use evil CSS to give the impression of smaller content */
margin: -4px;
}
#developer-toolbar-closebutton > .toolbarbutton-text {
display: none;
}
#developer-toolbar-closebutton:hover {
opacity: 0.8;
}
#developer-toolbar-closebutton:hover:active {
opacity: 1;
}
/* GCLI */
html|*#gcli-tooltip-frame,

Просмотреть файл

@ -16,6 +16,7 @@
}
.devtools-responsiveui-toolbar {
-moz-appearance: none;
background: transparent;
/* text color is textColor from dark theme, since no theme is applied to
* the responsive toolbar.
@ -27,10 +28,98 @@
border-bottom-width: 0;
}
.devtools-responsiveui-toolbar > menulist,
.devtools-responsiveui-toolbar > toolbarbutton {
min-width: 22px;
.devtools-responsiveui-menulist,
.devtools-responsiveui-toolbarbutton {
-moz-appearance: none;
-moz-box-align: center;
min-width: 32px;
min-height: 22px;
text-shadow: 0 -1px 0 hsla(210,8%,5%,.45);
border: 1px solid hsla(210,8%,5%,.45);
border-radius: 0;
background: linear-gradient(hsla(212,7%,57%,.35), hsla(212,7%,57%,.1)) padding-box;
box-shadow: 0 1px 0 hsla(210,16%,76%,.15) inset, 0 0 0 1px hsla(210,16%,76%,.15) inset, 0 1px 0 hsla(210,16%,76%,.15);
margin: 0 3px;
color: inherit;
}
.devtools-responsiveui-toolbarbutton > .toolbarbutton-menubutton-button {
-moz-box-orient: horizontal;
}
.devtools-responsiveui-menulist:-moz-focusring,
.devtools-responsiveui-toolbarbutton:-moz-focusring {
outline: 1px dotted hsla(210,30%,85%,0.7);
outline-offset: -4px;
}
.devtools-responsiveui-toolbarbutton:not([label]) > .toolbarbutton-text {
display: none;
}
.devtools-responsiveui-toolbarbutton:not([checked=true]):hover:active {
border-color: hsla(210,8%,5%,.6);
background: linear-gradient(hsla(220,6%,10%,.3), hsla(212,7%,57%,.15) 65%, hsla(212,7%,57%,.3));
box-shadow: 0 0 3px hsla(210,8%,5%,.25) inset, 0 1px 3px hsla(210,8%,5%,.25) inset, 0 1px 0 hsla(210,16%,76%,.15);
}
.devtools-responsiveui-menulist[open=true],
.devtools-responsiveui-toolbarbutton[open=true],
.devtools-responsiveui-toolbarbutton[checked=true] {
border-color: hsla(210,8%,5%,.6) !important;
background: linear-gradient(hsla(220,6%,10%,.6), hsla(210,11%,18%,.45) 75%, hsla(210,11%,30%,.4));
box-shadow: 0 1px 3px hsla(210,8%,5%,.25) inset, 0 1px 3px hsla(210,8%,5%,.25) inset, 0 1px 0 hsla(210,16%,76%,.15);
}
.devtools-responsiveui-toolbarbutton[checked=true] {
color: hsl(208,100%,60%);
}
.devtools-responsiveui-toolbarbutton[checked=true]:hover {
background-color: transparent !important;
}
.devtools-responsiveui-toolbarbutton[checked=true]:hover:active {
background-color: hsla(210,8%,5%,.2) !important;
}
.devtools-responsiveui-menulist > .menulist-label-box {
text-align: center;
}
.devtools-responsiveui-menulist > .menulist-dropmarker {
-moz-appearance: none;
display: -moz-box;
background-color: transparent;
list-style-image: url("chrome://browser/skin/devtools/dropmarker.png");
-moz-box-align: center;
border-width: 0;
min-width: 16px;
}
.devtools-responsiveui-toolbarbutton[type=menu-button] > .toolbarbutton-menubutton-button {
-moz-appearance: none;
color: inherit;
border-width: 0;
-moz-border-end: 1px solid hsla(210,8%,5%,.45);
box-shadow: -1px 0 0 hsla(210,16%,76%,.15) inset, 1px 0 0 hsla(210,16%,76%,.15);
}
.devtools-responsiveui-toolbarbutton[type=menu-button]:-moz-locale-dir(rtl) > .toolbarbutton-menubutton-button {
box-shadow: 1px 0 0 hsla(210,16%,76%,.15) inset, -1px 0 0 hsla(210,16%,76%,.15);
}
.devtools-responsiveui-toolbarbutton[type=menu-button] {
padding: 0 1px;
-moz-box-align: stretch;
}
.devtools-responsiveui-toolbarbutton[type=menu] > .toolbarbutton-menu-dropmarker,
.devtools-responsiveui-toolbarbutton[type=menu-button] > .toolbarbutton-menubutton-dropmarker {
-moz-appearance: none !important;
list-style-image: url("chrome://browser/skin/devtools/dropmarker.png");
-moz-box-align: center;
padding: 0 3px;
}
.devtools-responsiveui-toolbar:-moz-locale-dir(ltr) > *:first-child,