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

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
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 a
+ // CENTER_BUTTON.
msw 2013/11/22 18:00:25 nit: why is CENTER_BUTTON critical? What about the
Peter Kasting 2013/11/22 22:07:55 I actually think I meant SINGLE_BUTTON... I made t
+ return gfx::Size(4, 4);
+ }
+
private:
// The horizontal padding dependent on the layout.
const int horizontal_padding_;
@@ -207,6 +213,7 @@
const SkColor background = BackgroundColor(view, state);
const SkColor border = BorderColor(view, state);
switch (TypeAdjustedForRTL()) {
+ // Ugh, why don't all the following use SkPaths with rounded corners?
msw 2013/11/22 18:00:25 nit: fix it, file an issue, or make this a TODO.
Peter Kasting 2013/11/22 22:07:55 Done.
case LEFT_BUTTON:
canvas->FillRect(gfx::Rect(1, 1, w, h - 2), background);
canvas->FillRect(gfx::Rect(2, 0, w, 1), border);

Powered by Google App Engine
This is Rietveld 408576698