Use CSS to make buttons look enabled while customizing instead of messing with buttons' disabled states in CustomizeMode.jsm

RESOLVED FIXED in Firefox 28

Status

()

Firefox
Toolbars and Customization
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: dao, Assigned: Gijs)

Tracking

(Blocks: 1 bug)

Trunk
Firefox 28
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [Australis:M7])

Attachments

(2 attachments, 1 obsolete attachment)

(Reporter)

Description

5 years ago
Spun off from bug 879980... Where we use CSS to implement the disabled state, we could easily stop doing that while customizing: http://hg.mozilla.org/projects/ux/file/899389c30a16/browser/themes/windows/browser.css#l338

We should then get rid of this code: http://hg.mozilla.org/projects/ux/file/d34b32544b06/browser/components/customizableui/src/CustomizeMode.jsm#l362
(Assignee)

Updated

5 years ago
Blocks: 872617
Status: NEW → ASSIGNED
Whiteboard: [Australis:M7]
(Assignee)

Comment 1

5 years ago
Created attachment 762170 [details] [diff] [review]
Remove old code to do this

This part I'm fairly sure about.
Attachment #762170 - Flags: review?(dao)
(Assignee)

Comment 2

5 years ago
Created attachment 762176 [details] [diff] [review]
Check for toolbarpaletteitem parents

This part, however...

It'd simplify things slightly to use #mainwindow:not([customizing]), but I guess it'd also be slower...
Attachment #762176 - Flags: review?(dao)
(Reporter)

Updated

5 years ago
Attachment #762170 - Flags: review?(dao) → review+
(Reporter)

Comment 3

5 years ago
Comment on attachment 762176 [details] [diff] [review]
Check for toolbarpaletteitem parents

the linux part is fine, but I think we're better off with #main-window:not([customizing]) for windows and osx
Attachment #762176 - Flags: review?(dao)
(Assignee)

Comment 4

5 years ago
Created attachment 762574 [details] [diff] [review]
Use a main window + attribute selector on OS X and Windows
Attachment #762176 - Attachment is obsolete: true
Attachment #762574 - Flags: review?(dao)
(Reporter)

Comment 5

5 years ago
Comment on attachment 762574 [details] [diff] [review]
Use a main window + attribute selector on OS X and Windows

>--- a/browser/themes/linux/browser.css
>+++ b/browser/themes/linux/browser.css

> #cut-button {
>   list-style-image: url("moz-icon://stock/gtk-cut?size=toolbar") !important;
> }
>-#cut-button[disabled="true"] {
>+:not(toolbarpaletteitem) > toolbaritem > #cut-button[disabled="true"] {
>   list-style-image: url("moz-icon://stock/gtk-cut?size=toolbar&state=disabled") !important;
> }
> 
> #copy-button {
>   list-style-image: url("moz-icon://stock/gtk-copy?size=toolbar") !important;
> }
>-#copy-button[disabled="true"] {
>+:not(toolbarpaletteitem) > toolbaritem > #copy-button[disabled="true"] {
>   list-style-image: url("moz-icon://stock/gtk-copy?size=toolbar&state=disabled") !important;
> }
> 
> #paste-button {
>   list-style-image: url("moz-icon://stock/gtk-paste?size=toolbar") !important;
> }
>-#paste-button[disabled="true"] {
>+:not(toolbarpaletteitem) > toolbaritem > #paste-button[disabled="true"] {
>   list-style-image: url("moz-icon://stock/gtk-paste?size=toolbar&state=disabled") !important;
> }

Please use #edit-controls instead of toolbaritem in these selectors.
Attachment #762574 - Flags: review?(dao) → review+
(Assignee)

Updated

5 years ago
Blocks: 882744
(Assignee)

Comment 6

5 years ago
Pushed: https://hg.mozilla.org/projects/ux/rev/d9f547e97bf8
Whiteboard: [Australis:M7] → [Australis:M7][fixed-in-ux]
OS: Windows 7 → All
Hardware: x86_64 → All
(Reporter)

Updated

5 years ago
No longer depends on: 885725
(Assignee)

Comment 7

4 years ago
https://hg.mozilla.org/mozilla-central/rev/d9f547e97bf8
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Whiteboard: [Australis:M7][fixed-in-ux] → [Australis:M7]
Target Milestone: --- → Firefox 28
You need to log in before you can comment on or make changes to this bug.