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

Unified Diff: chrome/browser/ui/views/toolbar/back_button.cc

Issue 292153008: linux_aura: Fix the insets on LabelButtons. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add comments about where the smaller insets come from. Created 6 years, 7 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
Index: chrome/browser/ui/views/toolbar/back_button.cc
diff --git a/chrome/browser/ui/views/toolbar/back_button.cc b/chrome/browser/ui/views/toolbar/back_button.cc
index 8186b18dd49a19eb9f0a85c4b8c2ef40859236ae..a0df8f17e328a2c77cf433aa9bfcf9faa0c130d7 100644
--- a/chrome/browser/ui/views/toolbar/back_button.cc
+++ b/chrome/browser/ui/views/toolbar/back_button.cc
@@ -38,14 +38,13 @@ void BackButton::SetLeadingMargin(int margin) {
InvalidateLayout();
}
-scoped_ptr<views::Border> BackButton::CreateDefaultBorder() const {
+void BackButton::SetDefaultBorderInsets(views::LabelButtonBorder* border) {
+ ToolbarButton::SetDefaultBorderInsets(border);
+
// Adjust border insets to follow the margin change,
// which will be reflected in where the border is painted
// through |GetThemePaintRect|.
- scoped_ptr<views::LabelButtonBorder> border(
- new views::LabelButtonBorder(style()));
const gfx::Insets insets(border->GetInsets());
border->set_insets(gfx::Insets(insets.top(), insets.left() + margin_leading_,
insets.bottom(), insets.right()));
- return border.PassAs<views::Border>();
}

Powered by Google App Engine
This is Rietveld 408576698