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

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

Issue 2190453002: Update CrOS logout button for MD. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix override Created 4 years, 4 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
« no previous file with comments | « ui/views/controls/button/label_button.cc ('k') | ui/views/controls/button/md_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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_MD_TEXT_BUTTON_H_ 5 #ifndef UI_VIEWS_CONTROLS_BUTTON_MD_TEXT_BUTTON_H_
6 #define UI_VIEWS_CONTROLS_BUTTON_MD_TEXT_BUTTON_H_ 6 #define UI_VIEWS_CONTROLS_BUTTON_MD_TEXT_BUTTON_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/optional.h" 10 #include "base/optional.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 // LabelButton: 44 // LabelButton:
45 void Layout() override; 45 void Layout() override;
46 void OnFocus() override; 46 void OnFocus() override;
47 void OnBlur() override; 47 void OnBlur() override;
48 void OnNativeThemeChanged(const ui::NativeTheme* theme) override; 48 void OnNativeThemeChanged(const ui::NativeTheme* theme) override;
49 std::unique_ptr<views::InkDropHighlight> CreateInkDropHighlight() 49 std::unique_ptr<views::InkDropHighlight> CreateInkDropHighlight()
50 const override; 50 const override;
51 SkColor GetInkDropBaseColor() const override; 51 SkColor GetInkDropBaseColor() const override;
52 bool ShouldShowInkDropForFocus() const override; 52 bool ShouldShowInkDropForFocus() const override;
53 void SetEnabledTextColors(SkColor color) override; 53 void SetEnabledTextColors(SkColor color) override;
54 void AdjustFontSize(int size_delta) override;
54 void UpdateStyleToIndicateDefaultStatus() override; 55 void UpdateStyleToIndicateDefaultStatus() override;
55 56
57 protected:
58 // LabelButton:
59 void SetFontList(const gfx::FontList& font_list) override;
60
56 private: 61 private:
57 MdTextButton(ButtonListener* listener); 62 MdTextButton(ButtonListener* listener);
58 ~MdTextButton() override; 63 ~MdTextButton() override;
59 64
65 void UpdatePaddingForFont();
60 void UpdateColors(); 66 void UpdateColors();
61 67
62 // The MD-style focus ring. This is not done via a FocusPainter 68 // The MD-style focus ring. This is not done via a FocusPainter
63 // because it needs to paint to a layer so it can extend beyond the bounds of 69 // because it needs to paint to a layer so it can extend beyond the bounds of
64 // |this|. 70 // |this|.
65 internal::MdFocusRing* focus_ring_; 71 internal::MdFocusRing* focus_ring_;
66 72
67 // True if this button uses call-to-action styling. 73 // True if this button uses call-to-action styling.
68 bool is_cta_; 74 bool is_cta_;
69 75
70 // When set, this provides the background color. 76 // When set, this provides the background color.
71 base::Optional<SkColor> bg_color_override_; 77 base::Optional<SkColor> bg_color_override_;
72 78
73 DISALLOW_COPY_AND_ASSIGN(MdTextButton); 79 DISALLOW_COPY_AND_ASSIGN(MdTextButton);
74 }; 80 };
75 81
76 } // namespace views 82 } // namespace views
77 83
78 #endif // UI_VIEWS_CONTROLS_BUTTON_MD_TEXT_BUTTON_H_ 84 #endif // UI_VIEWS_CONTROLS_BUTTON_MD_TEXT_BUTTON_H_
OLDNEW
« no previous file with comments | « ui/views/controls/button/label_button.cc ('k') | ui/views/controls/button/md_text_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698