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

Unified Diff: chrome/browser/ui/libgtk2ui/gtk2_ui.cc

Issue 1324513002: Blacklist low scale factors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Blacklist low scale factors. Created 5 years, 3 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/libgtk2ui/gtk2_ui.cc
diff --git a/chrome/browser/ui/libgtk2ui/gtk2_ui.cc b/chrome/browser/ui/libgtk2ui/gtk2_ui.cc
index ca74730bcb5f7e1e3944e145ee472f128f7eb7a3..21e7ce31e942bf51bac8b875fe5febf76ec7592b 100644
--- a/chrome/browser/ui/libgtk2ui/gtk2_ui.cc
+++ b/chrome/browser/ui/libgtk2ui/gtk2_ui.cc
@@ -1438,9 +1438,11 @@ float Gtk2UI::GetDeviceScaleFactor() const {
if (gfx::Display::HasForceDeviceScaleFactor())
return gfx::Display::GetForcedDeviceScaleFactor();
const int kCSSDefaultDPI = 96;
- float scale = GetDPI() / kCSSDefaultDPI;
+ const float scale = GetDPI() / kCSSDefaultDPI;
// Round to 1 decimal, e.g. to 1.4.
- return roundf(scale * 10) / 10;
+ const float rounded = roundf(scale * 10) / 10;
+ // See crbug.com/484400
+ return rounded < 1.3 ? 1.0 : rounded;
mario.endlessm 2016/01/12 15:07:12 Came across this patch set today and found that th
Evan Stade 2016/01/13 04:40:13 Good catch. Also, I'm not sure if this is intenti
mario.endlessm 2016/01/13 08:58:23 I thought the same thing too and then understood i
}
} // namespace libgtk2ui
« 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