summaryrefslogtreecommitdiff
path: root/unity-shared
diff options
Diffstat (limited to 'unity-shared')
-rw-r--r--unity-shared/UnitySettings.cpp4
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());