From d5535558805178c3c5eca101f54d4333a5738b8e Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Fri, 10 Jan 2014 21:40:38 -0800 Subject: [PATCH] Add "you have not joined any networks" placeholder if networks list is empty. --- ZeroTierUI/mainwindow.cpp | 2 ++ ZeroTierUI/mainwindow.ui | 69 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 70 insertions(+), 1 deletion(-) diff --git a/ZeroTierUI/mainwindow.cpp b/ZeroTierUI/mainwindow.cpp index fc434782f..90c69d2a9 100644 --- a/ZeroTierUI/mainwindow.cpp +++ b/ZeroTierUI/mainwindow.cpp @@ -238,6 +238,8 @@ void MainWindow::customEvent(QEvent *event) } } + ui->noNetworksLabel->setVisible(ui->networkListWidget->count() == 0); + if (this->myAddress.size()) ui->addressButton->setText(this->myAddress); else ui->addressButton->setText(" "); diff --git a/ZeroTierUI/mainwindow.ui b/ZeroTierUI/mainwindow.ui index 306e4523e..d97ece8d4 100644 --- a/ZeroTierUI/mainwindow.ui +++ b/ZeroTierUI/mainwindow.ui @@ -34,6 +34,73 @@ 0 + + + + + + + + + 0 + 0 + 0 + + + + + + + + + 0 + 0 + 0 + + + + + + + + + 127 + 127 + 127 + + + + + + + + + 16 + + + + QFrame::NoFrame + + + You Have Not Joined Any Networks + + + Qt::PlainText + + + Qt::AlignCenter + + + true + + + 25 + + + Qt::NoTextInteraction + + + @@ -135,7 +202,7 @@ QPushButton:pressed { s - + true