Make button show its toggle state
This commit is contained in:
parent
f5d429a5ca
commit
ece753991e
@ -879,8 +879,10 @@ QTableView {{ gridline-color: {grid} }}
|
||||
lambda _editor: self.onTogglePreview(),
|
||||
"Preview Selected Card",
|
||||
"Preview",
|
||||
id="previewButton",
|
||||
disables=False,
|
||||
rightside=False,
|
||||
toggleable=True,
|
||||
))
|
||||
|
||||
gui_hooks.editor_did_init_left_buttons.append(add_preview_button)
|
||||
@ -1579,6 +1581,7 @@ where id in %s"""
|
||||
self._previewer.close()
|
||||
|
||||
def _on_preview_closed(self):
|
||||
self.editor.web.eval("$('#previewButton').removeClass('highlighted')")
|
||||
self._previewer = None
|
||||
|
||||
# Card deletion
|
||||
|
@ -73,7 +73,13 @@ button.linkb:disabled {
|
||||
}
|
||||
|
||||
button.highlighted {
|
||||
border-bottom: 3px solid #000;
|
||||
#topbutsleft & {
|
||||
box-shadow: inset 0px 0px 5px #222;
|
||||
}
|
||||
|
||||
#topbutsright & {
|
||||
border-bottom: 3px solid #000;
|
||||
}
|
||||
}
|
||||
|
||||
#fields {
|
||||
|
Loading…
Reference in New Issue
Block a user