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

Issue 2957263002: Update dialog button text color for Harmony per the latest button spec (Closed)

Created:
3 years, 5 months ago by tapted
Modified:
3 years, 5 months ago
Reviewers:
Peter Kasting
CC:
chromium-reviews, tfarina, chrome-apps-syd-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Update dialog button text color for Harmony per the latest button spec Only use the new colors when using HarmonyTypographyProvider. Diverge from NativeTheme for this since there's too much indirection. `kButtonEnabledColor` is gfx::kChromeIconGrey, but kButtonEnabledColor is used for lots of other things. Note we still use NativeTheme when the Harmony spec is ignored (e.g. OS themes with inverted or high-constrast themes). This CL refactors the code in HarmonyTypographyProvider to be more explicit about when the Harmony spec needs to be ignored. BUG=691891, 738292 Review-Url: https://codereview.chromium.org/2957263002 Cr-Commit-Position: refs/heads/master@{#483954} Committed: https://chromium.googlesource.com/chromium/src/+/d007b3e7c64c2fdaf91c70ed2bc89205fcdfcb41

Patch Set 1 #

Patch Set 2 : stray edit #

Patch Set 3 : corner case? #

Patch Set 4 : Explicitly handle cases where Harmony is ignored #

Patch Set 5 : fix default buttons #

Total comments: 10

Patch Set 6 : color_utils::IsInvertedColorScheme(), fewer Win constants #

Unified diffs Side-by-side diffs Delta from patch set Stats (+100 lines, -33 lines) Patch
M chrome/browser/ui/views/harmony/harmony_typography_provider.cc View 1 2 3 4 5 2 chunks +76 lines, -23 lines 0 comments Download
M ui/views/controls/button/md_text_button.cc View 1 2 1 chunk +6 lines, -6 lines 0 comments Download
M ui/views/controls/label.h View 3 chunks +4 lines, -4 lines 0 comments Download
M ui/views/style/typography_provider.cc View 1 chunk +14 lines, -0 lines 0 comments Download

Messages

Total messages: 43 (25 generated)
tapted
Hi Peter, please take a look. Eventually... we will have only MdTextButton + Button::STYLE_TEXTBUTTON and ...
3 years, 5 months ago (2017-06-28 07:16:10 UTC) #7
Peter Kasting
I think the right thing to do is to go through the theme provider, but ...
3 years, 5 months ago (2017-06-28 07:25:04 UTC) #8
tapted
On 2017/06/28 07:25:04, Peter Kasting wrote: > I think the right thing to do is ...
3 years, 5 months ago (2017-06-28 07:28:07 UTC) #9
tapted
On 2017/06/28 07:28:07, tapted wrote: > On 2017/06/28 07:25:04, Peter Kasting wrote: > > I ...
3 years, 5 months ago (2017-06-28 07:40:43 UTC) #10
Peter Kasting
I think you understand this already, but so I'm sure we're on the same page ...
3 years, 5 months ago (2017-06-28 07:49:10 UTC) #11
tapted
Yep, we are on the same page. I toyed around with OS themes some more. ...
3 years, 5 months ago (2017-06-29 07:37:55 UTC) #14
tapted
PTAL - this is the CL where I had a bit of a rant. Patchset ...
3 years, 5 months ago (2017-06-30 06:00:26 UTC) #21
Peter Kasting
My handwavey answer to this is that at the lowest level, NativeThemeWin should indeed always ...
3 years, 5 months ago (2017-06-30 06:12:01 UTC) #22
tapted
On 2017/06/30 06:12:01, Peter Kasting wrote: > My handwavey answer to this is that at ...
3 years, 5 months ago (2017-06-30 07:12:51 UTC) #25
Peter Kasting
On 2017/06/30 07:12:51, tapted wrote: > On 2017/06/30 06:12:01, Peter Kasting wrote: > > Ignoring ...
3 years, 5 months ago (2017-06-30 07:31:20 UTC) #26
tapted
On 2017/06/30 07:31:20, Peter Kasting wrote: > On 2017/06/30 07:12:51, tapted wrote: > > On ...
3 years, 5 months ago (2017-06-30 08:06:22 UTC) #27
Peter Kasting
On 2017/06/30 08:06:22, tapted wrote: > On 2017/06/30 07:31:20, Peter Kasting wrote: > > On ...
3 years, 5 months ago (2017-06-30 08:31:08 UTC) #28
Peter Kasting
BTW, note that this is basically already what you're doing in the DefaultTypographyProvider where you ...
3 years, 5 months ago (2017-06-30 08:34:39 UTC) #29
Peter Kasting
In the meantime while we're discussing the larger long-term vision -- this looks like a ...
3 years, 5 months ago (2017-06-30 08:56:12 UTC) #30
tapted
We should probably more the design discussion to a design doc :). I think we've ...
3 years, 5 months ago (2017-07-03 05:20:50 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2957263002/100001
3 years, 5 months ago (2017-07-03 06:32:45 UTC) #39
commit-bot: I haz the power
Committed patchset #6 (id:100001) as https://chromium.googlesource.com/chromium/src/+/d007b3e7c64c2fdaf91c70ed2bc89205fcdfcb41
3 years, 5 months ago (2017-07-03 06:37:41 UTC) #42
Peter Kasting
3 years, 5 months ago (2017-07-06 05:04:52 UTC) #43
Message was sent while issue was closed.
As you note, detailed design arguments probably shouldn't be hashed out on a
code review.  So I'll just give you a sketch of my ultimate goal in hopes it
explains where I'm coming from.

A core hope of mine is that we get to the point where the design specifies no
colors, sizes, font faces, etc. at all.  Instead, everything would be specified
in terms of how to adapt system and theme settings.  For example, some
particular font might become "system window text font, but with alpha 0.8 and
size +2".

We're nowhere close to that.  Designers always want some specific look and feel,
and for now we're accommodating them.  But in the long run I am hoping to push
us toward a unified underlying set of system + theme-provided colors, font
sizes, etc. and then make the design work in those terms.  It will be much
better for accessibility and customization.  And in my head, the way that works
is that we have low-level infrastructure like the theme and font systems that
give you the core primitives, and then higher-level services like typography
provider that blend those primitives into specific combinations for common use.

Anyway, as you note, we can try and hash out those details more later.  I don't
think we need to agree on either the specifics or the broad strokes for now --
the patch as landed here seems like a win.  :)

Powered by Google App Engine
This is Rietveld 408576698