diff options
author | Tomás Touceda <chiiph@leap.se> | 2013-07-15 16:38:17 -0300 |
---|---|---|
committer | Tomás Touceda <chiiph@leap.se> | 2013-07-15 16:38:17 -0300 |
commit | fec608699f903a17d31d6f0c903c785120c8c2a3 (patch) | |
tree | 6c526fa994166b8f2b382019a66cb9b3137dab4a /src/leap/gui/login.py | |
parent | 7ac4e97c34a21a6c9eed480dd742b4230774bad6 (diff) |
Wrap long login status
Diffstat (limited to 'src/leap/gui/login.py')
-rw-r--r-- | src/leap/gui/login.py | 4 |
1 files changed, 4 insertions, 0 deletions
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) |