Closed Bug 506730 Opened 16 years ago Closed 16 years ago

Update toggles to use a "thumb"

Categories

(Firefox for Android Graveyard :: General, defect)

x86
macOS
defect
Not set
normal

Tracking

(fennec1.0a3-wm+)

VERIFIED FIXED
Tracking Status
fennec 1.0a3-wm+ ---

People

(Reporter: mfinkle, Assigned: mfinkle)

Details

Attachments

(2 files, 1 obsolete file)

Current toggles show captions for both states (on & off) and use color to indicate the active state. We should change to only show the caption for the active state.
Attached patch WIP - needs CSS help (obsolete) — Splinter Review
This patch introduces a new radio XBL binding and some CSS to make it work. We need some CSS help making the "thumb" look better.
Assignee: nobody → mark.finkle
Current toggles are ambiguous and look like crap. We need better before we ship.
tracking-fennec: --- → ?
Attached patch patch (hildon)Splinter Review
This patch uses -moz-border-image to create nice looking on/off toggles and radio toggles: * Updates the CSS in platform.css to use -moz-border-image for radios, checkbox-radios and dark radios * Adds new images for the various states * Changes the Search buttons to be dark toggles * Updates browser.xul, browser-ui.js and browser.css where needed for the Search buttons change. Sean Martell will create similar images for wince and I will add a new patch for just those changes.
Attachment #390899 - Attachment is obsolete: true
Attachment #391605 - Flags: review?(gavin.sharp)
Comment on attachment 391605 [details] [diff] [review] patch (hildon) >diff --git a/chrome/content/browser-ui.js b/chrome/content/browser-ui.js >- var container = this._autocompleteNavbuttons; >+ var container = document.getElementById("search-buttons"); Why this change? I guess it's only used here, but should remove _autocompleteNavbuttons in that case. >- var button = document.createElementNS(kXULNS, "toolbarbutton"); >+ var button = document.createElementNS(kXULNS, "radio"); rename to "radio", perhaps? >diff --git a/chrome/content/browser.css b/chrome/content/browser.css >+radio { >+ -moz-binding: url("chrome://global/content/bindings/radio.xml#radio"); > } This rule's already in xul.css... >diff --git a/chrome/content/browser.xul b/chrome/content/browser.xul >+ <radiogroup id="search-buttons" class="toggle-dark" onmousedown="BrowserUI.doButtonSearch(event.target);"> >+ </radiogroup> Is oncommand not fired for radios? How about onselect instead? >diff --git a/themes/hildon/browser.css b/themes/hildon/browser.css >+#autocomplete_navbuttons autorepeatbutton { >+ display: none; > } Kind of hurts the discoverability of scrolling... guess that's not a big deal. r=me with those addressed.
Attachment #391605 - Flags: review?(gavin.sharp) → review+
(In reply to comment #4) > (From update of attachment 391605 [details] [diff] [review]) > >diff --git a/chrome/content/browser-ui.js b/chrome/content/browser-ui.js > > >- var container = this._autocompleteNavbuttons; > >+ var container = document.getElementById("search-buttons"); > > Why this change? I guess it's only used here, but should remove > _autocompleteNavbuttons in that case. Removed. I needed to put the <radio>s in a <radiogroup> > >- var button = document.createElementNS(kXULNS, "toolbarbutton"); > >+ var button = document.createElementNS(kXULNS, "radio"); > > rename to "radio", perhaps? It felt better to leave this as "button" since they still really look like buttons. > >+radio { > >+ -moz-binding: url("chrome://global/content/bindings/radio.xml#radio"); > > } > > This rule's already in xul.css... True, but it is overridden for some platforms, so I force it for all platforms. Makes the CSS easier to deal with. > >+ <radiogroup id="search-buttons" class="toggle-dark" onmousedown="BrowserUI.doButtonSearch(event.target);"> > >+ </radiogroup> > > Is oncommand not fired for radios? How about onselect instead? Something is blocking it. onselect did not work either. > >+#autocomplete_navbuttons autorepeatbutton { > >+ display: none; > > } > > Kind of hurts the discoverability of scrolling... guess that's not a big deal. The rounded button ends give a simple indication that there is more the the left or right.
(In reply to comment #5) > > >+radio { > > >+ -moz-binding: url("chrome://global/content/bindings/radio.xml#radio"); > > > } > > > > This rule's already in xul.css... > > True, but it is overridden for some platforms, so I force it for all platforms. > Makes the CSS easier to deal with. Where is it overridden? > Something is blocking it. onselect did not work either. We'll need to get a bug on file for keyboard access, then, at the very least.
(In reply to comment #6) > (In reply to comment #5) > > > >+radio { > > > >+ -moz-binding: url("chrome://global/content/bindings/radio.xml#radio"); > > > > } > > > > > > This rule's already in xul.css... > > > > True, but it is overridden for some platforms, so I force it for all platforms. > > Makes the CSS easier to deal with. > > Where is it overridden? http://mxr.mozilla.org/mozilla-central/source/toolkit/themes/winstripe/global/global.css#49 http://mxr.mozilla.org/mozilla-central/source/toolkit/themes/gnomestripe/global/global.css#53 > > Something is blocking it. onselect did not work either. > > We'll need to get a bug on file for keyboard access, then, at the very least. Bug 508195
(In reply to comment #7) > > Where is it overridden? > > http://mxr.mozilla.org/mozilla-central/source/toolkit/themes/winstripe/global/global.css#49 > http://mxr.mozilla.org/mozilla-central/source/toolkit/themes/gnomestripe/global/global.css#53 Should add a comment that that's what we're doing, then (and perhaps make it explicitly !important).
Attached image Screenshot
New toggles buttons are very nice! But they have a white background, and this can lead to some style conflict with Fennec (example in the screenshot) or even with extension.
(In reply to comment #9) > Created an attachment (id=392926) [details] > Screenshot > > New toggles buttons are very nice! > > But they have a white background, and this can lead to some style conflict with > Fennec (example in the screenshot) or even with extension. Yes, this is known. We are not using a transparent image for speed issues. This means the toggles can only really be used with white backgrounds for now. This particular toggle (in the Find panel) is being removed.
tracking-fennec: ? → 1.0a3-wm+
Windows Mobile was fixed in bug 512007
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
verified in 20090828 winmo build and 20090827 maemo build
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: