Last Comment Bug 672050 - Draw toolbar buttons with CoreUI
: Draw toolbar buttons with CoreUI
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Widget: Cocoa (show other bugs)
: Trunk
: All Mac OS X
: -- normal with 1 vote (vote)
: mozilla8
Assigned To: Markus Stange [:mstange]
:
Mentors:
Depends on: 668195 676387 678730
Blocks: 667480
  Show dependency treegraph
 
Reported: 2011-07-16 08:13 PDT by Markus Stange [:mstange]
Modified: 2011-08-13 09:01 PDT (History)
8 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
wip (36.06 KB, patch)
2011-07-16 08:13 PDT, Markus Stange [:mstange]
no flags Details | Diff | Splinter Review
part 1, v1: add toolbarbutton rendering (25.51 KB, patch)
2011-07-29 02:35 PDT, Markus Stange [:mstange]
jaas: review+
Details | Diff | Splinter Review
part 2, v1: inherit the open attribute on toolbarbutton[type=menu-button] dropmarkers (1.08 KB, patch)
2011-07-29 02:43 PDT, Markus Stange [:mstange]
dao+bmo: review+
Details | Diff | Splinter Review

Description Markus Stange [:mstange] 2011-07-16 08:13:12 PDT
Created attachment 546325 [details] [diff] [review]
wip

If we want the right toolbar button appearance on 10.7, we can either add special cases to our CSS and use images to get the noise texture, or we can ask the system to draw the buttons.

This patch (on top of the one in bug 668195) implements -moz-appearance:toolbarbutton with CoreUI and contains almost all of the necessary CSS changes.
The only thing I haven't fixed up yet is the circle back button.
Comment 1 Stefan [:stefanh] 2011-07-16 08:33:35 PDT
Ah, then I guess we don't need any patch in bug 553992?
Comment 2 Markus Stange [:mstange] 2011-07-16 08:53:55 PDT
I think we should take your patch in bug 553992 anyway since I don't know when this bug will be ready. We can always back it out again when I'm finished here.
This bug is blocked on bug 668195, and that needs some more theme fixup before it can land, and I don't know when I'll have time for that.
Comment 3 Stefan [:stefanh] 2011-07-16 09:10:47 PDT
OK. Awesome work Markus :-)
Comment 4 Steven Michaud [:smichaud] (Retired) 2011-07-16 12:14:43 PDT
OT:  Markus, do you think CoreUI might be a viable option for drawing
scrollbars (instead of the HITheme API we're currently using)?  And
might this allow us to support autohiding the scrollbars on OS X 10.7
(which the HITheme API currently doesn't support)?

(This is in regard to bug 636564.)
Comment 5 Markus Stange [:mstange] 2011-07-29 02:35:19 PDT
Created attachment 549331 [details] [diff] [review]
part 1, v1: add toolbarbutton rendering

Tabs and segmented toolbar buttons can be rendered with CoreUI with almost the same code, using widget types "tab" and "kCUIWidgetButtonSegmentedSCurve", respectively.
Comment 6 Markus Stange [:mstange] 2011-07-29 02:43:39 PDT
Created attachment 549334 [details] [diff] [review]
part 2, v1: inherit the open attribute on toolbarbutton[type=menu-button] dropmarkers

The CSS patch that will convert our custom toolbarbutton CSS to -moz-appearance: toolbarbutton will also set -moz-appearance: toolbarbutton on the dropmarker of a toolbarbutton[type="menu-button"]. Open menu button toolbarbuttons should have a pressed dropmarker, and inheriting open into the dropmarker is simpler than making widget code check the dropmarker's parent.
Comment 8 :Ehsan Akhgari 2011-08-09 08:53:18 PDT
http://hg.mozilla.org/mozilla-central/rev/4fb70b8c389f

The other patch was backed out from inbound.

Note You need to log in before you can comment on or make changes to this bug.