From 23c3aa67e3f109eb7d75a89caa34b90144f99efa Mon Sep 17 00:00:00 2001 From: kali Date: Mon, 12 Nov 2012 11:48:39 +0900 Subject: fix layout on providerinfo page --- src/leap/gui/firstrun/providerinfo.py | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/leap/gui/firstrun/providerinfo.py b/src/leap/gui/firstrun/providerinfo.py index 4df477a7..0c557d66 100644 --- a/src/leap/gui/firstrun/providerinfo.py +++ b/src/leap/gui/firstrun/providerinfo.py @@ -9,7 +9,7 @@ from PyQt4 import QtGui import requests from leap.base import exceptions as baseexceptions -from leap.crypto import certs +#from leap.crypto import certs from leap.eip import exceptions as eipexceptions from leap.gui.progress import ValidationPage @@ -32,26 +32,36 @@ class ProviderInfoPage(ValidationPage): QtGui.QPixmap(APP_LOGO)) def create_info_panel(self): + # Use stacked widget instead + # of reparenting the layout. + + self.infoWidget = QtGui.QStackedWidget() + + info = QtGui.QWidget() + layout = QtGui.QVBoxLayout() + displayName = QtGui.QLabel("") description = QtGui.QLabel("") enrollment_policy = QtGui.QLabel("") # XXX set stylesheet... # prettify a little bit. # bigger fonts and so on... - self.displayName = displayName - self.description = description - self.enrollment_policy = enrollment_policy - # this trick allows us to reparent - QtCore.QObjectCleanupHandler().add(self.layout) - layout = QtGui.QGridLayout() + layout.addWidget(displayName) + layout.addWidget(description) + layout.addWidget(enrollment_policy) + layout.addStretch(1) + + info.setLayout(layout) + self.infoWidget.addWidget(info) - layout.addWidget(displayName, 0, 1) - layout.addWidget(description, 1, 1) - layout.addWidget(enrollment_policy, 2, 1) + self.layout.addWidget(self.infoWidget) - self.setLayout(layout) - self.update() + # add refs to self to allow for + # updates. + self.displayName = displayName + self.description = description + self.enrollment_policy = enrollment_policy def show_provider_info(self): -- cgit v1.2.3