mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-20 11:56:28 +01:00
...
This commit is contained in:
parent
bd27557d58
commit
6af42f147e
1 changed files with 7 additions and 1 deletions
|
|
@ -131,9 +131,16 @@ def paintEvent(self, ev):
|
|||
|
||||
class DoubleSpinBox(QDoubleSpinBox):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
QDoubleSpinBox.__init__(self, *args, **kwargs)
|
||||
self.tt = _('Position in book')
|
||||
self.setToolTip(self.tt)
|
||||
|
||||
def set_value(self, val):
|
||||
self.blockSignals(True)
|
||||
self.setValue(val)
|
||||
self.setToolTip(self.tt +
|
||||
' [{0:.0%}]'.format(float(val)/self.maximum()))
|
||||
self.blockSignals(False)
|
||||
|
||||
class HelpfulLineEdit(QLineEdit):
|
||||
|
|
@ -197,7 +204,6 @@ def __init__(self, pathtoebook=None, debug_javascript=False, open_at=None):
|
|||
self.metadata = Metadata(self)
|
||||
self.pos = DoubleSpinBox()
|
||||
self.pos.setDecimals(1)
|
||||
self.pos.setToolTip(_('Position in book'))
|
||||
self.pos.setSuffix('/'+_('Unknown')+' ')
|
||||
self.pos.setMinimum(1.)
|
||||
self.pos.setMinimumWidth(150)
|
||||
|
|
|
|||
Loading…
Reference in a new issue