summaryrefslogtreecommitdiff
path: root/ZeroTierUI
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2013-12-18 16:52:21 -0800
committerAdam Ierymenko <adam.ierymenko@gmail.com>2013-12-18 16:52:21 -0800
commit4ddf97be4e497da1a091fb9945734134cf58165b (patch)
tree9c96354308432a703a4b1afe086208785bb98bbb /ZeroTierUI
parenta388830983e85e184932f608d1795d6477b653c8 (diff)
downloadinfinitytier-4ddf97be4e497da1a091fb9945734134cf58165b.tar.gz
infinitytier-4ddf97be4e497da1a091fb9945734134cf58165b.zip
More UI civic beautification.
Diffstat (limited to 'ZeroTierUI')
-rw-r--r--ZeroTierUI/mainwindow.ui68
-rw-r--r--ZeroTierUI/networkwidget.cpp7
-rw-r--r--ZeroTierUI/networkwidget.h4
-rw-r--r--ZeroTierUI/networkwidget.ui68
4 files changed, 88 insertions, 59 deletions
diff --git a/ZeroTierUI/mainwindow.ui b/ZeroTierUI/mainwindow.ui
index cbd240a2..23762fec 100644
--- a/ZeroTierUI/mainwindow.ui
+++ b/ZeroTierUI/mainwindow.ui
@@ -39,6 +39,11 @@
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
+ <property name="styleSheet">
+ <string notr="true">QListWidget#networkListWidget::Item {
+ background-color: rgba(0,0,0,10);
+}s</string>
+ </property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
@@ -52,14 +57,17 @@
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="selectionMode">
- <enum>QAbstractItemView::SingleSelection</enum>
- </property>
- <property name="selectionBehavior">
- <enum>QAbstractItemView::SelectItems</enum>
+ <enum>QAbstractItemView::NoSelection</enum>
</property>
<property name="verticalScrollMode">
<enum>QAbstractItemView::ScrollPerPixel</enum>
</property>
+ <property name="spacing">
+ <number>5</number>
+ </property>
+ <property name="uniformItemSizes">
+ <bool>true</bool>
+ </property>
</widget>
</item>
<item>
@@ -70,12 +78,9 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <layout class="QHBoxLayout" name="horizontalLayout" stretch="0,0,0">
+ <layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
- <number>6</number>
- </property>
- <property name="sizeConstraint">
- <enum>QLayout::SetDefaultConstraint</enum>
+ <number>5</number>
</property>
<property name="leftMargin">
<number>0</number>
@@ -90,7 +95,7 @@
<number>0</number>
</property>
<item>
- <widget class="QToolButton" name="statusAndAddressButton">
+ <widget class="QPushButton" name="statusAndAddressButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
@@ -104,16 +109,28 @@
</font>
</property>
<property name="toolTip">
- <string>Click to Copy Address to Clipboard</string>
+ <string>Click to copy your address to clipboard.</string>
</property>
<property name="styleSheet">
- <string notr="true">border: 0;</string>
+ <string notr="true">QPushButton {
+ border: 0;
+ background-color: transparent;
+}
+
+QPushButton:focus {
+ background-color: rgba(0,0,0,25);
+}
+
+QPushButton:hover {
+ background-color: rgba(0,0,0,25);
+}
+</string>
</property>
<property name="text">
<string>0000000000 (OFFLINE, v0.0.0, 0 peers) </string>
</property>
- <property name="toolButtonStyle">
- <enum>Qt::ToolButtonTextOnly</enum>
+ <property name="flat">
+ <bool>true</bool>
</property>
</widget>
</item>
@@ -137,40 +154,19 @@
<property name="maxLength">
<number>16</number>
</property>
- <property name="frame">
- <bool>false</bool>
- </property>
<property name="placeholderText">
<string>(Numeric ID of Network to Join)</string>
</property>
</widget>
</item>
<item>
- <widget class="QToolButton" name="joinNetworkButton">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="font">
- <font>
- <family>Courier</family>
- <pointsize>12</pointsize>
- <weight>50</weight>
- <bold>false</bold>
- <underline>false</underline>
- </font>
- </property>
+ <widget class="QPushButton" name="joinNetworkButton">
<property name="toolTip">
<string>Join Network</string>
</property>
<property name="text">
<string>Join</string>
</property>
- <property name="toolButtonStyle">
- <enum>Qt::ToolButtonTextOnly</enum>
- </property>
</widget>
</item>
</layout>
diff --git a/ZeroTierUI/networkwidget.cpp b/ZeroTierUI/networkwidget.cpp
index 02561405..d71c6f12 100644
--- a/ZeroTierUI/networkwidget.cpp
+++ b/ZeroTierUI/networkwidget.cpp
@@ -105,9 +105,8 @@ void NetworkWidget::on_networkIdPushButton_clicked()
QApplication::clipboard()->setText(ui->networkIdPushButton->text());
}
-void NetworkWidget::on_ipListWidget_doubleClicked(const QModelIndex &index)
+void NetworkWidget::on_ipListWidget_itemActivated(QListWidgetItem *item)
{
- QListWidgetItem *ci = ui->ipListWidget->currentItem();
- if (ci)
- QApplication::clipboard()->setText(ci->text());
+ if (item)
+ QApplication::clipboard()->setText(item->text());
}
diff --git a/ZeroTierUI/networkwidget.h b/ZeroTierUI/networkwidget.h
index 9bc31ab4..e177f25b 100644
--- a/ZeroTierUI/networkwidget.h
+++ b/ZeroTierUI/networkwidget.h
@@ -4,6 +4,7 @@
#include <string>
#include <QWidget>
+#include <QListWidgetItem>
namespace Ui {
class NetworkWidget;
@@ -28,8 +29,7 @@ public:
private slots:
void on_leaveNetworkButton_clicked();
void on_networkIdPushButton_clicked();
-
- void on_ipListWidget_doubleClicked(const QModelIndex &index);
+ void on_ipListWidget_itemActivated(QListWidgetItem *item);
private:
Ui::NetworkWidget *ui;
diff --git a/ZeroTierUI/networkwidget.ui b/ZeroTierUI/networkwidget.ui
index f515f2d8..8b2c51fb 100644
--- a/ZeroTierUI/networkwidget.ui
+++ b/ZeroTierUI/networkwidget.ui
@@ -19,6 +19,9 @@
<property name="windowTitle">
<string>Network</string>
</property>
+ <property name="class" stdset="0">
+ <string>NetworkWidget</string>
+ </property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>6</number>
@@ -83,12 +86,6 @@
</item>
<item row="2" column="1">
<widget class="QPushButton" name="networkIdPushButton">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
<property name="font">
<font>
<weight>75</weight>
@@ -96,10 +93,25 @@
</font>
</property>
<property name="toolTip">
- <string>Click to Copy Network ID to Clipboard</string>
+ <string>Click to copy network ID to clipboard.</string>
</property>
<property name="styleSheet">
- <string notr="true">border: 0; padding: 0; margin: 0; text-align: left;</string>
+ <string notr="true">QPushButton {
+ border: 0;
+ padding: 0;
+ margin: 0;
+ text-align: left;
+ background-color: transparent;
+}
+
+QPushButton:focus {
+ background-color: rgba(0,0,0,25);
+}
+
+QPushButton:hover {
+ background-color: rgba(0,0,0,25);
+}
+</string>
</property>
<property name="text">
<string>0000000000000000</string>
@@ -253,7 +265,7 @@
</property>
<property name="font">
<font>
- <pointsize>10</pointsize>
+ <pointsize>8</pointsize>
</font>
</property>
<property name="text">
@@ -264,6 +276,19 @@
</property>
</widget>
</item>
+ <item>
+ <spacer name="horizontalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>1</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
</layout>
</widget>
</item>
@@ -332,11 +357,18 @@
<pointsize>12</pointsize>
</font>
</property>
- <property name="focusPolicy">
- <enum>Qt::NoFocus</enum>
- </property>
<property name="toolTip">
- <string>Double-click to Copy IP Address to Clipboard.</string>
+ <string>Double-click IP to copy to clipboard.</string>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">QListWidget {
+ background-color: rgba(0,0,0,10);
+}
+
+QListWidget:hover {
+ background-color: rgba(0,0,0,25);
+}
+</string>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
@@ -402,16 +434,13 @@
</spacer>
</item>
<item>
- <widget class="QToolButton" name="leaveNetworkButton">
+ <widget class="QPushButton" name="leaveNetworkButton">
<property name="font">
<font>
<pointsize>10</pointsize>
<underline>false</underline>
</font>
</property>
- <property name="styleSheet">
- <string notr="true">padding: 0.1em; margin:0;</string>
- </property>
<property name="text">
<string>Leave Network</string>
</property>
@@ -425,6 +454,11 @@
</item>
</layout>
</widget>
+ <tabstops>
+ <tabstop>networkIdPushButton</tabstop>
+ <tabstop>ipListWidget</tabstop>
+ <tabstop>leaveNetworkButton</tabstop>
+ </tabstops>
<resources/>
<connections/>
</ui>