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

Issue 12483006: wrench_menu: use NativeTheme colors under aura (Closed)

Created:
7 years, 9 months ago by Bobby Powers
Modified:
7 years, 8 months ago
CC:
chromium-reviews, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

wrench_menu: use NativeTheme colors under aura This changes the wrench menu's MenuButtonBackground to use NativeTheme colors under aura, and introduces kColorId_HotMenuItemBackgroundColor. BUG=130810 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=190048

Patch Set 1 #

Patch Set 2 : cleaned up #

Total comments: 6

Patch Set 3 : always use View::GetNativeTheme() #

Total comments: 4

Patch Set 4 : {background,border}_color fixup and HoverBorderColor #

Total comments: 4

Patch Set 5 : remove MenuButtonBackground's aura ifdef #

Patch Set 6 : remove unused constant in common_theme.cc #

Total comments: 6

Patch Set 7 : fix indentation and rename ItemBorder to ButtonBorder #

Patch Set 8 : no need to pass View from toolbarview to wrenchmenu #

Total comments: 6

Patch Set 9 : camel-case {Border,Background}Color and comment ButtonBackground enums #

Patch Set 10 : fix windows build #

Unified diffs Side-by-side diffs Delta from patch set Stats (+148 lines, -64 lines) Patch
M chrome/browser/ui/libgtk2ui/native_theme_gtk2.cc View 1 2 3 4 5 6 2 chunks +8 lines, -1 line 0 comments Download
M chrome/browser/ui/views/wrench_menu.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/wrench_menu.cc View 1 2 3 4 5 6 7 8 11 chunks +75 lines, -57 lines 0 comments Download
M ui/native_theme/common_theme.cc View 1 2 3 4 5 6 3 chunks +17 lines, -0 lines 0 comments Download
M ui/native_theme/native_theme.h View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -0 lines 0 comments Download
M ui/native_theme/native_theme_aura.cc View 1 2 3 4 5 6 3 chunks +14 lines, -0 lines 0 comments Download
M ui/native_theme/native_theme_gtk.cc View 1 2 3 4 5 6 2 chunks +21 lines, -0 lines 0 comments Download
M ui/views/controls/menu/menu_config.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M ui/views/controls/menu/menu_config_views.cc View 1 2 2 chunks +4 lines, -4 lines 0 comments Download
M ui/views/controls/menu/menu_config_win.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 29 (0 generated)
Bobby Powers
Hello, please take a look. There are a few issues that I'm unsure of. First, ...
7 years, 9 months ago (2013-03-16 15:36:17 UTC) #1
Bobby Powers
On 2013/03/16 15:36:17, Bobby Powers wrote: > Hello, please take a look. There are a ...
7 years, 9 months ago (2013-03-18 17:00:02 UTC) #2
Elliot Glaysher
A few comments fyi, anyway: https://codereview.chromium.org/12483006/diff/2001/chrome/browser/ui/views/wrench_menu.cc File chrome/browser/ui/views/wrench_menu.cc (right): https://codereview.chromium.org/12483006/diff/2001/chrome/browser/ui/views/wrench_menu.cc#newcode251 chrome/browser/ui/views/wrench_menu.cc:251: #if defined(USE_AURA) Please remember ...
7 years, 9 months ago (2013-03-18 17:53:40 UTC) #3
Bobby Powers
https://codereview.chromium.org/12483006/diff/2001/chrome/browser/ui/views/wrench_menu.cc File chrome/browser/ui/views/wrench_menu.cc (right): https://codereview.chromium.org/12483006/diff/2001/chrome/browser/ui/views/wrench_menu.cc#newcode251 chrome/browser/ui/views/wrench_menu.cc:251: #if defined(USE_AURA) On 2013/03/18 17:53:40, Elliot Glaysher wrote: > ...
7 years, 9 months ago (2013-03-18 18:11:43 UTC) #4
Bobby Powers
PTAL. The main thing is to pass a View down from ToolbarView::OnMenuItemClicked into WrenchMenu::Init. This ...
7 years, 9 months ago (2013-03-18 19:59:53 UTC) #5
Elliot Glaysher
https://codereview.chromium.org/12483006/diff/9001/chrome/browser/ui/views/wrench_menu.cc File chrome/browser/ui/views/wrench_menu.cc (right): https://codereview.chromium.org/12483006/diff/9001/chrome/browser/ui/views/wrench_menu.cc#newcode200 chrome/browser/ui/views/wrench_menu.cc:200: background_color(view, state)); Please call {background,border}_color(view, state) once outside the ...
7 years, 9 months ago (2013-03-18 21:03:39 UTC) #6
Bobby Powers
Thanks for the reviews so far Elliot. PTAL. https://codereview.chromium.org/12483006/diff/9001/chrome/browser/ui/views/wrench_menu.cc File chrome/browser/ui/views/wrench_menu.cc (right): https://codereview.chromium.org/12483006/diff/9001/chrome/browser/ui/views/wrench_menu.cc#newcode200 chrome/browser/ui/views/wrench_menu.cc:200: background_color(view, ...
7 years, 9 months ago (2013-03-18 21:24:58 UTC) #7
Elliot Glaysher
https://codereview.chromium.org/12483006/diff/12001/chrome/browser/ui/views/wrench_menu.cc File chrome/browser/ui/views/wrench_menu.cc (right): https://codereview.chromium.org/12483006/diff/12001/chrome/browser/ui/views/wrench_menu.cc#newcode251 chrome/browser/ui/views/wrench_menu.cc:251: #if defined(USE_AURA) It's a start, but this #ifdef block ...
7 years, 9 months ago (2013-03-18 21:38:21 UTC) #8
Bobby Powers
I think its starting to look better :) I've added {Enabled,Focused,Hover}MenuItemBorderColor everywhere with the values ...
7 years, 9 months ago (2013-03-19 13:27:01 UTC) #9
Elliot Glaysher
lgtm. Adding sky to take a quick glance at the ui/ directory before stamp.
7 years, 9 months ago (2013-03-19 17:16:55 UTC) #10
sky
https://codereview.chromium.org/12483006/diff/18011/chrome/browser/ui/views/wrench_menu.cc File chrome/browser/ui/views/wrench_menu.cc (right): https://codereview.chromium.org/12483006/diff/18011/chrome/browser/ui/views/wrench_menu.cc#newcode250 chrome/browser/ui/views/wrench_menu.cc:250: ui::NativeTheme::kColorId_HoverMenuItemBorderColor); indent 4 here, 253 and all other similar ...
7 years, 9 months ago (2013-03-19 21:08:26 UTC) #11
Bobby Powers
Hi sky, I believe I've addressed all of your comments, the only place I didn't ...
7 years, 9 months ago (2013-03-20 14:54:37 UTC) #12
sky
https://codereview.chromium.org/12483006/diff/28001/chrome/browser/ui/views/wrench_menu.cc File chrome/browser/ui/views/wrench_menu.cc (right): https://codereview.chromium.org/12483006/diff/28001/chrome/browser/ui/views/wrench_menu.cc#newcode245 chrome/browser/ui/views/wrench_menu.cc:245: static SkColor border_color(View* view, CustomButton::ButtonState state) { These should ...
7 years, 9 months ago (2013-03-20 16:30:01 UTC) #13
Bobby Powers
Hello sky, I believe the only thing I didn't yet address is the duplication of ...
7 years, 9 months ago (2013-03-21 17:08:43 UTC) #14
sky
LGTM - lets go with the copy for now and you can clean up in ...
7 years, 9 months ago (2013-03-21 17:43:52 UTC) #15
Bobby Powers
On 2013/03/21 17:43:52, sky wrote: > LGTM - lets go with the copy for now ...
7 years, 9 months ago (2013-03-21 17:44:34 UTC) #16
Bobby Powers
Elliot - can you kick the trybuild/commit machinery?
7 years, 9 months ago (2013-03-22 15:09:51 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bobbypowers@gmail.com/12483006/34001
7 years, 9 months ago (2013-03-22 16:40:12 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bobbypowers@gmail.com/12483006/34001
7 years, 9 months ago (2013-03-22 18:16:40 UTC) #19
Bobby Powers
On 2013/03/22 18:16:40, I haz the power (commit-bot) wrote: > CQ is trying da patch. ...
7 years, 9 months ago (2013-03-22 19:55:35 UTC) #20
Elliot Glaysher
On 2013/03/22 19:55:35, Bobby Powers wrote: > On 2013/03/22 18:16:40, I haz the power (commit-bot) ...
7 years, 9 months ago (2013-03-22 19:57:43 UTC) #21
commit-bot: I haz the power
Failed to trigger a try job on win_x64_rel HTTP Error 400: Bad Request
7 years, 9 months ago (2013-03-22 20:05:53 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bobbypowers@gmail.com/12483006/49001
7 years, 9 months ago (2013-03-22 20:08:12 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bobbypowers@gmail.com/12483006/49001
7 years, 9 months ago (2013-03-23 14:53:52 UTC) #24
commit-bot: I haz the power
Change committed as 190048
7 years, 9 months ago (2013-03-23 17:48:52 UTC) #25
cpu_(ooo_6.6-7.5)
Note that is change dchecks on windows if you are not in the new menu ...
7 years, 8 months ago (2013-03-29 20:18:34 UTC) #26
Bobby Powers
On 2013/03/29 20:18:34, cpu wrote: > Note that is change dchecks on windows if you ...
7 years, 8 months ago (2013-03-30 03:13:59 UTC) #27
Elliot Glaysher
On 2013/03/30 03:13:59, Bobby Powers wrote: > On 2013/03/29 20:18:34, cpu wrote: > > Note ...
7 years, 8 months ago (2013-04-01 17:34:43 UTC) #28
Bobby Powers
7 years, 8 months ago (2013-04-08 22:01:21 UTC) #29
Sorry for being absent - im in the middle of moving and starting a new
job.  I will have bandwidth to look at this tomorrow or wednesday
On Apr 1, 2013 1:34 PM, <erg@chromium.org> wrote:

> On 2013/03/30 03:13:59, Bobby Powers wrote:
>
>> On 2013/03/29 20:18:34, cpu wrote:
>> > Note that is change dchecks on windows if you are not in the new menu
>> style
>> > experiment.
>> >
>> > It dchecks because CommonThemeGetSystemColor is not used and therefore
>> we
>>
> hit
>
>> > NOTREACHED in the switch statement of
>> >
>> > NativeThemeAura::**GetSystemColor(..)
>> >
>> > Because some colors are no longer defined on Windows.
>> >
>> > I fixed by always using the new style menu if the build is Aura.
>>
>
>  hi cpu,
>>
>
>  Unfortunately I don't think I understand your point.  I didn't remove any
>> dchecks, so we should still get the same behavior?  I must admit the logic
>> around the new menu style experiment if statements did somewhat confuse
>> me, so
>>
> I
>
>> certainly could have made a mistake.  If I did mess something up, I am
>> happy
>>
> to
>
>> promptly address it, once I understand the issue.
>>
>
> IIUC, it was hitting the NOTREACHED() at the end of the giant switch
> statement
> in NativeThemeWin::**GetSystemColor() because sometimes
> IsNewMenuStyleEnabled()
> returned false on Windows.
>
>
https://chromiumcodereview.**appspot.com/12483006/<https://chromiumcodereview...
>

Powered by Google App Engine
This is Rietveld 408576698