workaround bottom toolbar issue on macOS/qt5.12

This commit is contained in:
Damien Elmes 2018-10-25 15:34:27 +10:00
parent edb3b176a8
commit 5e3f35a32c

View File

@ -352,7 +352,11 @@ body {{ zoom: {}; {} }}
self.onBridgeCmd = self.defaultOnBridgeCmd
def adjustHeightToFit(self):
self.evalWithCallback("$(document.body).height()", self._onHeight)
from aqt import mw
# fixes bottom toolbar intermittently breaking on startup
def delayedResize(qvar):
mw.progress.timer(10, lambda: self._onHeight(qvar), False)
self.evalWithCallback("$(document.body).height()", delayedResize)
def _onHeight(self, qvar):
if qvar is None: