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

Unified Diff: ui/views/controls/separator.cc

Issue 1270783005: V1 of material design find in page bar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mvp Created 5 years, 4 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
Index: ui/views/controls/separator.cc
diff --git a/ui/views/controls/separator.cc b/ui/views/controls/separator.cc
index 9a9bbbdc881c4892648a69d5c28b29e349a2b153..e16346127ba4010be0e23670e856280dff926eda 100644
--- a/ui/views/controls/separator.cc
+++ b/ui/views/controls/separator.cc
@@ -44,9 +44,11 @@ void Separator::SetPreferredSize(int size) {
// Separator, View overrides:
gfx::Size Separator::GetPreferredSize() const {
- if (orientation_ == HORIZONTAL)
- return gfx::Size(width(), size_);
- return gfx::Size(size_, height());
+ gfx::Size size =
+ orientation_ == HORIZONTAL ? gfx::Size(1, size_) : gfx::Size(size_, 1);
+ gfx::Insets insets = GetInsets();
+ size.Enlarge(insets.width(), insets.height());
sky 2015/08/05 00:06:01 Your change here looks right, but how about landin
Evan Stade 2015/08/05 19:04:25 Done.
+ return size;
}
void Separator::GetAccessibleState(ui::AXViewState* state) {
« ui/gfx/vector_icons/find_close.icon ('K') | « ui/gfx/vector_icons/vector_icons.cc.template ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698