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

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

Issue 9101004: Factor more colors into NativeTheme. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 8 years, 11 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
« no previous file with comments | « ui/gfx/native_theme_win.cc ('k') | ui/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) 2011 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_TEXT_BUTTON_H_ 5 #ifndef UI_VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_
6 #define UI_VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_ 6 #define UI_VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 enum PaintButtonMode { PB_NORMAL, PB_FOR_DRAG }; 200 enum PaintButtonMode { PB_NORMAL, PB_FOR_DRAG };
201 virtual void PaintButton(gfx::Canvas* canvas, PaintButtonMode mode); 201 virtual void PaintButton(gfx::Canvas* canvas, PaintButtonMode mode);
202 202
203 // Overridden from View: 203 // Overridden from View:
204 virtual gfx::Size GetPreferredSize() OVERRIDE; 204 virtual gfx::Size GetPreferredSize() OVERRIDE;
205 virtual gfx::Size GetMinimumSize() OVERRIDE; 205 virtual gfx::Size GetMinimumSize() OVERRIDE;
206 virtual int GetHeightForWidth(int w) OVERRIDE; 206 virtual int GetHeightForWidth(int w) OVERRIDE;
207 virtual void OnEnabledChanged() OVERRIDE; 207 virtual void OnEnabledChanged() OVERRIDE;
208 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; 208 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
209 209
210 // Text colors.
211 static const SkColor kEnabledColor;
212 static const SkColor kHighlightColor;
213 static const SkColor kDisabledColor;
214 static const SkColor kHoverColor;
215
216 // Returns views/TextButton. 210 // Returns views/TextButton.
217 virtual std::string GetClassName() const OVERRIDE; 211 virtual std::string GetClassName() const OVERRIDE;
218 212
219 protected: 213 protected:
220 TextButtonBase(ButtonListener* listener, const string16& text); 214 TextButtonBase(ButtonListener* listener, const string16& text);
221 215
222 // Called when enabled or disabled state changes, or the colors for those 216 // Called when enabled or disabled state changes, or the colors for those
223 // states change. 217 // states change.
224 virtual void UpdateColor(); 218 virtual void UpdateColor();
225 219
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 // Overridden from TextButton: 416 // Overridden from TextButton:
423 virtual void GetExtraParams( 417 virtual void GetExtraParams(
424 gfx::NativeTheme::ExtraParams* params) const OVERRIDE; 418 gfx::NativeTheme::ExtraParams* params) const OVERRIDE;
425 419
426 DISALLOW_COPY_AND_ASSIGN(NativeTextButton); 420 DISALLOW_COPY_AND_ASSIGN(NativeTextButton);
427 }; 421 };
428 422
429 } // namespace views 423 } // namespace views
430 424
431 #endif // UI_VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_ 425 #endif // UI_VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_
OLDNEW
« no previous file with comments | « ui/gfx/native_theme_win.cc ('k') | ui/views/controls/button/text_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698