From 621774559f54a43089039145969a1d51e2d3bd2a Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Tue, 25 Feb 2020 16:20:14 +1000 Subject: [PATCH] don't allow UI scale < 100% Both Windows and Linux installs fail to render properly when the scale is below 100%: https://anki.tenderapp.com/discussions/ankidesktop/38909-user-interface-size Retina Macs do render properly, but they tend to display at appropriate size out of the box anyway. --- qt/aqt/profiles.py | 3 ++- qt/designer/preferences.ui | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/qt/aqt/profiles.py b/qt/aqt/profiles.py index 03f4280cb..ba605f401 100644 --- a/qt/aqt/profiles.py +++ b/qt/aqt/profiles.py @@ -485,7 +485,8 @@ please see: ###################################################################### def uiScale(self) -> float: - return self.meta.get("uiScale", 1.0) + scale = self.meta.get("uiScale", 1.0) + return max(scale, 1) def setUiScale(self, scale: float) -> None: self.meta["uiScale"] = scale diff --git a/qt/designer/preferences.ui b/qt/designer/preferences.ui index 3e7c9fca4..2e87ce297 100644 --- a/qt/designer/preferences.ui +++ b/qt/designer/preferences.ui @@ -246,7 +246,7 @@ % - 50 + 100 200