mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 01:06:35 -04:00
progress dialog tweaks
- don't use mw as parent if it's not visible - wider
This commit is contained in:
parent
8ab5a3a176
commit
b3a569ed57
1 changed files with 5 additions and 1 deletions
|
@ -98,7 +98,10 @@ class ProgressManager:
|
||||||
if self._levels > 1:
|
if self._levels > 1:
|
||||||
return
|
return
|
||||||
# setup window
|
# setup window
|
||||||
parent = parent or self.app.activeWindow() or self.mw
|
parent = parent or self.app.activeWindow()
|
||||||
|
if not parent and self.mw.isVisible():
|
||||||
|
parent = self.mw
|
||||||
|
|
||||||
label = label or _("Processing...")
|
label = label or _("Processing...")
|
||||||
if cancellable:
|
if cancellable:
|
||||||
klass = self.ProgressCancellable
|
klass = self.ProgressCancellable
|
||||||
|
@ -110,6 +113,7 @@ class ProgressManager:
|
||||||
self._win.setAutoClose(False)
|
self._win.setAutoClose(False)
|
||||||
self._win.setAutoReset(False)
|
self._win.setAutoReset(False)
|
||||||
self._win.setWindowModality(Qt.ApplicationModal)
|
self._win.setWindowModality(Qt.ApplicationModal)
|
||||||
|
self._win.setMinimumWidth(300)
|
||||||
# we need to manually manage minimum time to show, as qt gets confused
|
# we need to manually manage minimum time to show, as qt gets confused
|
||||||
# by the db handler
|
# by the db handler
|
||||||
self._win.setMinimumDuration(100000)
|
self._win.setMinimumDuration(100000)
|
||||||
|
|
Loading…
Reference in a new issue