From a4b45af5a9527bc090283d88995f29a7db54175e Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 28 Aug 2017 21:15:38 +1000 Subject: [PATCH] fix scrollbar appearing in toolbar https://anki.tenderapp.com/discussions/beta-testing/675-anki-210-beta-10/page/2#comment_43239350 --- aqt/webview.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aqt/webview.py b/aqt/webview.py index 9561a2068..c9a3acdf9 100644 --- a/aqt/webview.py +++ b/aqt/webview.py @@ -3,6 +3,7 @@ # License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html import sys +import math from anki.hooks import runHook from aqt.qt import * from aqt.utils import openLink @@ -274,5 +275,5 @@ body {{ zoom: {self.zoomFactor()}; {fontspec} }} self.evalWithCallback("$(document.body).height()", self._onHeight) def _onHeight(self, qvar): - height = int(qvar*self.zoomFactor()) + height = math.ceil(qvar*self.zoomFactor()) self.setFixedHeight(height)