Add title to rendering progress dialog

pull/357/head
nyanpasu64 2018-12-12 09:27:28 -08:00
rodzic a9d62868e3
commit 01255ece6d
1 zmienionych plików z 5 dodań i 2 usunięć

Wyświetl plik

@ -131,7 +131,7 @@ class MainWindow(qw.QMainWindow):
)
if name != '':
# FIXME what if missing mp4?
dlg = OvgenProgressDialog(self)
dlg = OvgenProgressDialog(self, 'Rendering video')
arg = self._get_args([FFmpegOutputConfig(name)], dlg)
error_msg = 'Cannot render to file, another play/render is active'
self.play_thread(arg, error_msg)
@ -222,8 +222,11 @@ class OvgenThread(qc.QThread):
class OvgenProgressDialog(qw.QProgressDialog):
def __init__(self, parent: Optional[qw.QWidget]):
def __init__(self, parent: Optional[qw.QWidget], title: str):
super().__init__(parent)
self.setMinimumWidth(300)
self.setWindowTitle(title)
self.setLabelText('Progress:')
# If set to 0, the dialog is always shown as soon as any progress is set.
self.setMinimumDuration(0)