mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 23:12:21 -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)
|
||||
|
||||
def _onHeight(self, qvar):
|
||||
if qvar is None:
|
||||
from aqt import mw
|
||||
if qvar is None:
|
||||
|
||||
mw.progress.timer(1000, mw.reset, False)
|
||||
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)
|
||||
|
|
Loading…
Reference in a new issue