mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
Possible workaround for toolbar height issue
https://forums.ankiweb.net/t/anki-24-04-beta-rc/41792/125
This commit is contained in:
parent
22559929f9
commit
67062da924
1 changed files with 6 additions and 4 deletions
|
@ -88,6 +88,7 @@ class TopWebView(ToolbarWebView):
|
|||
|
||||
def _onHeight(self, qvar: Optional[int]) -> None:
|
||||
super()._onHeight(qvar)
|
||||
if qvar:
|
||||
self.web_height = int(qvar)
|
||||
|
||||
def hide_if_allowed(self) -> None:
|
||||
|
@ -151,6 +152,7 @@ class TopWebView(ToolbarWebView):
|
|||
self.set_body_height(self.mw.web.height())
|
||||
|
||||
# offset reviewer background by toolbar height
|
||||
if self.web_height:
|
||||
self.mw.web.eval(
|
||||
f"""document.body.style.setProperty("background-position-y", "-{self.web_height}px"); """
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue