mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
...
This commit is contained in:
parent
bd27557d58
commit
6af42f147e
@ -131,9 +131,16 @@ class Metadata(QLabel):
|
||||
|
||||
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 @@ class EbookViewer(MainWindow, Ui_EbookViewer):
|
||||
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…
x
Reference in New Issue
Block a user