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

Unified Diff: chrome/browser/ui/views/download/download_shelf_view.cc

Issue 1817253003: [MD] Use same focus ring on BarControlButton as MdTextButton. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update docs 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 | « chrome/browser/ui/views/bar_control_button.cc ('k') | chrome/browser/ui/views/find_bar_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/download/download_shelf_view.cc
diff --git a/chrome/browser/ui/views/download/download_shelf_view.cc b/chrome/browser/ui/views/download/download_shelf_view.cc
index aedab020f3524042690c91208b5f2d360413c894..9fb5f3a1183ac4da60fb781b99bbb4e886ac2401 100644
--- a/chrome/browser/ui/views/download/download_shelf_view.cc
+++ b/chrome/browser/ui/views/download/download_shelf_view.cc
@@ -318,13 +318,9 @@ void DownloadShelfView::Layout() {
show_all_size.width(),
show_all_size.height());
next_x += show_all_size.width() + GetCloseAndLinkPadding();
- // If the window is maximized, we want to expand the hitbox of the close
- // button to the right and bottom to make it easier to click.
- bool is_maximized = browser_->window()->IsMaximized();
- int y = CenterPosition(close_button_size.height(), height());
- close_button_->SetBounds(next_x, y,
- is_maximized ? width() - next_x : close_button_size.width(),
- is_maximized ? height() - y : close_button_size.height());
+ close_button_->SizeToPreferredSize();
+ close_button_->SetPosition(
+ gfx::Point(next_x, CenterPosition(close_button_->height(), height())));
if (show_link_only) {
// Let's hide all the items.
for (auto ri = download_views_.rbegin(); ri != download_views_.rend(); ++ri)
« no previous file with comments | « chrome/browser/ui/views/bar_control_button.cc ('k') | chrome/browser/ui/views/find_bar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698