From e0cb5caef21243cf045cecc25ed064869d1594d4 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Mon, 27 Jan 2014 14:55:56 -0800 Subject: [PATCH] UI appearance tweaks. --- ZeroTierUI/mainwindow.ui | 6 ++-- ZeroTierUI/networkwidget.cpp | 10 +++++-- ZeroTierUI/networkwidget.h | 1 + ZeroTierUI/networkwidget.ui | 54 ++++++++++++++++++++++++++++++++++-- ZeroTierUI/stylesheet.css | 21 ++++++++------ 5 files changed, 76 insertions(+), 16 deletions(-) diff --git a/ZeroTierUI/mainwindow.ui b/ZeroTierUI/mainwindow.ui index 913f2683..235eb48d 100644 --- a/ZeroTierUI/mainwindow.ui +++ b/ZeroTierUI/mainwindow.ui @@ -6,7 +6,7 @@ 0 0 - 668 + 720 300 @@ -229,8 +229,8 @@ 0 0 - 668 - 24 + 720 + 22 diff --git a/ZeroTierUI/networkwidget.cpp b/ZeroTierUI/networkwidget.cpp index bdc18d92..a99fef1e 100644 --- a/ZeroTierUI/networkwidget.cpp +++ b/ZeroTierUI/networkwidget.cpp @@ -159,6 +159,12 @@ void NetworkWidget::on_networkIdButton_clicked() 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()); } diff --git a/ZeroTierUI/networkwidget.h b/ZeroTierUI/networkwidget.h index f46dff20..9ff1ef99 100644 --- a/ZeroTierUI/networkwidget.h +++ b/ZeroTierUI/networkwidget.h @@ -57,6 +57,7 @@ private slots: void on_leaveNetworkButton_clicked(); void on_networkIdButton_clicked(); void on_ipListWidget_itemActivated(QListWidgetItem *item); + void on_ipListWidget_currentItemChanged(QListWidgetItem *current, QListWidgetItem *previous); private: Ui::NetworkWidget *ui; diff --git a/ZeroTierUI/networkwidget.ui b/ZeroTierUI/networkwidget.ui index c4bf9734..a4acaf1e 100644 --- a/ZeroTierUI/networkwidget.ui +++ b/ZeroTierUI/networkwidget.ui @@ -95,6 +95,24 @@ + + + + + 14 + + + + [ + + + Qt::PlainText + + + Qt::NoTextInteraction + + + @@ -114,7 +132,7 @@ Qt::PlainText - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter Qt::NoTextInteraction @@ -124,6 +142,37 @@ + + + + + 14 + + + + ] + + + Qt::PlainText + + + Qt::NoTextInteraction + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + @@ -384,6 +433,7 @@ + 12 false @@ -419,7 +469,7 @@ - Double-click an IP to copy it to the clipboard. + IP addresses assigned to this interface; click to copy to clipboard. QFrame::NoFrame diff --git a/ZeroTierUI/stylesheet.css b/ZeroTierUI/stylesheet.css index c8764ea2..9639f2b5 100644 --- a/ZeroTierUI/stylesheet.css +++ b/ZeroTierUI/stylesheet.css @@ -11,7 +11,7 @@ QToolButton:focus { } QToolButton:hover { background: palette(highlight); - color: palette(highlight-text); + color: palette(highlight-text); } QToolButton:pressed { border: 1px solid #000000; @@ -70,14 +70,17 @@ QListWidget.ipAddressList::item:hover { border-bottom: 1px solid palette(link); } -QLabel.networkName { - padding: 0 0.8em 0.1em 0; - margin: 0; - text-align: right; +QStatusBar { + background: palette(button); } -QStatusBar { - background: palette(button); +QLabel.networkName { + padding: 0; + margin: 0; +} + +#networkIdButton { + padding: 0.2em 0 0 0; } #joinNetworkButton { @@ -86,8 +89,8 @@ QStatusBar { } #noNetworksLabel { - background: transparent; - color: #ffffff; + background: transparent; + color: #ffffff; } #networkListWidget {