summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-12-13 09:34:39 -0300
committerTomás Touceda <chiiph@leap.se>2013-12-13 09:34:39 -0300
commitb1ebbc2b5ca9c5d0591c10c876b871e9cfb2e367 (patch)
treed53f1f01b8e35bff3367258afae085765e53ef31
parent8969c7396c61be96040206ff18a29ec56e20825e (diff)
parent2a8632e60a538828e8c5b417c5b02fbdaaccc88d (diff)
Merge remote-tracking branch 'refs/remotes/elijah/feature/login-on-top' into develop
-rw-r--r--changes/feature-4753-move-login-widget-to-top-of-main-window2
-rw-r--r--src/leap/bitmask/gui/eip_status.py4
-rw-r--r--src/leap/bitmask/gui/mainwindow.py11
-rw-r--r--src/leap/bitmask/gui/ui/eip_status.ui66
-rw-r--r--src/leap/bitmask/gui/ui/login.ui4
-rw-r--r--src/leap/bitmask/gui/ui/mainwindow.ui199
6 files changed, 93 insertions, 193 deletions
diff --git a/changes/feature-4753-move-login-widget-to-top-of-main-window b/changes/feature-4753-move-login-widget-to-top-of-main-window
new file mode 100644
index 00000000..0ab23b24
--- /dev/null
+++ b/changes/feature-4753-move-login-widget-to-top-of-main-window
@@ -0,0 +1,2 @@
+-- Minor UI changes: re-arrange main window so that the login widget is at the top and preferences are available under the menu.
+
diff --git a/src/leap/bitmask/gui/eip_status.py b/src/leap/bitmask/gui/eip_status.py
index 4b4d360f..92bb623e 100644
--- a/src/leap/bitmask/gui/eip_status.py
+++ b/src/leap/bitmask/gui/eip_status.py
@@ -41,8 +41,8 @@ class EIPStatusWidget(QtGui.QWidget):
EIP Status widget that displays the current state of the EIP service
"""
DISPLAY_TRAFFIC_RATES = True
- RATE_STR = "%14.2f KB/s"
- TOTAL_STR = "%14.2f Kb"
+ RATE_STR = "%1.2f KB/s"
+ TOTAL_STR = "%1.2f Kb"
eip_connection_connected = QtCore.Signal()
diff --git a/src/leap/bitmask/gui/mainwindow.py b/src/leap/bitmask/gui/mainwindow.py
index 44fee6b5..1c80cce8 100644
--- a/src/leap/bitmask/gui/mainwindow.py
+++ b/src/leap/bitmask/gui/mainwindow.py
@@ -248,6 +248,8 @@ class MainWindow(QtGui.QMainWindow):
self._soledad_bootstrapper.soledad_failed.connect(
self._mail_status.set_soledad_failed)
+ self.ui.action_preferences.triggered.connect(self._show_preferences)
+ self.ui.action_eip_preferences.triggered.connect(self._show_eip_preferences)
self.ui.action_about_leap.triggered.connect(self._about)
self.ui.action_quit.triggered.connect(self.quit)
self.ui.action_wizard.triggered.connect(self._launch_wizard)
@@ -279,8 +281,9 @@ class MainWindow(QtGui.QMainWindow):
self._action_visible = QtGui.QAction(self.tr("Hide Main Window"), self)
self._action_visible.triggered.connect(self._toggle_visible)
- self.ui.btnPreferences.clicked.connect(self._show_preferences)
- self.ui.btnEIPPreferences.clicked.connect(self._show_eip_preferences)
+ # disable buttons for now, may come back later.
+ # self.ui.btnPreferences.clicked.connect(self._show_preferences)
+ # self.ui.btnEIPPreferences.clicked.connect(self._show_eip_preferences)
self._enabled_services = []
@@ -467,7 +470,8 @@ class MainWindow(QtGui.QMainWindow):
"""
SLOT
TRIGGERS:
- self.ui.btnPreferences.clicked
+ self.ui.btnPreferences.clicked (disabled for now)
+ self.ui.action_preferences
Displays the preferences window.
"""
@@ -520,6 +524,7 @@ class MainWindow(QtGui.QMainWindow):
SLOT
TRIGGERS:
self.ui.btnEIPPreferences.clicked
+ self.ui.action_eip_preferences (disabled for now)
Displays the EIP preferences window.
"""
diff --git a/src/leap/bitmask/gui/ui/eip_status.ui b/src/leap/bitmask/gui/ui/eip_status.ui
index d078ca0c..64821ad6 100644
--- a/src/leap/bitmask/gui/ui/eip_status.ui
+++ b/src/leap/bitmask/gui/ui/eip_status.ui
@@ -25,6 +25,9 @@
</property>
<item>
<layout class="QGridLayout" name="gridLayout">
+ <property name="verticalSpacing">
+ <number>0</number>
+ </property>
<item row="0" column="2">
<widget class="QPushButton" name="btnEipStartStop">
<property name="text">
@@ -75,13 +78,6 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="font">
- <font>
- <pointsize>14</pointsize>
- <weight>75</weight>
- <bold>true</bold>
- </font>
- </property>
<property name="text">
<string>Traffic is being routed in the clear</string>
</property>
@@ -124,12 +120,6 @@
</item>
<item row="2" column="1" colspan="3">
<widget class="QWidget" name="eip_bandwidth" native="true">
- <property name="maximumSize">
- <size>
- <width>16777215</width>
- <height>32</height>
- </size>
- </property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>0</number>
@@ -146,16 +136,6 @@
<enum>QLayout::SetDefaultConstraint</enum>
</property>
<item>
- <widget class="QLabel" name="label_5">
- <property name="text">
- <string/>
- </property>
- <property name="pixmap">
- <pixmap resource="../../../../../data/resources/icons.qrc">:/images/light/16/down-arrow.png</pixmap>
- </property>
- </widget>
- </item>
- <item>
<widget class="QPushButton" name="btnDownload">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
@@ -175,25 +155,18 @@
<height>16777215</height>
</size>
</property>
- <property name="font">
- <font>
- <pointsize>11</pointsize>
- <weight>75</weight>
- <bold>true</bold>
- </font>
- </property>
<property name="cursor">
<cursorShape>PointingHandCursor</cursorShape>
</property>
- <property name="styleSheet">
- <string notr="true">text-align: left;</string>
- </property>
<property name="text">
<string>0.0 KB/s</string>
</property>
<property name="flat">
<bool>true</bool>
</property>
+ <property name="icon">
+ <pixmap resource="../../../../../data/resources/icons.qrc">:/images/light/16/down-arrow.png</pixmap>
+ </property>
</widget>
</item>
<item>
@@ -206,22 +179,12 @@
</property>
<property name="sizeHint" stdset="0">
<size>
- <width>10</width>
+ <width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
- <item>
- <widget class="QLabel" name="label_7">
- <property name="text">
- <string/>
- </property>
- <property name="pixmap">
- <pixmap resource="../../../../../data/resources/icons.qrc">:/images/light/16/up-arrow.png</pixmap>
- </property>
- </widget>
- </item>
<item alignment="Qt::AlignLeft">
<widget class="QPushButton" name="btnUpload">
<property name="sizePolicy">
@@ -242,25 +205,18 @@
<height>16777215</height>
</size>
</property>
- <property name="font">
- <font>
- <pointsize>11</pointsize>
- <weight>75</weight>
- <bold>true</bold>
- </font>
- </property>
<property name="cursor">
<cursorShape>PointingHandCursor</cursorShape>
</property>
- <property name="styleSheet">
- <string notr="true">text-align: left;</string>
- </property>
<property name="text">
<string>0.0 KB/s</string>
</property>
<property name="flat">
<bool>true</bool>
</property>
+ <property name="icon">
+ <pixmap resource="../../../../../data/resources/icons.qrc">:/images/light/16/up-arrow.png</pixmap>
+ </property>
</widget>
</item>
<item>
@@ -271,7 +227,7 @@
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
- <height>20</height>
+ <height>0</height>
</size>
</property>
</spacer>
diff --git a/src/leap/bitmask/gui/ui/login.ui b/src/leap/bitmask/gui/ui/login.ui
index e7ca1652..7e8f9daf 100644
--- a/src/leap/bitmask/gui/ui/login.ui
+++ b/src/leap/bitmask/gui/ui/login.ui
@@ -215,7 +215,7 @@
<number>0</number>
</property>
<property name="bottomMargin">
- <number>24</number>
+ <number>0</number>
</property>
<item row="1" column="1">
<spacer name="horizontalSpacer">
@@ -255,7 +255,7 @@
<widget class="QLabel" name="lblLoginStatus">
<property name="styleSheet">
<string notr="true">color: rgb(132, 132, 132);
-font: 75 12pt &quot;Lucida Grande&quot;;</string>
+font: 75 12pt;</string>
</property>
<property name="text">
<string/>
diff --git a/src/leap/bitmask/gui/ui/mainwindow.ui b/src/leap/bitmask/gui/ui/mainwindow.ui
index 3b83788e..ce05f8f3 100644
--- a/src/leap/bitmask/gui/ui/mainwindow.ui
+++ b/src/leap/bitmask/gui/ui/mainwindow.ui
@@ -85,108 +85,8 @@
<property name="margin">
<number>0</number>
</property>
- <item>
- <widget class="QWidget" name="eipWidget" native="true">
- <layout class="QVBoxLayout" name="verticalLayout_2">
- <property name="spacing">
- <number>0</number>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <item>
- <widget class="QFrame" name="frame_2">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="styleSheet">
- <string notr="true">QFrame{background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:0, y2:0, stop:0 rgba(160, 160, 160, 128), stop:1 rgba(255, 255, 255, 0));}</string>
- </property>
- <layout class="QHBoxLayout" name="horizontalLayout_3">
- <property name="leftMargin">
- <number>24</number>
- </property>
- <property name="rightMargin">
- <number>24</number>
- </property>
- <item>
- <widget class="QLabel" name="label_2">
- <property name="font">
- <font>
- <pointsize>16</pointsize>
- <weight>75</weight>
- <bold>true</bold>
- </font>
- </property>
- <property name="styleSheet">
- <string notr="true">background-color: rgba(255, 255, 255, 0);</string>
- </property>
- <property name="text">
- <string>Encrypted Internet</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="btnEIPPreferences">
- <property name="maximumSize">
- <size>
- <width>48</width>
- <height>20</height>
- </size>
- </property>
- <property name="styleSheet">
- <string notr="true"/>
- </property>
- <property name="text">
- <string/>
- </property>
- <property name="icon">
- <iconset resource="../../../../../data/resources/mainwindow.qrc">
- <normaloff>:/images/black/32/gear.png</normaloff>:/images/black/32/gear.png</iconset>
- </property>
- <property name="autoDefault">
- <bool>false</bool>
- </property>
- <property name="default">
- <bool>false</bool>
- </property>
- <property name="flat">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <layout class="QVBoxLayout" name="eipLayout">
- <property name="leftMargin">
- <number>12</number>
- </property>
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="rightMargin">
- <number>12</number>
- </property>
- <property name="bottomMargin">
- <number>0</number>
- </property>
- </layout>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="Line" name="line">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- </widget>
- </item>
+
+ <!-- LOGIN -->
<item>
<widget class="QFrame" name="frame">
<property name="sizePolicy">
@@ -199,9 +99,7 @@
<bool>false</bool>
</property>
<property name="styleSheet">
- <string notr="true">QFrame{
-background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:0, y2:0, stop:0 rgba(160, 160, 160, 128), stop:1 rgba(255, 255, 255, 0));
-}</string>
+ <string notr="true">background-color: rgba(0,0,0,20); border-bottom: 1px solid rgba(0,0,0,30);</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="leftMargin">
@@ -214,36 +112,15 @@ background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:0, y2:0, stop:0 rgb
<widget class="QLabel" name="lblLoginProvider">
<property name="font">
<font>
- <pointsize>16</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="styleSheet">
- <string notr="true">background-color: rgba(255, 255, 255, 0);</string>
- </property>
- <property name="text">
- <string>Login</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="btnPreferences">
- <property name="maximumSize">
- <size>
- <width>48</width>
- <height>20</height>
- </size>
- </property>
- <property name="styleSheet">
- <string notr="true"/>
+ <string notr="true">background-color: rgba(255, 255, 255, 0); border: none;</string>
</property>
<property name="text">
- <string/>
- </property>
- <property name="icon">
- <iconset resource="../../../../../data/resources/mainwindow.qrc">
- <normaloff>:/images/black/32/gear.png</normaloff>:/images/black/32/gear.png</iconset>
+ <string>Please Log In</string>
</property>
</widget>
</item>
@@ -257,13 +134,54 @@ background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:0, y2:0, stop:0 rgb
</property>
</layout>
</item>
+
<item>
- <widget class="Line" name="line_2">
+ <widget class="Line" name="lineUnderLogin">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
+
+ <!-- EIP -->
+ <item>
+ <widget class="QWidget" name="eipWidget" native="true">
+ <layout class="QVBoxLayout" name="eipVerticalLayout">
+ <property name="spacing">
+ <number>0</number>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <item>
+ <layout class="QVBoxLayout" name="eipLayout">
+ <property name="leftMargin">
+ <number>12</number>
+ </property>
+ <property name="topMargin">
+ <number>0</number>
+ </property>
+ <property name="rightMargin">
+ <number>12</number>
+ </property>
+ <property name="bottomMargin">
+ <number>0</number>
+ </property>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+
+ <item>
+ <widget class="Line" name="lineUnderEIP">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </widget>
+ </item>
+
+ <!-- EMAIL -->
<item>
<widget class="QWidget" name="mailWidget" native="true">
<layout class="QVBoxLayout" name="verticalLayout_3">
@@ -286,6 +204,15 @@ background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:0, y2:0, stop:0 rgb
</layout>
</widget>
</item>
+
+ <item>
+ <widget class="Line" name="lineUnderEmail">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </widget>
+ </item>
+
<item>
<spacer name="verticalSpacer">
<property name="orientation">
@@ -390,6 +317,9 @@ background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:0, y2:0, stop:0 rgb
<addaction name="action_create_new_account"/>
<addaction name="action_advanced_key_management"/>
<addaction name="separator"/>
+ <addaction name="action_preferences"/>
+ <addaction name="action_eip_preferences"/>
+ <addaction name="separator"/>
<addaction name="action_quit"/>
</widget>
<widget class="QMenu" name="menuHelp">
@@ -404,10 +334,17 @@ background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:0, y2:0, stop:0 rgb
<addaction name="menuFile"/>
<addaction name="menuHelp"/>
</widget>
- <widget class="QStatusBar" name="statusbar"/>
<action name="action_preferences">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string>Account Preferences...</string>
+ </property>
+ </action>
+ <action name="action_eip_preferences">
<property name="text">
- <string>Preferences...</string>
+ <string>Internet Preferences...</string>
</property>
</action>
<action name="action_quit">