Bug 931463 - Shader editor programs checkboxes misaligned on Linux, r=past
authorVictor Porof <vporof@mozilla.com>
Sun, 27 Oct 2013 20:44:02 +0200
changeset 152409 fc10d6b12014da45dee6a118e00cc5f7dc80b43c
parent 152408 7d8d70f3a7c239548b8dbc2d5ba920e5586b0f07
child 152410 5e49bfec9ecb1adc1e513837b2c9c884a4eae4dc
child 152413 e2909a86db2d1f9c75ccb77aa69ba3f715e7aa54
push id25537
push userphilringnalda@gmail.com
push dateMon, 28 Oct 2013 02:22:50 +0000
treeherdermozilla-central@5e49bfec9ecb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspast
bugs931463
milestone27.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 931463 - Shader editor programs checkboxes misaligned on Linux, r=past
browser/devtools/shared/widgets/SideMenuWidget.jsm
browser/themes/linux/devtools/shadereditor.css
browser/themes/linux/devtools/widgets.css
browser/themes/osx/devtools/widgets.css
browser/themes/shared/devtools/shadereditor.inc.css
browser/themes/windows/devtools/widgets.css
--- a/browser/devtools/shared/widgets/SideMenuWidget.jsm
+++ b/browser/devtools/shared/widgets/SideMenuWidget.jsm
@@ -482,17 +482,16 @@ function SideMenuGroup(aWidget, aName, a
     name.setAttribute("value", aName);
     name.setAttribute("crop", "end");
     name.setAttribute("flex", "1");
 
     // Show a checkbox before the content.
     if (aOptions.showCheckbox) {
       let checkbox = this._checkbox = makeCheckbox(title, { description: aName });
       checkbox.className = "side-menu-widget-group-checkbox";
-      checkbox.setAttribute("align", "start");
     }
 
     title.appendChild(name);
     target.appendChild(title);
     target.appendChild(list);
   }
   // Skip a few redundant nodes when no title is shown.
   else {
@@ -587,17 +586,16 @@ function SideMenuItem(aGroup, aContents,
 
     let target = this._target = this.document.createElement("vbox");
     target.className = "side-menu-widget-item-contents";
 
     // Show a checkbox before the content.
     if (aOptions.showCheckbox) {
       let checkbox = this._checkbox = makeCheckbox(container, aAttachment);
       checkbox.className = "side-menu-widget-item-checkbox";
-      checkbox.setAttribute("align", "start");
     }
 
     container.appendChild(target);
 
     // Show a horizontal arrow towards the content.
     if (aOptions.showArrow) {
       let arrow = this._arrow = this.document.createElement("hbox");
       arrow.className = "side-menu-widget-item-arrow";
--- a/browser/themes/linux/devtools/shadereditor.css
+++ b/browser/themes/linux/devtools/shadereditor.css
@@ -1,5 +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/. */
 
 %include ../../shared/devtools/shadereditor.inc.css
+
+.side-menu-widget-item-checkbox > .checkbox-spacer-box {
+  -moz-appearance: none;
+}
--- a/browser/themes/linux/devtools/widgets.css
+++ b/browser/themes/linux/devtools/widgets.css
@@ -312,21 +312,16 @@
               0 -2px 0 hsla(206,37%,4%,.05) inset,
               0 -1px 1px hsla(206,37%,4%,.1) inset;
 }
 
 .side-menu-widget-group-title[theme="light"] {
   background-image: linear-gradient(#fff, #eee);
 }
 
-.side-menu-widget-group-checkbox {
-  margin: 0;
-  padding: 0;
-}
-
 /* SideMenuWidget items */
 
 .side-menu-widget-item[theme="dark"] {
   border-top: 1px solid hsla(210,8%,5%,.25);
   border-bottom: 1px solid hsla(210,16%,76%,.1);
   margin-top: -1px;
   margin-bottom: -1px;
 }
@@ -374,21 +369,16 @@
   padding: 4px 0px;
 }
 
 .side-menu-widget-item-arrow {
   -moz-margin-start: -8px;
   width: 8px;
 }
 
-.side-menu-widget-item-checkbox {
-  -moz-margin-start: 4px;
-  -moz-margin-end: -6px;
-}
-
 .side-menu-widget-item-other {
   background: url(background-noise-toolbar.png), hsla(208,11%,27%, 0.65);
 }
 
 .side-menu-widget-item-other.selected {
   background: url(background-noise-toolbar.png), hsla(208,11%,27%, 0.15);
   box-shadow: inset 0 1px 0 hsla(210,40%,83%,.07),
               inset 0 -1px 0 hsla(210,40%,83%,.07);
@@ -398,16 +388,35 @@
   border-top-left-radius: 4px;
 }
 
 .side-menu-widget-item-other > label {
   color: #f5f7fa;
   text-shadow: 0 1px 1px #111;
 }
 
+/* SideMenuWidget checkboxes */
+
+.side-menu-widget-group-checkbox {
+  margin: 0;
+  -moz-margin-end: 4px;
+}
+
+.side-menu-widget-item-checkbox {
+  margin: 0;
+  -moz-margin-start: 4px;
+  -moz-margin-end: -4px;
+}
+
+.side-menu-widget-group-checkbox .checkbox-spacer-box,
+.side-menu-widget-item-checkbox .checkbox-spacer-box {
+  margin: 0;
+  border: none;
+}
+
 /* SideMenuWidget misc */
 
 .side-menu-widget-empty-notice-container {
   padding: 12px;
 }
 
 .side-menu-widget-empty-notice-container[theme="dark"] {
   background: url(background-noise-toolbar.png), hsl(208,11%,27%);
--- a/browser/themes/osx/devtools/widgets.css
+++ b/browser/themes/osx/devtools/widgets.css
@@ -312,21 +312,16 @@
               0 -2px 0 hsla(206,37%,4%,.05) inset,
               0 -1px 1px hsla(206,37%,4%,.1) inset;
 }
 
 .side-menu-widget-group-title[theme="light"] {
   background-image: linear-gradient(#fff, #eee);
 }
 
-.side-menu-widget-group-checkbox {
-  margin: 0;
-  padding: 0;
-}
-
 /* SideMenuWidget items */
 
 .side-menu-widget-item[theme="dark"] {
   border-top: 1px solid hsla(210,8%,5%,.25);
   border-bottom: 1px solid hsla(210,16%,76%,.1);
   margin-top: -1px;
   margin-bottom: -1px;
 }
@@ -374,21 +369,16 @@
   padding: 4px 0px;
 }
 
 .side-menu-widget-item-arrow {
   -moz-margin-start: -8px;
   width: 8px;
 }
 
-.side-menu-widget-item-checkbox {
-  -moz-margin-start: 4px;
-  -moz-margin-end: -6px;
-}
-
 .side-menu-widget-item-other {
   background: url(background-noise-toolbar.png), hsla(208,11%,27%, 0.65);
 }
 
 .side-menu-widget-item-other.selected {
   background: url(background-noise-toolbar.png), hsla(208,11%,27%, 0.15);
   box-shadow: inset 0 1px 0 hsla(210,40%,83%,.07),
               inset 0 -1px 0 hsla(210,40%,83%,.07);
@@ -398,16 +388,29 @@
   border-top-left-radius: 4px;
 }
 
 .side-menu-widget-item-other > label {
   color: #f5f7fa;
   text-shadow: 0 1px 1px #111;
 }
 
+/* SideMenuWidget checkboxes */
+
+.side-menu-widget-group-checkbox {
+  margin: 0;
+  -moz-margin-end: 4px;
+}
+
+.side-menu-widget-item-checkbox {
+  margin: 0;
+  -moz-margin-start: 4px;
+  -moz-margin-end: -4px;
+}
+
 /* SideMenuWidget misc */
 
 .side-menu-widget-empty-notice-container {
   padding: 12px;
 }
 
 .side-menu-widget-empty-notice-container[theme="dark"] {
   background: url(background-noise-toolbar.png), hsl(208,11%,27%);
--- a/browser/themes/shared/devtools/shadereditor.inc.css
+++ b/browser/themes/shared/devtools/shadereditor.inc.css
@@ -46,45 +46,43 @@
 }
 
 #shaders-pane + .devtools-side-splitter {
   -moz-border-start-color: transparent;
 }
 
 .side-menu-widget-item-checkbox {
   -moz-appearance: none;
-  -moz-margin-end: -6px;
-  padding: 0;
   opacity: 0;
   transition: opacity .15s ease-out 0s;
 }
 
 /* Only show the checkbox when the source is hovered over, is selected, or if it
  * is not checked. */
 .side-menu-widget-item:hover > .side-menu-widget-item-checkbox,
 .side-menu-widget-item.selected > .side-menu-widget-item-checkbox,
 .side-menu-widget-item-checkbox:not([checked]) {
   opacity: 1;
   transition: opacity .15s ease-out 0s;
 }
 
-.side-menu-widget-item-checkbox > .checkbox-check {
+.side-menu-widget-item-checkbox .checkbox-check {
   -moz-appearance: none;
   background: none;
-  background-image: url("chrome://browser/skin/devtools/itemToggle.png");
+  background-image: url(itemToggle.png);
   background-repeat: no-repeat;
   background-clip: content-box;
   background-size: 32px 16px;
   background-position: -16px 0;
   width: 16px;
   height: 16px;
   border: 0;
 }
 
-.side-menu-widget-item-checkbox[checked] > .checkbox-check {
+.side-menu-widget-item-checkbox[checked] .checkbox-check {
   background-position: 0 0;
 }
 
 .side-menu-widget-item-checkbox:not([checked]) ~ .side-menu-widget-item-contents {
   color: #888;
 }
 
 /* Shader source editors */
--- a/browser/themes/windows/devtools/widgets.css
+++ b/browser/themes/windows/devtools/widgets.css
@@ -316,21 +316,16 @@
               0 -2px 0 hsla(206,37%,4%,.05) inset,
               0 -1px 1px hsla(206,37%,4%,.1) inset;
 }
 
 .side-menu-widget-group-title[theme="light"] {
   background-image: linear-gradient(#fff, #eee);
 }
 
-.side-menu-widget-group-checkbox {
-  margin: 0;
-  padding: 0;
-}
-
 /* SideMenuWidget items */
 
 .side-menu-widget-item[theme="dark"] {
   border-top: 1px solid hsla(210,8%,5%,.25);
   border-bottom: 1px solid hsla(210,16%,76%,.1);
   margin-top: -1px;
   margin-bottom: -1px;
 }
@@ -378,21 +373,16 @@
   padding: 4px 0px;
 }
 
 .side-menu-widget-item-arrow {
   -moz-margin-start: -8px;
   width: 8px;
 }
 
-.side-menu-widget-item-checkbox {
-  -moz-margin-start: 4px;
-  -moz-margin-end: -6px;
-}
-
 .side-menu-widget-item-other {
   background: url(background-noise-toolbar.png), hsla(208,11%,27%, 0.65);
 }
 
 .side-menu-widget-item-other.selected {
   background: url(background-noise-toolbar.png), hsla(208,11%,27%, 0.15);
   box-shadow: inset 0 1px 0 hsla(210,40%,83%,.07),
               inset 0 -1px 0 hsla(210,40%,83%,.07);
@@ -401,16 +391,29 @@
 .side-menu-widget-item-other:first-of-type {
   border-top-left-radius: 4px;
 }
 
 .side-menu-widget-item-other > label {
   color: #f5f7fa;
 }
 
+/* SideMenuWidget checkboxes */
+
+.side-menu-widget-group-checkbox {
+  margin: 0;
+  -moz-margin-end: 4px;
+}
+
+.side-menu-widget-item-checkbox {
+  margin: 0;
+  -moz-margin-start: 4px;
+  -moz-margin-end: -4px;
+}
+
 /* SideMenuWidget misc */
 
 .side-menu-widget-empty-notice-container {
   padding: 12px;
 }
 
 .side-menu-widget-empty-notice-container[theme="dark"] {
   background: url(background-noise-toolbar.png), hsl(208,11%,27%);