mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
If bools are bistate, remove the "Clear" button from edit medata single
This commit is contained in:
parent
b468f72ba7
commit
545ce0b6ce
@ -164,12 +164,13 @@ class Bool(Base):
|
||||
l.addWidget(c)
|
||||
c.clicked.connect(self.set_to_no)
|
||||
|
||||
t = _('Clear')
|
||||
c = QPushButton(t, parent)
|
||||
width = c.fontMetrics().boundingRect(t).width() + 7
|
||||
c.setMaximumWidth(width)
|
||||
l.addWidget(c)
|
||||
c.clicked.connect(self.set_to_cleared)
|
||||
if self.db.prefs.get('bools_are_tristate'):
|
||||
t = _('Clear')
|
||||
c = QPushButton(t, parent)
|
||||
width = c.fontMetrics().boundingRect(t).width() + 7
|
||||
c.setMaximumWidth(width)
|
||||
l.addWidget(c)
|
||||
c.clicked.connect(self.set_to_cleared)
|
||||
|
||||
c = QLabel('', parent)
|
||||
c.setMaximumWidth(1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user