move deck name into window title; v-center sticky bar
This commit is contained in:
parent
3f0fd548d8
commit
df38788e07
@ -6,7 +6,7 @@ from __future__ import annotations
|
|||||||
import aqt
|
import aqt
|
||||||
from aqt import gui_hooks
|
from aqt import gui_hooks
|
||||||
from aqt.qt import *
|
from aqt.qt import *
|
||||||
from aqt.utils import addCloseShortcut, disable_help_button, restoreGeom, saveGeom
|
from aqt.utils import addCloseShortcut, disable_help_button, restoreGeom, saveGeom, tr
|
||||||
from aqt.webview import AnkiWebView
|
from aqt.webview import AnkiWebView
|
||||||
|
|
||||||
|
|
||||||
@ -38,11 +38,12 @@ class DeckOptionsDialog(QDialog):
|
|||||||
layout.addWidget(self.web)
|
layout.addWidget(self.web)
|
||||||
self.setLayout(layout)
|
self.setLayout(layout)
|
||||||
|
|
||||||
deck_id = self.mw.col.decks.get_current_id()
|
deck = self.mw.col.decks.get_current()
|
||||||
self.web.eval(
|
self.web.eval(
|
||||||
f"""const $deckOptions = anki.deckOptions(
|
f"""const $deckOptions = anki.deckOptions(
|
||||||
document.getElementById('main'), {deck_id});"""
|
document.getElementById('main'), {deck.id});"""
|
||||||
)
|
)
|
||||||
|
self.setWindowTitle(tr.actions_options_for(val=deck.name))
|
||||||
gui_hooks.deck_options_did_load(self)
|
gui_hooks.deck_options_did_load(self)
|
||||||
|
|
||||||
def reject(self) -> None:
|
def reject(self) -> None:
|
||||||
|
@ -21,6 +21,6 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<nav {id} class={`pb-1 ${className}`}>
|
<nav {id} class={`pb-1 pt-1 ${className}`}>
|
||||||
<slot />
|
<slot />
|
||||||
</nav>
|
</nav>
|
||||||
|
@ -31,8 +31,6 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<StickyBar>
|
<StickyBar>
|
||||||
<div>{tr.actionsOptionsFor({ val: state.currentDeck.name })}</div>
|
|
||||||
|
|
||||||
<WithTheming style="--toolbar-size: 35px; --toolbar-wrap: nowrap">
|
<WithTheming style="--toolbar-size: 35px; --toolbar-wrap: nowrap">
|
||||||
<ButtonToolbar class="justify-content-between">
|
<ButtonToolbar class="justify-content-between">
|
||||||
<ButtonToolbarItem>
|
<ButtonToolbarItem>
|
||||||
|
Loading…
Reference in New Issue
Block a user