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

Unified Diff: ui/base/win/dpi.cc

Issue 12684006: Correct title bar size for HiDPI Windows (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Corrected include ordering Created 7 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 | « ui/base/win/dpi.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/win/dpi.cc
diff --git a/ui/base/win/dpi.cc b/ui/base/win/dpi.cc
index 6c228858b5c3a42eb56b11df6f88b1213b1efc72..75d63bba3d48935827702617c54e05deb0f06e18 100644
--- a/ui/base/win/dpi.cc
+++ b/ui/base/win/dpi.cc
@@ -114,6 +114,11 @@ gfx::Size DIPToScreenSize(const gfx::Size& dip_size) {
return gfx::ToFlooredSize(gfx::ScaleSize(dip_size, GetDeviceScaleFactor()));
}
+int GetSystemMetricsInDIP(int metric) {
+ return static_cast<int>(GetSystemMetrics(metric) /
+ GetDeviceScaleFactor() + 0.5);
+}
+
double GetUndocumentedDPIScale() {
// TODO(girard): Remove this code when chrome is DPIAware.
static double scale = -1.0;
« no previous file with comments | « ui/base/win/dpi.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698