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

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

Issue 2358913006: views: remove PlatformStyle::CreateLabelButtonBorder (Closed)
Patch Set: 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 | « no previous file | ui/views/style/platform_style.h » ('j') | ui/views/style/platform_style.h » ('J')
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..b37b6759bc4a7e2c508dd3a5d466e69efd54c40d 100644
--- a/ui/views/controls/button/label_button.cc
+++ b/ui/views/controls/button/label_button.cc
@@ -390,7 +390,14 @@ void LabelButton::EnableCanvasFlippingForRTLUI(bool flip) {
}
std::unique_ptr<LabelButtonBorder> LabelButton::CreateDefaultBorder() const {
Evan Stade 2016/09/22 22:21:10 harmony should allow us to get rid of this complet
- return PlatformStyle::CreateLabelButtonBorder(style());
+ if (!ui::MaterialDesignController::IsModeMaterial() ||
+ style_ != Button::STYLE_TEXTBUTTON) {
+ return base::MakeUnique<LabelButtonAssetBorder>(style_);
+ }
+ std::unique_ptr<LabelButtonBorder> border(new views::LabelButtonBorder());
sky 2016/09/23 15:47:39 MakeUnique?
+ border->set_insets(views::LabelButtonAssetBorder::GetDefaultInsetsForStyle(
+ style_));
+ return border;
}
void LabelButton::SetBorder(std::unique_ptr<Border> border) {
« no previous file with comments | « no previous file | ui/views/style/platform_style.h » ('j') | ui/views/style/platform_style.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698