diff options
| author | Andrea Azzarone <azzaronea@gmail.com> | 2017-01-09 15:09:16 +0000 | 
|---|---|---|
| committer | Bileto Bot <ci-train-bot@canonical.com> | 2017-01-09 15:09:16 +0000 | 
| commit | fc62be58ad728b030a8d4247a4ad0e35afb9f22f (patch) | |
| tree | b9a0281430bd2e94d60d9990b91c2b37183cd26a /unity-shared | |
| parent | 7dc35711b556d2ba863e5eb61ccc153600b1a36a (diff) | |
| parent | d8d68d9db4ac4768bb8f0f3660448cd8569b5b59 (diff) | |
Round gtk scaling factor to closest integer. (LP: #1649736)
Approved by: David Jordan, Marco Trevisan (TreviƱo) (bzr r4215)
Diffstat (limited to 'unity-shared')
| -rw-r--r-- | unity-shared/UnitySettings.cpp | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/unity-shared/UnitySettings.cpp b/unity-shared/UnitySettings.cpp index 2811f2e04..d836c47c8 100644 --- a/unity-shared/UnitySettings.cpp +++ b/unity-shared/UnitySettings.cpp @@ -346,7 +346,7 @@ public:  const auto dpi = std::max(dpi_x, dpi_y);  if (dpi > DPI_SCALING_LIMIT) - scale = static_cast<int>(std::lround(scale * dpi / DPI_SCALING_LIMIT)); + scale = static_cast<int>(scale * std::lround(dpi / DPI_SCALING_LIMIT));  }  return scale; @@ -423,7 +423,7 @@ public:  {  changing_gnome_settings_ = true;  changing_gnome_settings_timeout_.reset(); - unsigned integer_scaling = std::max<unsigned>(1, scale); + unsigned integer_scaling = std::max<unsigned>(1, std::lround(scale));  double point_scaling = scale / static_cast<double>(integer_scaling);  double text_scale_factor = parent_->font_scaling() * point_scaling;  glib::Variant default_cursor_size(g_settings_get_default_value(gnome_ui_settings_, GNOME_CURSOR_SIZE.c_str()), glib::StealRef()); | 
