From 1fd7c244be371a34b2d8896f4f9e9b6d8f702c1c Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 25 Oct 2018 15:43:17 +1000 Subject: [PATCH] Revert "fix about dialog collapsed on qt 5.11/12" This reverts commit edb3b176a88d3b9f3880c6aa9f4d24b3019d6801. causes a lot of flickering on startup - will just move to static sizing instead, as there is a scrollbar anyway --- aqt/about.py | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/aqt/about.py b/aqt/about.py index e2f33402a..d3f4bf71b 100644 --- a/aqt/about.py +++ b/aqt/about.py @@ -24,9 +24,7 @@ def show(mw): mw.setupDialogGC(dialog) abt = aqt.forms.about.Ui_About() abt.setupUi(dialog) - abouttext = "" - abouttext += "
" - abouttext += "
" + abouttext = "
" abouttext += '

' + _("Anki is a friendly, intelligent spaced learning \ system. It's free and open source.") abouttext += "

"+_("Anki is licensed under the AGPL3 license. Please see " @@ -127,14 +125,9 @@ system. It's free and open source.") please get in touch.") abouttext += '

' + _("A big thanks to all the people who have provided \ suggestions, bug reports and donations.") - abouttext += "

" - dialog.show() - dialog.setMinimumWidth(800) - abt.label.stdHtml(abouttext) - if qtminor >= 11: - abt.label.adjustHeightToFit() - # after the height is adjusted, adjust the dialog size - abt.label.evalWithCallback("1", lambda _: dialog.adjustSize()) - else: - dialog.setMinimumHeight(600) + abt.label.stdHtml(abouttext, js=" ") + def resizeAndShow(arg): + dialog.adjustSize() + dialog.show() + abt.label.evalWithCallback("1", resizeAndShow) return dialog