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

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

Issue 199050: Wires up drag and drop for bookmark menus and cleans up a couple of... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 3 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
Index: views/controls/menu/menu_scroll_view_container.cc
===================================================================
--- views/controls/menu/menu_scroll_view_container.cc (revision 25647)
+++ views/controls/menu/menu_scroll_view_container.cc (working copy)
@@ -79,8 +79,9 @@
}
virtual void Paint(gfx::Canvas* canvas) {
+ const MenuConfig& config = MenuConfig::instance();
+
#if defined(OS_WIN)
- const MenuConfig& config = MenuConfig::instance();
HDC dc = canvas->beginPlatformPaint();
// The background.
@@ -88,7 +89,13 @@
NativeTheme::instance()->PaintMenuItemBackground(
NativeTheme::MENU, dc, MENU_POPUPITEM, MPI_NORMAL, false,
&item_bounds);
+ canvas->endPlatformPaint();
+ SkColor arrow_color = color_utils::GetSysSkColor(COLOR_MENUTEXT);
+#else
+ SkColor arrow_color = SK_ColorBLACK;
+#endif
+
// Then the arrow.
int x = width() / 2;
int y = (height() - config.scroll_arrow_height) / 2;
@@ -97,14 +104,8 @@
delta_y = -1;
y += config.scroll_arrow_height;
}
- SkColor arrow_color = color_utils::GetSysSkColor(COLOR_MENUTEXT);
for (int i = 0; i < config.scroll_arrow_height; ++i, --x, y += delta_y)
canvas->FillRectInt(arrow_color, x, y, (i * 2) + 1, 1);
-
- canvas->endPlatformPaint();
-#else
- NOTIMPLEMENTED();
-#endif
}
private:

Powered by Google App Engine
This is Rietveld 408576698