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

Unified Diff: mash/login/login.cc

Issue 2357363002: Update a few STYLE_BUTTON buttons in mash. (Closed)
Patch Set: qualify with namespace Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mash/example/window_type_launcher/window_type_launcher.cc ('k') | mash/screenlock/screenlock.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mash/login/login.cc
diff --git a/mash/login/login.cc b/mash/login/login.cc
index c9297fcc1edbad92482086fccd7ecda01263c201..4a5cb3f23338f1066652dd4c1594de50c16288e7 100644
--- a/mash/login/login.cc
+++ b/mash/login/login.cc
@@ -21,7 +21,7 @@
#include "services/ui/public/cpp/property_type_converters.h"
#include "services/ui/public/interfaces/user_access_manager.mojom.h"
#include "ui/views/background.h"
-#include "ui/views/controls/button/label_button.h"
+#include "ui/views/controls/button/md_text_button.h"
#include "ui/views/mus/aura_init.h"
#include "ui/views/mus/native_widget_mus.h"
#include "ui/views/mus/window_manager_connection.h"
@@ -66,12 +66,10 @@ class UI : public views::WidgetDelegateView,
user_id_1_("00000000-0000-4000-8000-000000000000"),
user_id_2_("00000000-0000-4000-8000-000000000001"),
login_button_1_(
- new views::LabelButton(this, base::ASCIIToUTF16("Timothy"))),
+ views::MdTextButton::Create(this, base::ASCIIToUTF16("Timothy"))),
login_button_2_(
- new views::LabelButton(this, base::ASCIIToUTF16("Jimothy"))) {
+ views::MdTextButton::Create(this, base::ASCIIToUTF16("Jimothy"))) {
set_background(views::Background::CreateSolidBackground(SK_ColorRED));
- login_button_1_->SetStyle(views::Button::STYLE_BUTTON);
- login_button_2_->SetStyle(views::Button::STYLE_BUTTON);
AddChildView(login_button_1_);
AddChildView(login_button_2_);
}
@@ -104,9 +102,9 @@ class UI : public views::WidgetDelegateView,
button_box.set_y((button_box.height() - ps1.height()) / 2);
login_button_1_->SetBounds(button_box.x(), button_box.y(), ps1.width(),
- ps1.height());
+ ps1.height());
login_button_2_->SetBounds(login_button_1_->bounds().right() + 10,
- button_box.y(), ps2.width(), ps2.height());
+ button_box.y(), ps2.width(), ps2.height());
}
// Overridden from views::ButtonListener:
@@ -124,8 +122,8 @@ class UI : public views::WidgetDelegateView,
shell::Connector* connector_;
const std::string user_id_1_;
const std::string user_id_2_;
- views::LabelButton* login_button_1_;
- views::LabelButton* login_button_2_;
+ views::MdTextButton* login_button_1_;
+ views::MdTextButton* login_button_2_;
std::unique_ptr<shell::Connection> mash_wm_connection_;
std::unique_ptr<views::WindowManagerConnection> window_manager_connection_;
« no previous file with comments | « mash/example/window_type_launcher/window_type_launcher.cc ('k') | mash/screenlock/screenlock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698