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

Unified Diff: chrome/browser/ui/views/profiles/win10_native_avatar_button.cc

Issue 2833363002: Add GetCaptionButtonHeightInDIPs() method (Closed)
Patch Set: GetCaptionButtonHeightInDIPs now returns (SM_CYSIZE+SM_CYSIZEFRAME)/primary_device_scale Created 3 years, 8 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/profiles/win10_native_avatar_button.cc
diff --git a/chrome/browser/ui/views/profiles/win10_native_avatar_button.cc b/chrome/browser/ui/views/profiles/win10_native_avatar_button.cc
index 94fe951eee170f5a24094fd6012d7bc9c36650a8..82a1a0b79e57a94440464eb2e11aba262eb2be9b 100644
--- a/chrome/browser/ui/views/profiles/win10_native_avatar_button.cc
+++ b/chrome/browser/ui/views/profiles/win10_native_avatar_button.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/ui/views/profiles/win10_native_avatar_button.h"
#include "chrome/app/vector_icons/vector_icons.h"
+#include "chrome/browser/ui/views/frame/minimize_button_metrics_win.h"
#include "chrome/browser/ui/views/tabs/tab_strip.h"
#include "ui/gfx/paint_vector_icon.h"
#include "ui/views/animation/flood_fill_ink_drop_ripple.h"
@@ -51,8 +52,7 @@ gfx::Size Win10NativeAvatarButton::GetPreferredSize() const {
gfx::Size ps = views::MenuButton::GetPreferredSize();
ps.set_width(
std::min(std::max(ps.width(), kButtonMinWidth), kButtonMaxWidth));
- // TODO(emx): get the proper height here - see http://crrev/2833363002
- ps.set_height(30);
+ ps.set_height(MinimizeButtonMetrics::GetCaptionButtonHeightInDIPs());
return ps;
}

Powered by Google App Engine
This is Rietveld 408576698