Browse Source

explicit casting start

tags/v2.4.1
Hans-J. Schmid falkTX <falktx@falktx.com> 3 years ago
parent
commit
3316618aa5
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
3 changed files with 4 additions and 4 deletions
  1. +1
    -1
      source/frontend/carla_host.py
  2. +2
    -2
      source/frontend/widgets/pixmapkeyboard.py
  3. +1
    -1
      source/frontend/widgets/racklistwidget.py

+ 1
- 1
source/frontend/carla_host.py View File

@@ -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)



+ 2
- 2
source/frontend/widgets/pixmapkeyboard.py View File

@@ -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


+ 1
- 1
source/frontend/widgets/racklistwidget.py View File

@@ -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)

# ------------------------------------------------------------------------------------------------------------

Loading…
Cancel
Save