Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(664)

Issue 1569113002: MacViews: Style BUTTON_STYLE buttons using the "modern" UI (Closed)

Created:
4 years, 11 months ago by tapted
Modified:
4 years, 8 months ago
Reviewers:
Elly Fong-Jones, sky
CC:
chromium-reviews, tfarina, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

MacViews: Style BUTTON_STYLE buttons using the "modern" UI Currently BUTTON_STYLE LabelButtons on Mac are styled using the webui-like "ConstrainedWindowButton" style which is used in various places in the Cocoa UI but nobody likes it. The first phase of toolkit-views dialogs on Mac will be replacing Cocoa dialogs using this "constrained" button style, with a more modern style, drawn in Skia. This CL hooks up that style to views::Label button, with some small behaviour changes for "default" buttons, and a changing font color. It handles: - Default buttons on Mac shouldn't get a bold font. - Instead, the font changes color so ensure SetIsDefault invalidates that correctly. - The minimum button size should be smaller on Mac. Shares the background gradient calculation with comboboxes, and tweaks the API slightly to support "highlighted" buttons (i.e. default). Updates views_examples so that all buttons in the example page can be toggled "default" (currently only the first button can be, which isn't STYLE_BUTTON). Screenshots: http://crbug.com/543686#c5 #c6 BUG=543686 Committed: https://crrev.com/b43f95769ea64a0b000cf524a9d75df1f73e40ed Cr-Commit-Position: refs/heads/master@{#386322}

Patch Set 1 : "CoFaux" - emulate Cocoa #

Patch Set 2 : Update to shiny modern #

Patch Set 3 : Consolidate! and compromise #

Patch Set 4 : Base off crrev/1863503002 #

Patch Set 5 : Testing, tweaks, self review #

Patch Set 6 : nits. fix upstream #

Patch Set 7 : Fix default buttons on bookmark bubble + test #

Patch Set 8 : Fix new tests on !mac #

Patch Set 9 : Fix desktop linux weirdness #

Total comments: 10

Patch Set 10 : respond to comments, desktop linux #

Total comments: 19

Patch Set 11 : rebase [at 385994] to pick up r385759 #

Patch Set 12 : respond to comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+396 lines, -205 lines) Patch
M ui/native_theme/native_theme_mac.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +13 lines, -1 line 0 comments Download
M ui/native_theme/native_theme_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +25 lines, -14 lines 0 comments Download
M ui/views/controls/button/label_button.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +5 lines, -1 line 0 comments Download
M ui/views/controls/button/label_button.cc View 1 2 3 4 5 6 7 8 9 10 11 10 chunks +34 lines, -39 lines 0 comments Download
M ui/views/controls/button/label_button_unittest.cc View 1 2 3 4 5 6 7 8 9 5 chunks +105 lines, -13 lines 0 comments Download
M ui/views/examples/button_example.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +7 lines, -5 lines 0 comments Download
M ui/views/examples/button_example.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +29 lines, -29 lines 0 comments Download
M ui/views/style/mac/combobox_background_mac.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +9 lines, -5 lines 0 comments Download
M ui/views/style/mac/dialog_button_border_mac.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +5 lines, -0 lines 0 comments Download
M ui/views/style/mac/dialog_button_border_mac.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +55 lines, -93 lines 0 comments Download
M ui/views/style/platform_style.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +26 lines, -4 lines 0 comments Download
M ui/views/style/platform_style.cc View 1 2 3 4 3 chunks +47 lines, -1 line 0 comments Download
M ui/views/style/platform_style_linux.cc View 1 2 3 4 1 chunk +8 lines, -0 lines 0 comments Download
M ui/views/style/platform_style_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +28 lines, -0 lines 0 comments Download

Messages

Total messages: 36 (27 generated)
tapted
Hi Elly, could you please do a review pass before I send on to sky? ...
4 years, 8 months ago (2016-04-05 13:19:18 UTC) #18
Elly Fong-Jones
lgtm https://codereview.chromium.org/1569113002/diff/400001/ui/native_theme/native_theme_mac.mm File ui/native_theme/native_theme_mac.mm (right): https://codereview.chromium.org/1569113002/diff/400001/ui/native_theme/native_theme_mac.mm#newcode46 ui/native_theme/native_theme_mac.mm:46: struct EnumArray { Oh, this is a very ...
4 years, 8 months ago (2016-04-05 16:43:25 UTC) #19
tapted
+sky - please take a look for OWNERS (note for the added tests, I ran ...
4 years, 8 months ago (2016-04-06 12:08:33 UTC) #25
sky
https://codereview.chromium.org/1569113002/diff/470001/ui/native_theme/native_theme_mac.h File ui/native_theme/native_theme_mac.h (right): https://codereview.chromium.org/1569113002/diff/470001/ui/native_theme/native_theme_mac.h#newcode22 ui/native_theme/native_theme_mac.h:22: enum class BackgroundType { DISABLED, HIGHLIGHTED, NORMAL, PRESSED, COUNT ...
4 years, 8 months ago (2016-04-07 17:16:32 UTC) #26
tapted
https://codereview.chromium.org/1569113002/diff/470001/ui/native_theme/native_theme_mac.h File ui/native_theme/native_theme_mac.h (right): https://codereview.chromium.org/1569113002/diff/470001/ui/native_theme/native_theme_mac.h#newcode22 ui/native_theme/native_theme_mac.h:22: enum class BackgroundType { DISABLED, HIGHLIGHTED, NORMAL, PRESSED, COUNT ...
4 years, 8 months ago (2016-04-08 08:35:33 UTC) #28
sky
LGTM - if you want to remove the caching of font list you can do ...
4 years, 8 months ago (2016-04-08 16:24:23 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1569113002/530001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1569113002/530001
4 years, 8 months ago (2016-04-11 00:11:14 UTC) #32
commit-bot: I haz the power
Committed patchset #12 (id:530001)
4 years, 8 months ago (2016-04-11 00:51:15 UTC) #34
commit-bot: I haz the power
4 years, 8 months ago (2016-04-11 00:52:16 UTC) #36
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/b43f95769ea64a0b000cf524a9d75df1f73e40ed
Cr-Commit-Position: refs/heads/master@{#386322}

Powered by Google App Engine
This is Rietveld 408576698