mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 15:32:23 -04:00
factor in user scale factor when calculating height
fixes top bar line not appearing, and possible fix for https://anki.tenderapp.com/discussions/beta-testing/1685-black-bars
This commit is contained in:
parent
c4dc40d0db
commit
06e917f80b
1 changed files with 6 additions and 2 deletions
|
@ -416,11 +416,15 @@ body {{ zoom: {}; background: {}; {} }}
|
||||||
self.evalWithCallback("$(document.body).height()", self._onHeight)
|
self.evalWithCallback("$(document.body).height()", self._onHeight)
|
||||||
|
|
||||||
def _onHeight(self, qvar):
|
def _onHeight(self, qvar):
|
||||||
|
from aqt import mw
|
||||||
if qvar is None:
|
if qvar is None:
|
||||||
from aqt import mw
|
|
||||||
|
|
||||||
mw.progress.timer(1000, mw.reset, False)
|
mw.progress.timer(1000, mw.reset, False)
|
||||||
return
|
return
|
||||||
|
|
||||||
height = math.ceil(qvar * self.zoomFactor())
|
scaleFactor = self.zoomFactor()
|
||||||
|
if scaleFactor == 1:
|
||||||
|
scaleFactor = mw.pm.uiScale()
|
||||||
|
|
||||||
|
height = math.ceil(qvar * scaleFactor)
|
||||||
self.setFixedHeight(height)
|
self.setFixedHeight(height)
|
||||||
|
|
Loading…
Reference in a new issue