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

Unified Diff: chrome/browser/ui/views/toolbar/wrench_menu.cc

Issue 82483003: Add GetMinimumSize() for Borders, and make LabelButton auto-size to at least as (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 1 month 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 | « chrome/browser/ui/views/frame/app_non_client_frame_view_ash.cc ('k') | ui/views/border.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/toolbar/wrench_menu.cc
===================================================================
--- chrome/browser/ui/views/toolbar/wrench_menu.cc (revision 236640)
+++ chrome/browser/ui/views/toolbar/wrench_menu.cc (working copy)
@@ -141,6 +141,12 @@
return insets_;
}
+ virtual gfx::Size GetMinimumSize() const OVERRIDE {
+ // This size is sufficient for MenuButtonBackground::Paint() to draw any of
+ // the button types.
+ return gfx::Size(4, 4);
+ }
+
private:
// The horizontal padding dependent on the layout.
const int horizontal_padding_;
@@ -207,6 +213,8 @@
const SkColor background = BackgroundColor(view, state);
const SkColor border = BorderColor(view, state);
switch (TypeAdjustedForRTL()) {
+ // TODO(pkasting): Why don't all the following use SkPaths with rounded
+ // corners?
case LEFT_BUTTON:
canvas->FillRect(gfx::Rect(1, 1, w, h - 2), background);
canvas->FillRect(gfx::Rect(2, 0, w, 1), border);
« no previous file with comments | « chrome/browser/ui/views/frame/app_non_client_frame_view_ash.cc ('k') | ui/views/border.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698