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

Unified Diff: chrome/browser/ui/views/frame/opaque_browser_frame_view.cc

Issue 2183103002: [Win] OBFV::GetIconSize() should return the value in dip unit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments 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: chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
diff --git a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
index fb16ee280d8dcbe3b93e7ed62a44d7b4e737b812..c4104c909dc2cd16e35132f528fab6f502cd6d06 100644
--- a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
@@ -42,6 +42,10 @@
#include "ui/views/controls/menu/menu_runner.h"
#endif
+#if defined(OS_WIN)
+#include "ui/display/win/dpi.h"
+#endif
+
using content::WebContents;
namespace {
@@ -50,11 +54,6 @@ namespace {
// 16 px at the end of each edge triggers diagonal resizing.
const int kResizeAreaCornerSize = 16;
-#if !defined(OS_WIN)
-// The icon never shrinks below 16 px on a side.
-const int kIconMinimumSize = 16;
-#endif
-
} // namespace
///////////////////////////////////////////////////////////////////////////////
@@ -351,8 +350,10 @@ int OpaqueBrowserFrameView::GetIconSize() 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);
#else
+ // The icon never shrinks below 16 px on a side.
+ const int kIconMinimumSize = 16;
return std::max(BrowserFrame::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