Browse Source

UI appearance tweaks.

Adam Ierymenko 11 years ago
parent
commit
e0cb5caef2

+ 3 - 3
ZeroTierUI/mainwindow.ui

@@ -6,7 +6,7 @@
    <rect>
    <rect>
     <x>0</x>
     <x>0</x>
     <y>0</y>
     <y>0</y>
-    <width>668</width>
+    <width>720</width>
     <height>300</height>
     <height>300</height>
    </rect>
    </rect>
   </property>
   </property>
@@ -229,8 +229,8 @@
     <rect>
     <rect>
      <x>0</x>
      <x>0</x>
      <y>0</y>
      <y>0</y>
-     <width>668</width>
-     <height>24</height>
+     <width>720</width>
+     <height>22</height>
     </rect>
     </rect>
    </property>
    </property>
    <property name="font">
    <property name="font">

+ 8 - 2
ZeroTierUI/networkwidget.cpp

@@ -159,6 +159,12 @@ void NetworkWidget::on_networkIdButton_clicked()
 
 
 void NetworkWidget::on_ipListWidget_itemActivated(QListWidgetItem *item)
 void NetworkWidget::on_ipListWidget_itemActivated(QListWidgetItem *item)
 {
 {
-		if (item)
-			QApplication::clipboard()->setText(item->text());
+	if (item)
+		QApplication::clipboard()->setText(item->text());
+}
+
+void NetworkWidget::on_ipListWidget_currentItemChanged(QListWidgetItem *current, QListWidgetItem *previous)
+{
+	if (current)
+		QApplication::clipboard()->setText(current->text());
 }
 }

+ 1 - 0
ZeroTierUI/networkwidget.h

@@ -57,6 +57,7 @@ private slots:
 	void on_leaveNetworkButton_clicked();
 	void on_leaveNetworkButton_clicked();
 	void on_networkIdButton_clicked();
 	void on_networkIdButton_clicked();
 	void on_ipListWidget_itemActivated(QListWidgetItem *item);
 	void on_ipListWidget_itemActivated(QListWidgetItem *item);
+	void on_ipListWidget_currentItemChanged(QListWidgetItem *current, QListWidgetItem *previous);
 
 
 private:
 private:
 	Ui::NetworkWidget *ui;
 	Ui::NetworkWidget *ui;

+ 52 - 2
ZeroTierUI/networkwidget.ui

@@ -95,6 +95,24 @@
            </property>
            </property>
           </widget>
           </widget>
          </item>
          </item>
+         <item>
+          <widget class="QLabel" name="label_2">
+           <property name="font">
+            <font>
+             <pointsize>14</pointsize>
+            </font>
+           </property>
+           <property name="text">
+            <string>[</string>
+           </property>
+           <property name="textFormat">
+            <enum>Qt::PlainText</enum>
+           </property>
+           <property name="textInteractionFlags">
+            <set>Qt::NoTextInteraction</set>
+           </property>
+          </widget>
+         </item>
          <item>
          <item>
           <widget class="QLabel" name="nameLabel">
           <widget class="QLabel" name="nameLabel">
            <property name="font">
            <property name="font">
@@ -114,7 +132,7 @@
             <enum>Qt::PlainText</enum>
             <enum>Qt::PlainText</enum>
            </property>
            </property>
            <property name="alignment">
            <property name="alignment">
-            <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+            <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
            </property>
            </property>
            <property name="textInteractionFlags">
            <property name="textInteractionFlags">
             <set>Qt::NoTextInteraction</set>
             <set>Qt::NoTextInteraction</set>
@@ -124,6 +142,37 @@
            </property>
            </property>
           </widget>
           </widget>
          </item>
          </item>
+         <item>
+          <widget class="QLabel" name="label_3">
+           <property name="font">
+            <font>
+             <pointsize>14</pointsize>
+            </font>
+           </property>
+           <property name="text">
+            <string>]</string>
+           </property>
+           <property name="textFormat">
+            <enum>Qt::PlainText</enum>
+           </property>
+           <property name="textInteractionFlags">
+            <set>Qt::NoTextInteraction</set>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <spacer name="horizontalSpacer_3">
+           <property name="orientation">
+            <enum>Qt::Horizontal</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>40</width>
+             <height>20</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
         </layout>
         </layout>
        </widget>
        </widget>
       </item>
       </item>
@@ -384,6 +433,7 @@
         </property>
         </property>
         <property name="font">
         <property name="font">
          <font>
          <font>
+          <pointsize>12</pointsize>
           <underline>false</underline>
           <underline>false</underline>
          </font>
          </font>
         </property>
         </property>
@@ -419,7 +469,7 @@
          </font>
          </font>
         </property>
         </property>
         <property name="statusTip">
         <property name="statusTip">
-         <string>Double-click an IP to copy it to the clipboard.</string>
+         <string>IP addresses assigned to this interface; click to copy to clipboard.</string>
         </property>
         </property>
         <property name="frameShape">
         <property name="frameShape">
          <enum>QFrame::NoFrame</enum>
          <enum>QFrame::NoFrame</enum>

+ 10 - 7
ZeroTierUI/stylesheet.css

@@ -11,7 +11,7 @@ QToolButton:focus {
 }
 }
 QToolButton:hover {
 QToolButton:hover {
 	background: palette(highlight);
 	background: palette(highlight);
-        color: palette(highlight-text);
+				color: palette(highlight-text);
 }
 }
 QToolButton:pressed {
 QToolButton:pressed {
 	border: 1px solid #000000;
 	border: 1px solid #000000;
@@ -70,14 +70,17 @@ QListWidget.ipAddressList::item:hover {
 	border-bottom: 1px solid palette(link);
 	border-bottom: 1px solid palette(link);
 }
 }
 
 
+QStatusBar {
+	background: palette(button);
+}
+
 QLabel.networkName {
 QLabel.networkName {
-	padding: 0 0.8em 0.1em 0;
+	padding: 0;
 	margin: 0;
 	margin: 0;
-	text-align: right;
 }
 }
 
 
-QStatusBar {
-        background: palette(button);
+#networkIdButton {
+	padding: 0.2em 0 0 0;
 }
 }
 
 
 #joinNetworkButton {
 #joinNetworkButton {
@@ -86,8 +89,8 @@ QStatusBar {
 }
 }
 
 
 #noNetworksLabel {
 #noNetworksLabel {
-        background: transparent;
-        color: #ffffff;
+	background: transparent;
+	color: #ffffff;
 }
 }
 
 
 #networkListWidget {
 #networkListWidget {