From 2554fd1f745a708e9b19b35d70813906545f9a6b Mon Sep 17 00:00:00 2001 From: Glutanimate Date: Mon, 19 Feb 2018 23:26:30 +0100 Subject: [PATCH] Improve CSS parsing order and user CSS --- src/mouseover_dictionary/config.py | 5 ++--- src/mouseover_dictionary/js.py | 2 +- src/mouseover_dictionary/main.py | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/mouseover_dictionary/config.py b/src/mouseover_dictionary/config.py index 9404daf..a085d27 100644 --- a/src/mouseover_dictionary/config.py +++ b/src/mouseover_dictionary/config.py @@ -20,9 +20,8 @@ USER_STYLES = r""" .qtip { font-family: "arial"; - min-width: 50px !important; - max-width: 400px !important; - max-height: 400px !important; + max-width: 400px; + max-height: 400px; overflow-y: auto; } """ diff --git a/src/mouseover_dictionary/js.py b/src/mouseover_dictionary/js.py index 542eddb..8fea55f 100644 --- a/src/mouseover_dictionary/js.py +++ b/src/mouseover_dictionary/js.py @@ -92,7 +92,7 @@ viewport: $(window), // constrain to window adjust: { mouse: false, // don't follow mouse - method: 'flip', // adjust to viewport by flipping tip if necessary + method: 'shift', // adjust to viewport by flipping tip if necessary scroll: false, // buggy, disable } }, diff --git a/src/mouseover_dictionary/main.py b/src/mouseover_dictionary/main.py index 4139d7d..c43ff3b 100644 --- a/src/mouseover_dictionary/main.py +++ b/src/mouseover_dictionary/main.py @@ -76,4 +76,4 @@ def setupAddon(): addHook("profileLoaded", setupAddon) Reviewer._initWeb = wrap(Reviewer._initWeb, addJavascriptObjects, "after") -Reviewer._revHtml += "".format(USER_STYLES) + html +Reviewer._revHtml += html + "".format(USER_STYLES)