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

Unified Diff: ui/gfx/screen_win.cc

Issue 12398019: Set the scale factor for the display on Windows when in high-DPI mode. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix bounds. Created 7 years, 10 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/gfx/display.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/screen_win.cc
diff --git a/ui/gfx/screen_win.cc b/ui/gfx/screen_win.cc
index f17fbc4a3935e9a378e8cac37f24d92f9813d8fb..3199baae53311be19fd34bc58040faaa1554e11d 100644
--- a/ui/gfx/screen_win.cc
+++ b/ui/gfx/screen_win.cc
@@ -7,6 +7,7 @@
#include <windows.h>
#include "base/logging.h"
+#include "ui/base/win/dpi.h"
#include "ui/gfx/display.h"
namespace {
@@ -20,8 +21,10 @@ MONITORINFO GetMonitorInfoForMonitor(HMONITOR monitor) {
gfx::Display GetDisplay(MONITORINFO& monitor_info) {
// TODO(oshima): Implement ID and Observer.
- gfx::Display display(0, gfx::Rect(monitor_info.rcMonitor));
+ gfx::Rect bounds = gfx::Rect(monitor_info.rcMonitor);
+ gfx::Display display(0, bounds);
display.set_work_area(gfx::Rect(monitor_info.rcWork));
+ display.SetScaleAndBounds(ui::win::GetDeviceScaleFactor(), bounds);
return display;
}
« no previous file with comments | « ui/gfx/display.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698