summaryrefslogtreecommitdiffstats
path: root/ui/gfx/win
diff options
context:
space:
mode:
authorScott Graham <scottmg@chromium.org>2014-08-28 16:29:53 -0700
committerScott Graham <scottmg@chromium.org>2014-08-28 23:33:49 +0000
commit9e8cd3d9ee725aab2bea7a3b89e64c9afc10b975 (patch)
treeb4cb8878383c3d28996fe3094e3e6fe4818c9e23 /ui/gfx/win
parentee89079586f3a1ad727aad4c6aaf3100e220d6e4 (diff)
downloadchromium_src-9e8cd3d9ee725aab2bea7a3b89e64c9afc10b975.zip
chromium_src-9e8cd3d9ee725aab2bea7a3b89e64c9afc10b975.tar.gz
chromium_src-9e8cd3d9ee725aab2bea7a3b89e64c9afc10b975.tar.bz2
Force scales 125% and lower down to 100%
125 comes from: 150% == 144 logpixels 125% == 120 logpixels 100% == 96 logpixels R=cpu@chromium.org, sky@chromium.org, ananta@chromium.org BUG=395425 Review URL: https://codereview.chromium.org/516743002 Cr-Commit-Position: refs/heads/master@{#292494}
Diffstat (limited to 'ui/gfx/win')
-rw-r--r--ui/gfx/win/dpi.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/ui/gfx/win/dpi.cc b/ui/gfx/win/dpi.cc
index e562a08..e93a38d 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();