From 3316618aa57346be5b0ab8667deab0dba7ba8c68 Mon Sep 17 00:00:00 2001 From: "Hans-J. Schmid" Date: Thu, 14 Oct 2021 04:30:59 +0200 Subject: [PATCH] explicit casting start --- source/frontend/carla_host.py | 2 +- source/frontend/widgets/pixmapkeyboard.py | 4 ++-- source/frontend/widgets/racklistwidget.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/frontend/carla_host.py b/source/frontend/carla_host.py index f863ec840..99d4d49fb 100644 --- a/source/frontend/carla_host.py +++ b/source/frontend/carla_host.py @@ -2806,7 +2806,7 @@ class HostWindow(QMainWindow): fg_color = rack_pal.text().color() bg_value = 1.0 - bg_color.blackF() if bg_value != 0.0 and bg_value < min_value: - pad_color = bg_color.lighter(100*min_value/bg_value*value_fix) + pad_color = bg_color.lighter(int(100*min_value/bg_value*value_fix)) else: pad_color = QColor.fromHsvF(0.0, 0.0, min_value*value_fix) diff --git a/source/frontend/widgets/pixmapkeyboard.py b/source/frontend/widgets/pixmapkeyboard.py index f19e84d36..12c71b5e7 100755 --- a/source/frontend/widgets/pixmapkeyboard.py +++ b/source/frontend/widgets/pixmapkeyboard.py @@ -628,7 +628,7 @@ class PixmapKeyboardHArea(QScrollArea): self.setWidget(self.keyboard) self.setEnabled(False) - self.setFixedHeight(self.keyboard.height() + self.horizontalScrollBar().height()/2 + 2) + self.setFixedHeight(int(self.keyboard.height() + self.horizontalScrollBar().height()/2 + 2)) QTimer.singleShot(0, self.slot_initScrollbarValue) @@ -639,7 +639,7 @@ class PixmapKeyboardHArea(QScrollArea): @pyqtSlot() def slot_initScrollbarValue(self): - self.horizontalScrollBar().setValue(self.horizontalScrollBar().maximum()/2) + self.horizontalScrollBar().setValue(int(self.horizontalScrollBar().maximum()/2)) # ------------------------------------------------------------------------------------------------------------ # Main Testing diff --git a/source/frontend/widgets/racklistwidget.py b/source/frontend/widgets/racklistwidget.py index c80282d7f..5e33d9d56 100644 --- a/source/frontend/widgets/racklistwidget.py +++ b/source/frontend/widgets/racklistwidget.py @@ -425,7 +425,7 @@ class RackListWidget(QListWidget): r0,g0,b0,_ = bg_color.getRgb() r1,g1,b1,_ = text_color.getRgb() - self.rail_col = QColor((r0*3+r1)/4, (g0*3+g1)/4, (b0*3+b1)/4) + self.rail_col = QColor(int((r0*3+r1)/4), int((g0*3+g1)/4), int((b0*3+b1)/4)) self.edge_col = (self.rail_col if self.rail_col.blackF() > base_color.blackF() else base_color).darker(115) # ------------------------------------------------------------------------------------------------------------