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

Unified Diff: ui/views/controls/menu/menu_scroll_view_container.cc

Issue 12041085: Fix menu corners: the menu background was being painted as a rect when in fact, (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/controls/menu/menu_scroll_view_container.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/menu/menu_scroll_view_container.cc
diff --git a/ui/views/controls/menu/menu_scroll_view_container.cc b/ui/views/controls/menu/menu_scroll_view_container.cc
index 1dedb82790be9e412c1e2b30ac2a4768b0236a9d..e854b600fadc3d952f00139eba6ef20d8a1a2684 100644
--- a/ui/views/controls/menu/menu_scroll_view_container.cc
+++ b/ui/views/controls/menu/menu_scroll_view_container.cc
@@ -26,6 +26,8 @@ namespace views {
namespace {
+static const int kBorderPadding = 1;
+
// MenuScrollButton ------------------------------------------------------------
// MenuScrollButton is used for the scroll buttons when not all menu items fit
@@ -251,6 +253,14 @@ void MenuScrollViewContainer::GetAccessibleState(
state->state = ui::AccessibilityTypes::STATE_FOCUSED;
}
+gfx::Insets MenuScrollViewContainer::GetInsets() const {
+ gfx::Insets insets = View::GetInsets();
+ insets += gfx::Insets(kBorderPadding, kBorderPadding, kBorderPadding,
+ kBorderPadding);
+ return insets;
+}
+
+
sky 2013/01/24 22:49:44 nit: remove whitespace.
varunjain 2013/01/25 15:58:07 Done.
void MenuScrollViewContainer::OnBoundsChanged(
const gfx::Rect& previous_bounds) {
gfx::Size content_pref = scroll_view_->GetContents()->GetPreferredSize();
« no previous file with comments | « ui/views/controls/menu/menu_scroll_view_container.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698