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

Unified Diff: ui/views/controls/button/md_text_button.h

Issue 1800973002: MD text buttons - implement focus ring. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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: ui/views/controls/button/md_text_button.h
diff --git a/ui/views/controls/button/md_text_button.h b/ui/views/controls/button/md_text_button.h
index 605f93f229e4c204e63853c0c2ea8d58a19fb330..10a9e3a57ac90a1b4e785ac7b65c24f1d885f5fb 100644
--- a/ui/views/controls/button/md_text_button.h
+++ b/ui/views/controls/button/md_text_button.h
@@ -20,15 +20,26 @@ class VIEWS_EXPORT MdTextButton : public LabelButton {
const base::string16& text);
// LabelButton:
+ void Layout() override;
SkColor GetInkDropBaseColor() const override;
void SetText(const base::string16& text) override;
+ protected:
+ // LabelButton:
+ void OnFocus() override;
+ void OnBlur() override;
+
private:
MdTextButton(ButtonListener* listener);
~MdTextButton() override;
ButtonInkDropDelegate ink_drop_delegate_;
+ // A child view to draw the focus ring. This is not done via a FocusPainter
+ // because it needs to paint to a layer so it can extend beyond the bounds of
+ // |this|.
+ views::View* focus_ring_;
+
DISALLOW_COPY_AND_ASSIGN(MdTextButton);
};

Powered by Google App Engine
This is Rietveld 408576698