mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Restore tooltips on toggel buttons
This commit is contained in:
parent
de427391d3
commit
8aeb8b23bd
@ -372,7 +372,7 @@ class DevicePlugin(Plugin):
|
||||
@classmethod
|
||||
def settings(cls):
|
||||
'''
|
||||
Should return an opts object. The opts object should have one attribute
|
||||
Should return an opts object. The opts object should have at least one attribute
|
||||
`format_map` which is an ordered list of formats for the device.
|
||||
'''
|
||||
raise NotImplementedError()
|
||||
|
@ -957,16 +957,19 @@ class LayoutButton(QToolButton):
|
||||
|
||||
self.splitter = splitter
|
||||
splitter.state_changed.connect(self.update_state)
|
||||
self.setCursor(Qt.PointingHandCursor)
|
||||
|
||||
def set_state_to_show(self, *args):
|
||||
self.setChecked(False)
|
||||
label =_('Show')
|
||||
self.setText(label + ' ' + self.label)
|
||||
self.setToolTip(self.text())
|
||||
|
||||
def set_state_to_hide(self, *args):
|
||||
self.setChecked(True)
|
||||
label = _('Hide')
|
||||
self.setText(label + ' ' + self.label)
|
||||
self.setToolTip(self.text())
|
||||
|
||||
def update_state(self, *args):
|
||||
if self.splitter.is_side_index_hidden:
|
||||
|
Loading…
x
Reference in New Issue
Block a user