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

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

Issue 23534062: Fix Views blue button's blurry text on Aura. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make LabelButton::ResetColorsFromNativeTheme virtual; override for BlueButton. Created 7 years, 3 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/views/controls/button/blue_button.cc ('k') | ui/views/controls/button/label_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) 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 virtual gfx::Size GetPreferredSize() OVERRIDE; 66 virtual gfx::Size GetPreferredSize() OVERRIDE;
67 virtual void Layout() OVERRIDE; 67 virtual void Layout() OVERRIDE;
68 virtual const char* GetClassName() const OVERRIDE; 68 virtual const char* GetClassName() const OVERRIDE;
69 69
70 protected: 70 protected:
71 Label* label() const { return label_; } 71 Label* label() const { return label_; }
72 72
73 // Fill |params| with information about the button. 73 // Fill |params| with information about the button.
74 virtual void GetExtraParams(ui::NativeTheme::ExtraParams* params) const; 74 virtual void GetExtraParams(ui::NativeTheme::ExtraParams* params) const;
75 75
76 // Resets colors from the NativeTheme, explicitly set colors are unchanged.
77 virtual void ResetColorsFromNativeTheme();
78
76 // Updates the image view to contain the appropriate button state image. 79 // Updates the image view to contain the appropriate button state image.
77 void UpdateImage(); 80 void UpdateImage();
78 81
79 private: 82 private:
80 FRIEND_TEST_ALL_PREFIXES(LabelButtonTest, Init); 83 FRIEND_TEST_ALL_PREFIXES(LabelButtonTest, Init);
81 FRIEND_TEST_ALL_PREFIXES(LabelButtonTest, Label); 84 FRIEND_TEST_ALL_PREFIXES(LabelButtonTest, Label);
82 FRIEND_TEST_ALL_PREFIXES(LabelButtonTest, Image); 85 FRIEND_TEST_ALL_PREFIXES(LabelButtonTest, Image);
83 FRIEND_TEST_ALL_PREFIXES(LabelButtonTest, LabelAndImage); 86 FRIEND_TEST_ALL_PREFIXES(LabelButtonTest, LabelAndImage);
84 FRIEND_TEST_ALL_PREFIXES(LabelButtonTest, Font); 87 FRIEND_TEST_ALL_PREFIXES(LabelButtonTest, Font);
85 88
86 // Resets colors from the NativeTheme, explicitly set colors are unchanged.
87 void ResetColorsFromNativeTheme();
88
89 // Overridden from CustomButton: 89 // Overridden from CustomButton:
90 virtual void StateChanged() OVERRIDE; 90 virtual void StateChanged() OVERRIDE;
91 91
92 // Overridden from View: 92 // Overridden from View:
93 virtual void ChildPreferredSizeChanged(View* child) OVERRIDE; 93 virtual void ChildPreferredSizeChanged(View* child) OVERRIDE;
94 virtual void OnNativeThemeChanged(const ui::NativeTheme* theme) OVERRIDE; 94 virtual void OnNativeThemeChanged(const ui::NativeTheme* theme) OVERRIDE;
95 95
96 // Overridden from NativeThemeDelegate: 96 // Overridden from NativeThemeDelegate:
97 virtual ui::NativeTheme::Part GetThemePart() const OVERRIDE; 97 virtual ui::NativeTheme::Part GetThemePart() const OVERRIDE;
98 virtual gfx::Rect GetThemePaintRect() const OVERRIDE; 98 virtual gfx::Rect GetThemePaintRect() const OVERRIDE;
(...skipping 28 matching lines...) Expand all
127 127
128 // The button's overall style. 128 // The button's overall style.
129 ButtonStyle style_; 129 ButtonStyle style_;
130 130
131 DISALLOW_COPY_AND_ASSIGN(LabelButton); 131 DISALLOW_COPY_AND_ASSIGN(LabelButton);
132 }; 132 };
133 133
134 } // namespace views 134 } // namespace views
135 135
136 #endif // UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ 136 #endif // UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_
OLDNEW
« no previous file with comments | « ui/views/controls/button/blue_button.cc ('k') | ui/views/controls/button/label_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698