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

Unified Diff: ui/gfx/native_theme_linux.cc

Issue 6490014: Make the size of menulists on Linux the same size as on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 10 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/gfx/native_theme_linux.h ('k') | webkit/glue/webthemeengine_impl_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/native_theme_linux.cc
diff --git a/ui/gfx/native_theme_linux.cc b/ui/gfx/native_theme_linux.cc
index 766b003db3049436b099dd6c2c347c441733e7e0..92a3f5b8fdcff3da75f35da977ef524795b55060 100644
--- a/ui/gfx/native_theme_linux.cc
+++ b/ui/gfx/native_theme_linux.cc
@@ -475,12 +475,14 @@ void NativeThemeLinux::PaintButton(skia::PlatformCanvas* canvas,
return;
}
- const int kBorderAlpha = state == kHovered ? 0x80 : 0x55;
- paint.setARGB(kBorderAlpha, 0, 0, 0);
- canvas->drawLine(rect.x() + 1, rect.y(), kRight - 1, rect.y(), paint);
- canvas->drawLine(kRight - 1, rect.y() + 1, kRight - 1, kBottom - 1, paint);
- canvas->drawLine(rect.x() + 1, kBottom - 1, kRight - 1, kBottom - 1, paint);
- canvas->drawLine(rect.x(), rect.y() + 1, rect.x(), kBottom - 1, paint);
+ if (button.has_border) {
+ const int kBorderAlpha = state == kHovered ? 0x80 : 0x55;
+ paint.setARGB(kBorderAlpha, 0, 0, 0);
+ canvas->drawLine(rect.x() + 1, rect.y(), kRight - 1, rect.y(), paint);
+ canvas->drawLine(kRight - 1, rect.y() + 1, kRight - 1, kBottom - 1, paint);
+ canvas->drawLine(rect.x() + 1, kBottom - 1, kRight - 1, kBottom - 1, paint);
+ canvas->drawLine(rect.x(), rect.y() + 1, rect.x(), kBottom - 1, paint);
+ }
paint.setColor(SK_ColorBLACK);
const int kLightEnd = state == kPressed ? 1 : 0;
@@ -607,6 +609,7 @@ void NativeThemeLinux::PaintMenuList(skia::PlatformCanvas* canvas,
const MenuListExtraParams& menu_list) {
ButtonExtraParams button = { 0 };
button.background_color = menu_list.background_color;
+ button.has_border = menu_list.has_border;
PaintButton(canvas, state, rect, button);
SkPaint paint;
« no previous file with comments | « ui/gfx/native_theme_linux.h ('k') | webkit/glue/webthemeengine_impl_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698