summaryrefslogtreecommitdiff
path: root/src/leap
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-07-15 16:38:17 -0300
committerTomás Touceda <chiiph@leap.se>2013-07-15 16:38:17 -0300
commitfec608699f903a17d31d6f0c903c785120c8c2a3 (patch)
tree6c526fa994166b8f2b382019a66cb9b3137dab4a /src/leap
parent7ac4e97c34a21a6c9eed480dd742b4230774bad6 (diff)
Wrap long login status
Diffstat (limited to 'src/leap')
-rw-r--r--src/leap/gui/login.py4
-rw-r--r--src/leap/gui/ui/login.ui5
2 files changed, 8 insertions, 1 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)
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>