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

Unified Diff: ui/views/controls/button/label_button.cc

Issue 2358913006: views: remove PlatformStyle::CreateLabelButtonBorder (Closed)
Patch Set: remove DialogButtonBorderMac too 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 | « ui/views/BUILD.gn ('k') | ui/views/style/mac/dialog_button_border_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/button/label_button.cc
diff --git a/ui/views/controls/button/label_button.cc b/ui/views/controls/button/label_button.cc
index c883169c6c1c7e74f8aea4ea66f17171ab032beb..68a347286166806eacd855ee7b0db6dac6a7733d 100644
--- a/ui/views/controls/button/label_button.cc
+++ b/ui/views/controls/button/label_button.cc
@@ -390,7 +390,15 @@ void LabelButton::EnableCanvasFlippingForRTLUI(bool flip) {
}
std::unique_ptr<LabelButtonBorder> LabelButton::CreateDefaultBorder() const {
- return PlatformStyle::CreateLabelButtonBorder(style());
+ if (!ui::MaterialDesignController::IsModeMaterial() ||
+ style_ != Button::STYLE_TEXTBUTTON) {
+ return base::MakeUnique<LabelButtonAssetBorder>(style_);
+ }
+ std::unique_ptr<LabelButtonBorder> border =
+ base::MakeUnique<LabelButtonBorder>();
+ border->set_insets(views::LabelButtonAssetBorder::GetDefaultInsetsForStyle(
+ style_));
+ return border;
}
void LabelButton::SetBorder(std::unique_ptr<Border> border) {
« no previous file with comments | « ui/views/BUILD.gn ('k') | ui/views/style/mac/dialog_button_border_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698