mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
826dc25ffd
commit
ce9ff2a0de
@ -34,8 +34,11 @@ class DoubleSpinBox(QDoubleSpinBox): # {{{
|
||||
def set_value(self, val):
|
||||
self.blockSignals(True)
|
||||
self.setValue(val)
|
||||
self.setToolTip(self.tt +
|
||||
try:
|
||||
self.setToolTip(self.tt +
|
||||
' [{0:.0%}]'.format(float(val)/self.maximum()))
|
||||
except ZeroDivisionError:
|
||||
self.setToolTip(self.tt)
|
||||
self.blockSignals(False)
|
||||
self.value_changed.emit(self.value(), self.maximum())
|
||||
# }}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user