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

Unified Diff: ui/views/window/custom_frame_view.cc

Issue 2190593002: [Win] CustomFrameView::IconSize() should return the value in dip unit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/window/custom_frame_view.cc
diff --git a/ui/views/window/custom_frame_view.cc b/ui/views/window/custom_frame_view.cc
index 720091ec6244c42c7a82617dbb39a7ec6c87c9d1..7b24671f59d75ab31fc45859c41b05560571f8ed 100644
--- a/ui/views/window/custom_frame_view.cc
+++ b/ui/views/window/custom_frame_view.cc
@@ -31,6 +31,10 @@
#include "ui/views/window/window_resources.h"
#include "ui/views/window/window_shape.h"
+#if defined(OS_WIN)
+#include "ui/display/win/dpi.h"
+#endif
+
namespace views {
namespace {
@@ -304,7 +308,7 @@ int CustomFrameView::IconSize() const {
#if defined(OS_WIN)
// This metric scales up if either the titlebar height or the titlebar font
// size are increased.
- return GetSystemMetrics(SM_CYSMICON);
+ return display::win::GetSystemMetricsInDIP(SM_CYSMICON);
sky 2016/07/27 15:30:15 The conversion may vary between HWNDs. You should
#else
return std::max(GetTitleFontList().GetHeight(), kIconMinimumSize);
#endif
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698