diff options
-rw-r--r-- | changes/bug_long_login_status | 1 | ||||
-rw-r--r-- | src/leap/gui/login.py | 4 | ||||
-rw-r--r-- | src/leap/gui/ui/login.ui | 5 |
3 files changed, 9 insertions, 1 deletions
diff --git a/changes/bug_long_login_status b/changes/bug_long_login_status new file mode 100644 index 00000000..823ed524 --- /dev/null +++ b/changes/bug_long_login_status @@ -0,0 +1 @@ + o Wrap long login status messages to 40 characters. Fixes #3124
\ No newline at end of file diff --git a/src/leap/gui/login.py b/src/leap/gui/login.py index 8fc6ec24..80f2f3db 100644 --- a/src/leap/gui/login.py +++ b/src/leap/gui/login.py @@ -41,6 +41,8 @@ class LoginWidget(QtGui.QWidget): # combobox or click "Create Account" show_wizard = QtCore.Signal() + MAX_STATUS_WIDTH = 40 + def __init__(self, settings, parent=None): """ Constructs the LoginWidget. @@ -173,6 +175,8 @@ class LoginWidget(QtGui.QWidget): :param status: status message :type status: str """ + if len(status) > self.MAX_STATUS_WIDTH: + status = status[:self.MAX_STATUS_WIDTH] + "..." if error: status = "<font color='red'><b>%s</b></font>" % (status,) self.ui.lblStatus.setText(status) diff --git a/src/leap/gui/ui/login.ui b/src/leap/gui/ui/login.ui index 88c9ef44..42a6897a 100644 --- a/src/leap/gui/ui/login.ui +++ b/src/leap/gui/ui/login.ui @@ -7,7 +7,7 @@ <x>0</x> <y>0</y> <width>356</width> - <height>219</height> + <height>223</height> </rect> </property> <property name="windowTitle"> @@ -112,6 +112,9 @@ <property name="alignment"> <set>Qt::AlignCenter</set> </property> + <property name="wordWrap"> + <bool>true</bool> + </property> </widget> </item> </layout> |