diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-12-19 14:59:52 -0800 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-12-19 14:59:52 -0800 |
| commit | f311be96a9b8290266dd1b75db40d78ff221e8b4 (patch) | |
| tree | da270763cc40a536b96841a0ddd98228b9a18a93 /ZeroTierUI/mainwindow.cpp | |
| parent | 191d204674168d15a97277ba23098d6daf774dad (diff) | |
| download | infinitytier-f311be96a9b8290266dd1b75db40d78ff221e8b4.tar.gz infinitytier-f311be96a9b8290266dd1b75db40d78ff221e8b4.zip | |
More UI cleanup...
Diffstat (limited to 'ZeroTierUI/mainwindow.cpp')
| -rw-r--r-- | ZeroTierUI/mainwindow.cpp | 30 |
1 files changed, 16 insertions, 14 deletions
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<QWidget*>(); + 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); } |
