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

Side by Side Diff: trunk/src/ui/views/controls/button/label_button.h

Issue 188893003: Revert 255091 "linux_aura: Fix all instances of LabelButton sizing." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
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 #ifndef UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ 5 #ifndef UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_
6 #define UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ 6 #define UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "third_party/skia/include/core/SkColor.h" 10 #include "third_party/skia/include/core/SkColor.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 // Set the elide behavior of this button. 54 // Set the elide behavior of this button.
55 void SetElideBehavior(Label::ElideBehavior elide_behavior); 55 void SetElideBehavior(Label::ElideBehavior elide_behavior);
56 56
57 // Get or set the horizontal alignment used for the button; reversed in RTL. 57 // Get or set the horizontal alignment used for the button; reversed in RTL.
58 // The optional image will lead the text, unless the button is right-aligned. 58 // The optional image will lead the text, unless the button is right-aligned.
59 gfx::HorizontalAlignment GetHorizontalAlignment() const; 59 gfx::HorizontalAlignment GetHorizontalAlignment() const;
60 void SetHorizontalAlignment(gfx::HorizontalAlignment alignment); 60 void SetHorizontalAlignment(gfx::HorizontalAlignment alignment);
61 61
62 // Call set_min_size(gfx::Size()) to clear the monotonically increasing size. 62 // Call set_min_size(gfx::Size()) to clear the monotonically increasing size.
63 void set_min_size(const gfx::Size& min_size) { min_size_ = min_size; } 63 void set_min_size(const gfx::Size& min_size) { min_size_ = min_size; }
64 void set_min_width(const int min_width) { min_size_.set_width(min_width); }
64 void set_max_size(const gfx::Size& max_size) { max_size_ = max_size; } 65 void set_max_size(const gfx::Size& max_size) { max_size_ = max_size; }
65 66
66 // Get or set the option to handle the return key; false by default. 67 // Get or set the option to handle the return key; false by default.
67 bool is_default() const { return is_default_; } 68 bool is_default() const { return is_default_; }
68 void SetIsDefault(bool is_default); 69 void SetIsDefault(bool is_default);
69 70
70 // Get or set the button's overall style; the default is |STYLE_TEXTBUTTON|. 71 // Get or set the button's overall style; the default is |STYLE_TEXTBUTTON|.
71 ButtonStyle style() const { return style_; } 72 ButtonStyle style() const { return style_; }
72 void SetStyle(ButtonStyle style); 73 void SetStyle(ButtonStyle style);
73 74
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 ButtonStyle style_; 158 ButtonStyle style_;
158 159
159 scoped_ptr<Painter> focus_painter_; 160 scoped_ptr<Painter> focus_painter_;
160 161
161 DISALLOW_COPY_AND_ASSIGN(LabelButton); 162 DISALLOW_COPY_AND_ASSIGN(LabelButton);
162 }; 163 };
163 164
164 } // namespace views 165 } // namespace views
165 166
166 #endif // UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ 167 #endif // UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_
OLDNEW
« no previous file with comments | « trunk/src/chrome/browser/ui/views/fullscreen_exit_bubble_views.cc ('k') | trunk/src/ui/views/window/dialog_client_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698