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

Issue 2319313003: views: refactor away PlatformStyle::BackgroundColorForMdButton (Closed)

Created:
4 years, 3 months ago by Elly Fong-Jones
Modified:
4 years, 3 months ago
Reviewers:
sky, Evan Stade
CC:
chromium-reviews, tfarina
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

views: refactor away PlatformStyle::BackgroundColorForMdButton This change: 1) Introduces color_utils::ImplicitAlphaBlend, which does an alpha blend using the alpha of the foreground color; 2) Introduces a NativeTheme color ID for the shading of a pressed button; 3) Uses ImplicitAlphaBlend to blend that shade, instead of calling into PlatformStyle; 4) Deletes PlatformStyle::BackgroundColorForMdButton BUG=644543 Committed: https://crrev.com/8275c2644a78419c3c0a4a191314b873a1f694b9 Cr-Commit-Position: refs/heads/master@{#417366}

Patch Set 1 #

Total comments: 6

Patch Set 2 : fix nits #

Total comments: 1

Patch Set 3 : reorder declarations #

Total comments: 1

Patch Set 4 : nits and rename #

Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -25 lines) Patch
M chrome/browser/ui/libgtk2ui/native_theme_gtk2.cc View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M ui/gfx/color_utils.h View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M ui/gfx/color_utils.cc View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M ui/native_theme/common_theme.cc View 2 chunks +3 lines, -0 lines 0 comments Download
M ui/native_theme/native_theme.h View 1 chunk +1 line, -0 lines 0 comments Download
M ui/native_theme/native_theme_dark_aura.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M ui/native_theme/native_theme_mac.mm View 2 chunks +5 lines, -1 line 0 comments Download
M ui/views/controls/button/md_text_button.cc View 1 2 3 1 chunk +5 lines, -3 lines 0 comments Download
M ui/views/style/platform_style.h View 1 chunk +0 lines, -5 lines 0 comments Download
M ui/views/style/platform_style.cc View 1 chunk +0 lines, -6 lines 0 comments Download
M ui/views/style/platform_style_mac.mm View 1 chunk +0 lines, -10 lines 0 comments Download

Messages

Total messages: 20 (9 generated)
Elly Fong-Jones
estade, sky: ptal? :)
4 years, 3 months ago (2016-09-08 12:47:47 UTC) #3
Evan Stade
https://codereview.chromium.org/2319313003/diff/1/ui/gfx/color_utils.cc File ui/gfx/color_utils.cc (right): https://codereview.chromium.org/2319313003/diff/1/ui/gfx/color_utils.cc#newcode288 ui/gfx/color_utils.cc:288: return AlphaBlend(SkColorSetA(foreground, 0xff), background, nit: s/0xff/SK_AlphaOPAQUE https://codereview.chromium.org/2319313003/diff/1/ui/gfx/color_utils.h File ui/gfx/color_utils.h ...
4 years, 3 months ago (2016-09-08 14:50:47 UTC) #4
Elly Fong-Jones
estade: ptal? :) https://codereview.chromium.org/2319313003/diff/1/ui/gfx/color_utils.cc File ui/gfx/color_utils.cc (right): https://codereview.chromium.org/2319313003/diff/1/ui/gfx/color_utils.cc#newcode288 ui/gfx/color_utils.cc:288: return AlphaBlend(SkColorSetA(foreground, 0xff), background, On 2016/09/08 ...
4 years, 3 months ago (2016-09-08 16:06:13 UTC) #5
Evan Stade
lgtm https://codereview.chromium.org/2319313003/diff/20001/ui/native_theme/native_theme_dark_aura.cc File ui/native_theme/native_theme_dark_aura.cc (right): https://codereview.chromium.org/2319313003/diff/20001/ui/native_theme/native_theme_dark_aura.cc#newcode99 ui/native_theme/native_theme_dark_aura.cc:99: case kColorId_ButtonPressedShade: nit: perhaps keep these in declaration ...
4 years, 3 months ago (2016-09-08 16:36:49 UTC) #6
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/2319313003/40001
4 years, 3 months ago (2016-09-08 16:43:45 UTC) #9
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/255650)
4 years, 3 months ago (2016-09-08 16:50:24 UTC) #11
sky
LGTM https://codereview.chromium.org/2319313003/diff/40001/ui/gfx/color_utils.h File ui/gfx/color_utils.h (right): https://codereview.chromium.org/2319313003/diff/40001/ui/gfx/color_utils.h#newcode99 ui/gfx/color_utils.h:99: GFX_EXPORT SkColor ImplicitAlphaBlend(SkColor foreground, SkColor background); optional: I'm ...
4 years, 3 months ago (2016-09-08 17:57:53 UTC) #12
Elly Fong-Jones
On 2016/09/08 17:57:53, sky wrote: > LGTM > > https://codereview.chromium.org/2319313003/diff/40001/ui/gfx/color_utils.h > File ui/gfx/color_utils.h (right): > ...
4 years, 3 months ago (2016-09-08 18:22:43 UTC) #13
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/2319313003/60001
4 years, 3 months ago (2016-09-08 18:23:25 UTC) #16
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 3 months ago (2016-09-08 19:40:51 UTC) #18
commit-bot: I haz the power
4 years, 3 months ago (2016-09-08 19:45:40 UTC) #20
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/8275c2644a78419c3c0a4a191314b873a1f694b9
Cr-Commit-Position: refs/heads/master@{#417366}

Powered by Google App Engine
This is Rietveld 408576698