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

Issue 12041085: Fix menu corners: the menu background was being painted as a rect when in fact, (Closed)

Created:
7 years, 11 months ago by varunjain
Modified:
7 years, 10 months ago
Reviewers:
sky
CC:
chromium-reviews, tfarina
Visibility:
Public.

Description

Fix menu corners: the menu background was being painted as a rect when in fact, the border is a rounded rect. In this CL, I change the menu background painting code to paint a rounded rect instead. I also had to make the hosting widget transparent to avoid showing black background around the rounded corners. One more fix was needed: a selected item in a menu is indicated by painting a highlight colored rectangle background for that item. Due to this, selecting the topmost or the bottom-most item messes up the roundedness of the menu background. I fix this by simply adding a padding inside the menu so that the highlighted background of the item does not overlap the rounded corners of the menu. BUG=171703 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=179267

Patch Set 1 #

Patch Set 2 : patch #

Total comments: 2

Patch Set 3 : patch #

Total comments: 8

Patch Set 4 : patch #

Total comments: 14

Patch Set 5 : patch #

Patch Set 6 : patch #

Patch Set 7 : patch #

Patch Set 8 : patch #

Unified diffs Side-by-side diffs Delta from patch set Stats (+85 lines, -49 lines) Patch
M ui/native_theme/native_theme.h View 1 2 3 2 chunks +5 lines, -0 lines 0 comments Download
M ui/native_theme/native_theme_aura.h View 1 2 3 1 chunk +4 lines, -2 lines 0 comments Download
M ui/native_theme/native_theme_aura.cc View 1 2 3 2 chunks +23 lines, -3 lines 0 comments Download
M ui/native_theme/native_theme_base.h View 1 2 3 1 chunk +4 lines, -2 lines 0 comments Download
M ui/native_theme/native_theme_base.cc View 1 2 3 2 chunks +5 lines, -3 lines 0 comments Download
M ui/views/controls/menu/menu_config.h View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M ui/views/controls/menu/menu_config.cc View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M ui/views/controls/menu/menu_config_views.cc View 1 2 3 4 5 6 2 chunks +9 lines, -0 lines 0 comments Download
M ui/views/controls/menu/menu_host.cc View 1 2 3 4 5 6 1 chunk +8 lines, -7 lines 0 comments Download
M ui/views/controls/menu/menu_scroll_view_container.cc View 1 2 3 4 5 6 7 3 chunks +15 lines, -10 lines 0 comments Download
M ui/views/round_rect_painter.h View 1 2 3 4 5 1 chunk +2 lines, -4 lines 0 comments Download
M ui/views/round_rect_painter.cc View 1 2 3 4 5 2 chunks +5 lines, -17 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
varunjain
7 years, 11 months ago (2013-01-24 22:39:04 UTC) #1
sky
Hold off on this until we hear back from Sabestian. Round rects are problematic on ...
7 years, 11 months ago (2013-01-24 22:49:44 UTC) #2
sky
Did you want to update this based on Sebastien's feedback?
7 years, 11 months ago (2013-01-25 00:57:30 UTC) #3
varunjain
Changed according to Sebastien's feedback. PTAL. https://codereview.chromium.org/12041085/diff/2001/ui/views/controls/menu/menu_scroll_view_container.cc File ui/views/controls/menu/menu_scroll_view_container.cc (right): https://codereview.chromium.org/12041085/diff/2001/ui/views/controls/menu/menu_scroll_view_container.cc#newcode263 ui/views/controls/menu/menu_scroll_view_container.cc:263: On 2013/01/24 22:49:44, ...
7 years, 11 months ago (2013-01-25 15:58:07 UTC) #4
sky
https://codereview.chromium.org/12041085/diff/8001/ui/native_theme/native_theme_aura.cc File ui/native_theme/native_theme_aura.cc (right): https://codereview.chromium.org/12041085/diff/8001/ui/native_theme/native_theme_aura.cc#newcode17 ui/native_theme/native_theme_aura.cc:17: #include "ui/views/controls/menu/menu_config.h" ui shouldn't depend upon views like this. ...
7 years, 11 months ago (2013-01-25 16:10:51 UTC) #5
varunjain
https://codereview.chromium.org/12041085/diff/8001/ui/native_theme/native_theme_aura.cc File ui/native_theme/native_theme_aura.cc (right): https://codereview.chromium.org/12041085/diff/8001/ui/native_theme/native_theme_aura.cc#newcode17 ui/native_theme/native_theme_aura.cc:17: #include "ui/views/controls/menu/menu_config.h" On 2013/01/25 16:10:52, sky wrote: > ui ...
7 years, 11 months ago (2013-01-25 18:50:40 UTC) #6
sky
https://codereview.chromium.org/12041085/diff/10003/ui/views/controls/menu/menu_config.h File ui/views/controls/menu/menu_config.h (right): https://codereview.chromium.org/12041085/diff/10003/ui/views/controls/menu/menu_config.h#newcode131 ui/views/controls/menu/menu_config.h:131: int corner_radius; Add description. https://codereview.chromium.org/12041085/diff/10003/ui/views/controls/menu/menu_host.cc File ui/views/controls/menu/menu_host.cc (right): https://codereview.chromium.org/12041085/diff/10003/ui/views/controls/menu/menu_host.cc#newcode40 ...
7 years, 11 months ago (2013-01-25 20:30:24 UTC) #7
varunjain
https://codereview.chromium.org/12041085/diff/10003/ui/views/controls/menu/menu_config.h File ui/views/controls/menu/menu_config.h (right): https://codereview.chromium.org/12041085/diff/10003/ui/views/controls/menu/menu_config.h#newcode131 ui/views/controls/menu/menu_config.h:131: int corner_radius; On 2013/01/25 20:30:24, sky wrote: > Add ...
7 years, 11 months ago (2013-01-25 22:57:29 UTC) #8
sky
https://codereview.chromium.org/12041085/diff/10003/ui/views/controls/menu/menu_host.cc File ui/views/controls/menu/menu_host.cc (right): https://codereview.chromium.org/12041085/diff/10003/ui/views/controls/menu/menu_host.cc#newcode40 ui/views/controls/menu/menu_host.cc:40: const MenuConfig& menu_config = submenu_->GetMenuItem()->GetMenuConfig(); On 2013/01/25 22:57:29, varunjain ...
7 years, 11 months ago (2013-01-25 23:43:18 UTC) #9
varunjain
https://codereview.chromium.org/12041085/diff/10003/ui/views/controls/menu/menu_host.cc File ui/views/controls/menu/menu_host.cc (right): https://codereview.chromium.org/12041085/diff/10003/ui/views/controls/menu/menu_host.cc#newcode40 ui/views/controls/menu/menu_host.cc:40: const MenuConfig& menu_config = submenu_->GetMenuItem()->GetMenuConfig(); On 2013/01/25 23:43:18, sky ...
7 years, 10 months ago (2013-01-28 20:58:01 UTC) #10
varunjain
Hi Scott, Done according to your comment. PTAL. On 2013/01/28 20:58:01, varunjain wrote: > https://codereview.chromium.org/12041085/diff/10003/ui/views/controls/menu/menu_host.cc ...
7 years, 10 months ago (2013-01-28 22:36:34 UTC) #11
sky
LGTM
7 years, 10 months ago (2013-01-28 22:55:15 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/varunjain@chromium.org/12041085/23015
7 years, 10 months ago (2013-01-28 23:00:59 UTC) #13
commit-bot: I haz the power
Failed to apply patch for ui/views/controls/menu/menu_scroll_view_container.cc: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years, 10 months ago (2013-01-28 23:01:01 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/varunjain@chromium.org/12041085/26002
7 years, 10 months ago (2013-01-28 23:24:35 UTC) #15
commit-bot: I haz the power
7 years, 10 months ago (2013-01-29 02:31:14 UTC) #16
Message was sent while issue was closed.
Change committed as 179267

Powered by Google App Engine
This is Rietveld 408576698