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

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

Issue 14646037: Enable the new dialog style by default; etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix LabelButton preferred size calculations; stack overflow for STYLE_BUTTON. Created 7 years, 7 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 "third_party/skia/include/core/SkColor.h" 9 #include "third_party/skia/include/core/SkColor.h"
10 #include "ui/gfx/font.h" 10 #include "ui/gfx/font.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 SkColor button_state_colors_[STATE_COUNT]; 107 SkColor button_state_colors_[STATE_COUNT];
108 108
109 // Used to track whether SetTextColor() has been invoked. 109 // Used to track whether SetTextColor() has been invoked.
110 bool explicitly_set_colors_[STATE_COUNT]; 110 bool explicitly_set_colors_[STATE_COUNT];
111 111
112 // |min_size_| increases monotonically with the preferred size. 112 // |min_size_| increases monotonically with the preferred size.
113 gfx::Size min_size_; 113 gfx::Size min_size_;
114 // |max_size_| may be set to clamp the preferred size. 114 // |max_size_| may be set to clamp the preferred size.
115 gfx::Size max_size_; 115 gfx::Size max_size_;
116 116
117 // A cached preferred size; used to avoid costly text size calculations.
118 gfx::Size cached_size_;
119
117 // Flag indicating default handling of the return key via an accelerator. 120 // Flag indicating default handling of the return key via an accelerator.
118 // Whether or not the button appears or behaves as the default button in its 121 // Whether or not the button appears or behaves as the default button in its
119 // current context; 122 // current context;
120 bool is_default_; 123 bool is_default_;
121 124
122 // The button's overall style. 125 // The button's overall style.
123 ButtonStyle style_; 126 ButtonStyle style_;
124 127
125 DISALLOW_COPY_AND_ASSIGN(LabelButton); 128 DISALLOW_COPY_AND_ASSIGN(LabelButton);
126 }; 129 };
127 130
128 } // namespace views 131 } // namespace views
129 132
130 #endif // UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ 133 #endif // UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698