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

Unified Diff: ui/views/border.h

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: ui/views/border.h
===================================================================
--- ui/views/border.h (revision 236640)
+++ ui/views/border.h (working copy)
@@ -68,9 +68,17 @@
// Renders the border for the specified view.
virtual void Paint(const View& view, gfx::Canvas* canvas) = 0;
- // Sets the specified insets to the the border insets.
+ // Returns the border insets.
virtual gfx::Insets GetInsets() const = 0;
+ // Returns the minimum size this border requires. Note that this may not be
msw 2013/11/22 18:00:25 Would it make sense to have the default Border::Ge
Peter Kasting 2013/11/22 22:07:55 That's not the intent of GetMinimumSize() from Bor
+ // the same as the insets. For example, a Border may paint images to draw
+ // some graphical border around a view, and this would return the minimum size
+ // such that these images would not be clipped or overlapping -- but the
+ // insets may be larger or smaller, depending on how the view wanted its
+ // content laid out relative to these images.
+ virtual gfx::Size GetMinimumSize() const = 0;
+
// Manual RTTI for text buttons.
virtual TextButtonBorder* AsTextButtonBorder();
virtual const TextButtonBorder* AsTextButtonBorder() const;

Powered by Google App Engine
This is Rietveld 408576698