From f311be96a9b8290266dd1b75db40d78ff221e8b4 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Thu, 19 Dec 2013 14:59:52 -0800 Subject: More UI cleanup... --- ZeroTierUI/mainwindow.cpp | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'ZeroTierUI/mainwindow.cpp') diff --git a/ZeroTierUI/mainwindow.cpp b/ZeroTierUI/mainwindow.cpp index afc981c6..fdc70f74 100644 --- a/ZeroTierUI/mainwindow.cpp +++ b/ZeroTierUI/mainwindow.cpp @@ -56,6 +56,10 @@ MainWindow::MainWindow(QWidget *parent) : this->setEnabled(false); // gets enabled when updates are received mainWindow = this; this->cyclesSinceResponseFromService = 0; + + QWidgetList widgets = this->findChildren(); + foreach(QWidget* widget, widgets) + widget->setAttribute(Qt::WA_MacShowFocusRect,false); } MainWindow::~MainWindow() @@ -186,19 +190,17 @@ void MainWindow::customEvent(QEvent *event) } } - if (this->myAddress.size()) { - QString st(this->myAddress); - st += " ("; - st += this->myStatus; - st += ", v"; - st += this->myVersion; - st += ", "; - st += QString::number(this->numPeers); - st += " peers)"; - while (st.size() < 45) - st += QChar::Space; - ui->statusAndAddressButton->setText(st); - } + if (this->myAddress.size()) + ui->addressButton->setText(this->myAddress); + else ui->addressButton->setText("??????????"); + + QString st(this->myStatus); + st += ", v"; + st += this->myVersion; + st += ", "; + st += QString::number(this->numPeers); + st += " direct links to peers"; + ui->statusLabel->setText(st); if (this->myStatus == "ONLINE") { if (!this->isEnabled()) @@ -266,7 +268,7 @@ void MainWindow::on_networkIdLineEdit_textChanged(const QString &text) ui->networkIdLineEdit->setText(newText); } -void MainWindow::on_statusAndAddressButton_clicked() +void MainWindow::on_addressButton_clicked() { QApplication::clipboard()->setText(this->myAddress); } -- cgit v1.2.3