터치 패널 WAN 그래프 축 보정
This commit is contained in:
1 parent
8a27da7719
commit
37f1cef8d7
2 files changed
+8
-6
No files matched your search
@@ -528,8 +528,9 @@ class Sparkline(QFrame):
|
||||
unit_factor, unit_label = byte_rate_unit(values + second_values)
|
||||
values = [value / unit_factor for value in values]
|
||||
second_values = [value / unit_factor for value in second_values]
|
||||
low = min(values)
|
||||
high = max(values)
|
||||
scale_values = values + second_values if self.auto_byte_unit and second_values else values
|
||||
low = min(scale_values)
|
||||
high = max(scale_values)
|
||||
if high <= low:
|
||||
high = low + 1
|
||||
painter.setPen(QColor("#93a4bd"))
|
||||
@@ -541,7 +542,7 @@ class Sparkline(QFrame):
|
||||
second_high = max(second_values)
|
||||
if second_high <= second_low:
|
||||
second_high = second_low + 1
|
||||
if self.right_unit:
|
||||
if self.right_unit and not self.auto_byte_unit:
|
||||
painter.setPen(QColor("#93a4bd"))
|
||||
right_x = self.canvas.rect().right() - 31
|
||||
painter.drawText(right_x, rect.top() + 10, self.axis_text(second_high, self.right_unit))
|
||||
@@ -1066,7 +1067,8 @@ class TouchPanel(QMainWindow):
|
||||
|
||||
@staticmethod
|
||||
def drop_detail(drops, normal_label):
|
||||
return normal_label if drops <= 0 else f"D {drops}"
|
||||
del normal_label
|
||||
return f"D {drops}"
|
||||
|
||||
@staticmethod
|
||||
def iface_warn(row):
|
||||
|
||||
Reference in new issue
Block a user