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

Unified Diff: chrome/browser/ui/views/bar_control_button.cc

Issue 1750403005: [MD] some tweaks to download shelf (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: explicit Created 4 years, 9 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 | chrome/browser/ui/views/download/download_item_view_md.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/bar_control_button.cc
diff --git a/chrome/browser/ui/views/bar_control_button.cc b/chrome/browser/ui/views/bar_control_button.cc
index 9d472bf19430c9ea26dbba7b64a552a7e8f5e247..eecd5186b365e18fd90fc46186759b24c171021b 100644
--- a/chrome/browser/ui/views/bar_control_button.cc
+++ b/chrome/browser/ui/views/bar_control_button.cc
@@ -23,6 +23,8 @@ BarControlButton::BarControlButton(views::ButtonListener* listener)
ink_drop_delegate_(new views::ButtonInkDropDelegate(this, this)) {
set_ink_drop_delegate(ink_drop_delegate_.get());
set_has_ink_drop_action_on_click(true);
+ SetImageAlignment(views::ImageButton::ALIGN_CENTER,
+ views::ImageButton::ALIGN_MIDDLE);
}
BarControlButton::~BarControlButton() {}
@@ -33,11 +35,11 @@ void BarControlButton::SetIcon(
id_ = id;
get_text_color_callback_ = get_text_color_callback;
- SetBorder(views::Border::CreateEmptyBorder(
- kButtonExtraTouchSize, kButtonExtraTouchSize, kButtonExtraTouchSize,
- kButtonExtraTouchSize));
- SetImageAlignment(views::ImageButton::ALIGN_CENTER,
- views::ImageButton::ALIGN_MIDDLE);
+ if (!border()) {
+ SetBorder(views::Border::CreateEmptyBorder(
+ kButtonExtraTouchSize, kButtonExtraTouchSize, kButtonExtraTouchSize,
+ kButtonExtraTouchSize));
+ }
}
void BarControlButton::OnThemeChanged() {
« no previous file with comments | « no previous file | chrome/browser/ui/views/download/download_item_view_md.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698