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

Unified Diff: views/controls/link.h

Issue 8221027: Make views::Label and views::Link auto-color themselves to be readable over their background colo... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: views/controls/link.h
===================================================================
--- views/controls/link.h (revision 104769)
+++ views/controls/link.h (working copy)
@@ -46,37 +46,30 @@
// Overridden from Label:
virtual void SetFont(const gfx::Font& font) OVERRIDE;
- virtual void MakeReadableOverBackgroundColor(const SkColor& color) OVERRIDE;
- void SetHighlightedColor(const SkColor& color);
- void SetDisabledColor(const SkColor& color);
- void SetNormalColor(const SkColor& color);
+ virtual void SetEnabledColor(const SkColor& color) OVERRIDE;
+ void SetPressedColor(const SkColor& color);
static const char kViewClassName[];
private:
- // A highlighted link is clicked.
- void SetHighlighted(bool f);
+ void Init();
- // Make sure the label style matched the current state.
- void ValidateStyle();
+ void SetPressed(bool pressed);
- void Init();
+ void RecalculateFont();
LinkListener* listener_;
- // Whether the link is currently highlighted.
- bool highlighted_;
+ // Whether the link is currently pressed.
+ bool pressed_;
- // The color when the link is highlighted.
- SkColor highlighted_color_;
+ // The color when the link is neither pressed nor disabled.
+ SkColor requested_enabled_color_;
- // The color when the link is disabled.
- SkColor disabled_color_;
+ // The color when the link is pressed.
+ SkColor requested_pressed_color_;
- // The color when the link is neither highlighted nor disabled.
- SkColor normal_color_;
-
DISALLOW_COPY_AND_ASSIGN(Link);
};

Powered by Google App Engine
This is Rietveld 408576698