60 lines
1.9 KiB
Diff
60 lines
1.9 KiB
Diff
diff --git a/ui5/devmgr5.py b/ui5/devmgr5.py
|
|
index aa911a5..a650017 100644
|
|
--- a/ui5/devmgr5.py
|
|
+++ b/ui5/devmgr5.py
|
|
@@ -1688,7 +1688,7 @@ class DevMgr5(Ui_MainWindow_Derived, Ui_MainWindow, QMainWindow):
|
|
|
|
def createStatusLevelGraphic(self, percent, agent_type, w=100, h=18):
|
|
if percent:
|
|
- fw = w/100*percent
|
|
+ fw = int(w/100*percent)
|
|
else:
|
|
fw = 0
|
|
|
|
@@ -1706,12 +1706,12 @@ class DevMgr5(Ui_MainWindow_Derived, Ui_MainWindow, QMainWindow):
|
|
pp.fillRect(0, 0, fw, h, QBrush(QColor(map[0])))
|
|
|
|
elif map_len == 2:
|
|
- h2 = h / 2
|
|
+ h2 = int(h / 2)
|
|
pp.fillRect(0, 0, fw, h2, QBrush(QColor(map[0])))
|
|
pp.fillRect(0, h2, fw, h, QBrush(QColor(map[1])))
|
|
|
|
elif map_len == 3:
|
|
- h3 = h / 3
|
|
+ h3 = int(h / 3)
|
|
h23 = 2 * h3
|
|
pp.fillRect(0, 0, fw, h3, QBrush(QColor(map[0])))
|
|
pp.fillRect(0, h3, fw, h23, QBrush(QColor(map[1])))
|
|
@@ -1725,8 +1725,8 @@ class DevMgr5(Ui_MainWindow_Derived, Ui_MainWindow, QMainWindow):
|
|
pp.setPen(Qt.white)
|
|
|
|
# 75% ticks
|
|
- w1 = 3 * w / 4
|
|
- h6 = h / 6
|
|
+ w1 = int(3 * w / 4)
|
|
+ h6 = int(h / 6)
|
|
pp.drawLine(w1, 0, w1, h6)
|
|
pp.drawLine(w1, h, w1, h-h6)
|
|
|
|
@@ -1735,8 +1735,8 @@ class DevMgr5(Ui_MainWindow_Derived, Ui_MainWindow, QMainWindow):
|
|
pp.setPen(Qt.white)
|
|
|
|
# 50% ticks
|
|
- w2 = w / 2
|
|
- h4 = h / 4
|
|
+ w2 = int(w / 2)
|
|
+ h4 = int(h / 4)
|
|
pp.drawLine(w2, 0, w2, h4)
|
|
pp.drawLine(w2, h, w2, h-h4)
|
|
|
|
@@ -1745,7 +1745,7 @@ class DevMgr5(Ui_MainWindow_Derived, Ui_MainWindow, QMainWindow):
|
|
pp.setPen(Qt.white)
|
|
|
|
# 25% ticks
|
|
- w4 = w / 4
|
|
+ w4 = int(w / 4)
|
|
pp.drawLine(w4, 0, w4, h6)
|
|
pp.drawLine(w4, h, w4, h-h6)
|
|
|