From 82d5d0bafd6dfd50852759e3daf79da13bbf994a Mon Sep 17 00:00:00 2001 From: Victor Porof Date: Sun, 27 Oct 2013 20:44:02 +0200 Subject: [PATCH] Bug 931463 - Shader editor programs checkboxes misaligned on Linux, r=past --- .../shared/widgets/SideMenuWidget.jsm | 2 -- .../themes/linux/devtools/shadereditor.css | 4 +++ browser/themes/linux/devtools/widgets.css | 29 ++++++++++++------- browser/themes/osx/devtools/widgets.css | 23 ++++++++------- .../shared/devtools/shadereditor.inc.css | 8 ++--- browser/themes/windows/devtools/widgets.css | 23 ++++++++------- 6 files changed, 52 insertions(+), 37 deletions(-) diff --git a/browser/devtools/shared/widgets/SideMenuWidget.jsm b/browser/devtools/shared/widgets/SideMenuWidget.jsm index d134beba0d3..1fd1ccaf485 100644 --- a/browser/devtools/shared/widgets/SideMenuWidget.jsm +++ b/browser/devtools/shared/widgets/SideMenuWidget.jsm @@ -487,7 +487,6 @@ function SideMenuGroup(aWidget, aName, aOptions={}) { 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); @@ -592,7 +591,6 @@ function SideMenuItem(aGroup, aContents, aTooltip, aAttachment={}, aOptions={}) if (aOptions.showCheckbox) { let checkbox = this._checkbox = makeCheckbox(container, aAttachment); checkbox.className = "side-menu-widget-item-checkbox"; - checkbox.setAttribute("align", "start"); } container.appendChild(target); diff --git a/browser/themes/linux/devtools/shadereditor.css b/browser/themes/linux/devtools/shadereditor.css index 34817e2453f..a914dfb5ee0 100644 --- a/browser/themes/linux/devtools/shadereditor.css +++ b/browser/themes/linux/devtools/shadereditor.css @@ -3,3 +3,7 @@ * 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; +} diff --git a/browser/themes/linux/devtools/widgets.css b/browser/themes/linux/devtools/widgets.css index 984298ea92d..36255d04cdd 100644 --- a/browser/themes/linux/devtools/widgets.css +++ b/browser/themes/linux/devtools/widgets.css @@ -317,11 +317,6 @@ background-image: linear-gradient(#fff, #eee); } -.side-menu-widget-group-checkbox { - margin: 0; - padding: 0; -} - /* SideMenuWidget items */ .side-menu-widget-item[theme="dark"] { @@ -379,11 +374,6 @@ 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); } @@ -403,6 +393,25 @@ 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 { diff --git a/browser/themes/osx/devtools/widgets.css b/browser/themes/osx/devtools/widgets.css index d5a93d14a54..cbe788464c6 100644 --- a/browser/themes/osx/devtools/widgets.css +++ b/browser/themes/osx/devtools/widgets.css @@ -317,11 +317,6 @@ background-image: linear-gradient(#fff, #eee); } -.side-menu-widget-group-checkbox { - margin: 0; - padding: 0; -} - /* SideMenuWidget items */ .side-menu-widget-item[theme="dark"] { @@ -379,11 +374,6 @@ 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); } @@ -403,6 +393,19 @@ 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 { diff --git a/browser/themes/shared/devtools/shadereditor.inc.css b/browser/themes/shared/devtools/shadereditor.inc.css index dd6f0242a66..ef93a59b399 100644 --- a/browser/themes/shared/devtools/shadereditor.inc.css +++ b/browser/themes/shared/devtools/shadereditor.inc.css @@ -51,8 +51,6 @@ .side-menu-widget-item-checkbox { -moz-appearance: none; - -moz-margin-end: -6px; - padding: 0; opacity: 0; transition: opacity .15s ease-out 0s; } @@ -66,10 +64,10 @@ 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; @@ -79,7 +77,7 @@ border: 0; } -.side-menu-widget-item-checkbox[checked] > .checkbox-check { +.side-menu-widget-item-checkbox[checked] .checkbox-check { background-position: 0 0; } diff --git a/browser/themes/windows/devtools/widgets.css b/browser/themes/windows/devtools/widgets.css index 48e8e8babe9..ebb1c852e81 100644 --- a/browser/themes/windows/devtools/widgets.css +++ b/browser/themes/windows/devtools/widgets.css @@ -321,11 +321,6 @@ background-image: linear-gradient(#fff, #eee); } -.side-menu-widget-group-checkbox { - margin: 0; - padding: 0; -} - /* SideMenuWidget items */ .side-menu-widget-item[theme="dark"] { @@ -383,11 +378,6 @@ 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); } @@ -406,6 +396,19 @@ 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 {