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

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

Issue 1525163004: First stab at MD text buttons (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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
« no previous file with comments | « ui/native_theme/native_theme.h ('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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef UI_VIEWS_CONTROLS_BUTTON_MD_TEXT_BUTTON_H_
6 #define UI_VIEWS_CONTROLS_BUTTON_MD_TEXT_BUTTON_H_
7
8 #include "base/memory/scoped_ptr.h"
9 #include "ui/views/controls/button/custom_button.h"
10
11 namespace gfx {
12 class RenderText;
13 }
14
15 namespace views {
16
17 // A button class that implements the Material Design text button spec.
18 class VIEWS_EXPORT MdTextButton : public CustomButton {
19 public:
20 MdTextButton(ButtonListener* listener, const base::string16& text);
21 ~MdTextButton() override;
22
23 // View:
24 void OnPaint(gfx::Canvas* canvas) override;
25 gfx::Size GetPreferredSize() const override;
26
27 private:
28 void UpdateColor();
29
30 scoped_ptr<gfx::RenderText> render_text_;
31
32 DISALLOW_COPY_AND_ASSIGN(MdTextButton);
33 };
34
35 } // namespace views
36
37 #endif // UI_VIEWS_CONTROLS_BUTTON_MD_TEXT_BUTTON_H_
OLDNEW
« no previous file with comments | « ui/native_theme/native_theme.h ('k') | ui/views/controls/button/md_text_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698