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

Unified Diff: ui/views/shadow_border.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 | « ui/views/shadow_border.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/shadow_border.cc
===================================================================
--- ui/views/shadow_border.cc (revision 236640)
+++ ui/views/shadow_border.cc (working copy)
@@ -34,6 +34,8 @@
paint.setColor(SK_ColorTRANSPARENT);
paint.setStrokeJoin(SkPaint::kRound_Join);
gfx::Rect bounds(view.size());
+ // TODO(pkasting): This isn't right if one of the offsets is larger than
+ // (blur_ / 2).
bounds.Inset(gfx::Insets(blur_ / 2, blur_ / 2, blur_ / 2, blur_ / 2));
canvas->DrawRect(bounds, paint);
}
@@ -45,4 +47,8 @@
blur_ / 2 + horizontal_offset_);
}
+gfx::Size ShadowBorder::GetMinimumSize() const {
+ return gfx::Size(blur_, blur_);
+}
+
} // namespace views
« no previous file with comments | « ui/views/shadow_border.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698