From e014e3af75a82b45d257699a9f13fa929f700ceb Mon Sep 17 00:00:00 2001 From: ThomasV Date: Sun, 24 Sep 2017 11:52:53 +0200 Subject: [PATCH] qt wizard: fix scroll area --- gui/qt/installwizard.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/gui/qt/installwizard.py b/gui/qt/installwizard.py index ef8c75c49..897ad8975 100644 --- a/gui/qt/installwizard.py +++ b/gui/qt/installwizard.py @@ -131,20 +131,25 @@ class InstallWizard(QDialog, MessageBoxMixin, BaseWizard): self.next_button.clicked.connect(lambda: self.loop.exit(2)) outer_vbox = QVBoxLayout(self) inner_vbox = QVBoxLayout() - inner_vbox = QVBoxLayout() inner_vbox.addWidget(self.title) inner_vbox.addWidget(self.main_widget) inner_vbox.addStretch(1) inner_vbox.addWidget(self.please_wait) inner_vbox.addStretch(1) + scroll_widget = QWidget() + scroll_widget.setLayout(inner_vbox) + scroll = QScrollArea() + scroll.setWidget(scroll_widget) + scroll.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff) + scroll.setWidgetResizable(True) icon_vbox = QVBoxLayout() icon_vbox.addWidget(self.logo) icon_vbox.addStretch(1) hbox = QHBoxLayout() hbox.addLayout(icon_vbox) hbox.addSpacing(5) - hbox.addLayout(inner_vbox) - hbox.setStretchFactor(inner_vbox, 1) + hbox.addWidget(scroll) + hbox.setStretchFactor(scroll, 1) outer_vbox.addLayout(hbox) outer_vbox.addLayout(Buttons(self.back_button, self.next_button)) self.set_icon(':icons/electrum.png') @@ -426,12 +431,9 @@ class InstallWizard(QDialog, MessageBoxMixin, BaseWizard): self.confirm(message, title) def confirm(self, message, title): - area = QScrollArea() label = WWLabel(message) - area.setWidget(label) - vbox = QVBoxLayout() - vbox.addWidget(area) + vbox.addWidget(label) self.exec_layout(vbox, title) @wizard_dialog