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

Side by Side Diff: views/controls/button/text_button.h

Issue 5071002: Add 1px black border for ChromeOS status button. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: change how common code is shared Created 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « gfx/canvas_skia_linux.cc ('k') | views/controls/button/text_button.cc » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_ 5 #ifndef VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_
6 #define VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_ 6 #define VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 // SetText. This method resets the cached maximum display size to the 135 // SetText. This method resets the cached maximum display size to the
136 // current size. 136 // current size.
137 void ClearMaxTextSize(); 137 void ClearMaxTextSize();
138 138
139 void set_max_width(int max_width) { max_width_ = max_width; } 139 void set_max_width(int max_width) { max_width_ = max_width; }
140 void SetFont(const gfx::Font& font); 140 void SetFont(const gfx::Font& font);
141 void SetEnabledColor(SkColor color); 141 void SetEnabledColor(SkColor color);
142 void SetDisabledColor(SkColor color); 142 void SetDisabledColor(SkColor color);
143 void SetHighlightColor(SkColor color); 143 void SetHighlightColor(SkColor color);
144 void SetHoverColor(SkColor color); 144 void SetHoverColor(SkColor color);
145 void SetTextHaloColor(SkColor color);
145 void SetNormalHasBorder(bool normal_has_border); 146 void SetNormalHasBorder(bool normal_has_border);
146 // Sets whether or not to show the hot and pushed states for the button icon 147 // Sets whether or not to show the hot and pushed states for the button icon
147 // (if present) in addition to the normal state. Defaults to true. 148 // (if present) in addition to the normal state. Defaults to true.
148 void SetShowMultipleIconStates(bool show_multiple_icon_states); 149 void SetShowMultipleIconStates(bool show_multiple_icon_states);
149 150
150 // Paint the button into the specified canvas. If |for_drag| is true, the 151 // Paint the button into the specified canvas. If |for_drag| is true, the
151 // function paints a drag image representation into the canvas. 152 // function paints a drag image representation into the canvas.
152 virtual void Paint(gfx::Canvas* canvas, bool for_drag); 153 virtual void Paint(gfx::Canvas* canvas, bool for_drag);
153 154
154 // Overridden from View: 155 // Overridden from View:
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 201
201 // Text color. 202 // Text color.
202 SkColor color_; 203 SkColor color_;
203 204
204 // State colors. 205 // State colors.
205 SkColor color_enabled_; 206 SkColor color_enabled_;
206 SkColor color_disabled_; 207 SkColor color_disabled_;
207 SkColor color_highlight_; 208 SkColor color_highlight_;
208 SkColor color_hover_; 209 SkColor color_hover_;
209 210
211 // An optional halo around text.
212 SkColor text_halo_color_;
213 bool has_text_halo_;
214
210 // An icon displayed with the text. 215 // An icon displayed with the text.
211 SkBitmap icon_; 216 SkBitmap icon_;
212 217
213 // An optional different version of the icon for hover state. 218 // An optional different version of the icon for hover state.
214 SkBitmap icon_hover_; 219 SkBitmap icon_hover_;
215 bool has_hover_icon_; 220 bool has_hover_icon_;
216 221
217 // An optional different version of the icon for pushed state. 222 // An optional different version of the icon for pushed state.
218 SkBitmap icon_pushed_; 223 SkBitmap icon_pushed_;
219 bool has_pushed_icon_; 224 bool has_pushed_icon_;
(...skipping 12 matching lines...) Expand all
232 237
233 // Space between icon and text. 238 // Space between icon and text.
234 int icon_text_spacing_; 239 int icon_text_spacing_;
235 240
236 DISALLOW_COPY_AND_ASSIGN(TextButton); 241 DISALLOW_COPY_AND_ASSIGN(TextButton);
237 }; 242 };
238 243
239 } // namespace views 244 } // namespace views
240 245
241 #endif // VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_ 246 #endif // VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_
OLDNEW
« no previous file with comments | « gfx/canvas_skia_linux.cc ('k') | views/controls/button/text_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698