From 93fb3ea005e4d7d9ad97d26c9704c4b26442f536 Mon Sep 17 00:00:00 2001 From: Dominik Schneider <33843344+dmnkschndr@users.noreply.github.com> Date: Tue, 25 Apr 2023 09:31:25 +0200 Subject: [PATCH] fix crashes related to color and font settings --- datagui/package/ui/SummaryTab.py | 2 +- datagui/package/utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/datagui/package/ui/SummaryTab.py b/datagui/package/ui/SummaryTab.py index 961591e..b776e95 100644 --- a/datagui/package/ui/SummaryTab.py +++ b/datagui/package/ui/SummaryTab.py @@ -67,7 +67,7 @@ def setupUI(self): flags_group_box = QGroupBox("Rating") #icon_size = QSize(20, 20) font_size = QFontMetrics(self.user_comment.currentFont()).size(0,"A").height() - font_size *= 1.1 + font_size *= 1 icon_size = QSize(font_size, font_size) flag_0 = createIconButton(icon_size, LeakFlags.NOLEAK) diff --git a/datagui/package/utils.py b/datagui/package/utils.py index 020bd28..50c3092 100644 --- a/datagui/package/utils.py +++ b/datagui/package/utils.py @@ -380,7 +380,7 @@ def getColor(value, threshold): lightness = 100 # alpha = 255 * (1 - threshold) color = QColor() - color.setHsl(hue, saturation, lightness, 255) + color.setHsl(int(hue), int(saturation), int(lightness), 255) return color def createIconButton(size, flag_id):