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

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

Issue 523183002: Merge to 2062: Force scales 125% and lower down to 100% (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2062
Patch Set: Created 6 years, 4 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/gfx/win/dpi.cc
diff --git a/ui/gfx/win/dpi.cc b/ui/gfx/win/dpi.cc
index e562a086c9a151018f78bbffc92adf177796d501..e93a38d8bd00cee34c1fae4fc8007d56709d6d57 100644
--- a/ui/gfx/win/dpi.cc
+++ b/ui/gfx/win/dpi.cc
@@ -134,6 +134,11 @@ Size GetDPI() {
float GetDPIScale() {
if (IsHighDPIEnabled()) {
+ if (GetDPI().width() <= 120) {
+ // 120 logical pixels is 125% scale. We do this to maintain previous
+ // (non-DPI-aware) behavior where only the font size was boosted.
+ return 1.0;
+ }
return gfx::Display::HasForceDeviceScaleFactor() ?
gfx::Display::GetForcedDeviceScaleFactor() :
GetUnforcedDeviceScaleFactor();
« 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