Mercurial > hg > svgui
changeset 1308:e7c9650e74a7
Never scale down
author | Chris Cannam <cannam@all-day-breakfast.com> |
---|---|
date | Tue, 26 Jun 2018 14:36:56 +0100 |
parents | 5af5c611f4cb |
children | 13e17e61f898 |
files | widgets/WidgetScale.h |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/widgets/WidgetScale.h Tue Jun 26 08:35:49 2018 +0100 +++ b/widgets/WidgetScale.h Tue Jun 26 14:36:56 2018 +0100 @@ -43,6 +43,11 @@ SVDEBUG << "WidgetScale::scalePixelSize: baseEm = " << baseEm << ", platform default font height = " << em << ", resulting scale factor = " << ratio << endl; + if (ratio < 1.0) { + SVDEBUG << "WidgetScale::scalePixelSize: rounding up to 1.0" + << endl; + ratio = 1.0; + } } int scaled = int(pixels * ratio + 0.5);