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

Side by Side Diff: ui/views/controls/focusable_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 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/views/controls/focusable_border.h ('k') | ui/views/shadow_border.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/views/controls/focusable_border.h" 5 #include "ui/views/controls/focusable_border.h"
6 6
7 #include "ui/gfx/canvas.h" 7 #include "ui/gfx/canvas.h"
8 #include "ui/gfx/insets.h" 8 #include "ui/gfx/insets.h"
9 #include "ui/gfx/skia_util.h" 9 #include "ui/gfx/skia_util.h"
10 #include "ui/native_theme/native_theme.h" 10 #include "ui/native_theme/native_theme.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 paint.setColor(color); 53 paint.setColor(color);
54 paint.setStrokeWidth(SkIntToScalar(2)); 54 paint.setStrokeWidth(SkIntToScalar(2));
55 55
56 canvas->DrawPath(path, paint); 56 canvas->DrawPath(path, paint);
57 } 57 }
58 58
59 gfx::Insets FocusableBorder::GetInsets() const { 59 gfx::Insets FocusableBorder::GetInsets() const {
60 return insets_; 60 return insets_;
61 } 61 }
62 62
63 gfx::Size FocusableBorder::GetMinimumSize() const {
64 return gfx::Size();
65 }
66
63 void FocusableBorder::SetInsets(int top, int left, int bottom, int right) { 67 void FocusableBorder::SetInsets(int top, int left, int bottom, int right) {
64 insets_.Set(top, left, bottom, right); 68 insets_.Set(top, left, bottom, right);
65 } 69 }
66 70
67 } // namespace views 71 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/focusable_border.h ('k') | ui/views/shadow_border.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698