From 72f3075836b9cbeae3df132ac31c9e6142cd1ba8 Mon Sep 17 00:00:00 2001 From: Uwe Risse Date: Sun, 4 Jun 2023 14:11:55 +0200 Subject: [PATCH] A better way to set style and color of the hound button. --- widgets/mainwindow.cpp | 5 ----- widgets/mainwindow.ui | 11 +++++++++++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 4078be222..11b22237f 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -2506,7 +2506,6 @@ void MainWindow::statusChanged() ui->txb6->setEnabled(true); ui->txrb6->setEnabled(true); ui->houndButton->setChecked(false); - ui->houndButton->setStyleSheet(""); } } @@ -7025,7 +7024,6 @@ void MainWindow::on_actionFT8_triggered() } if(SpecOp::HOUND == m_specOp) { ui->houndButton->setChecked(true); - ui->houndButton->setStyleSheet("background-color: #ff0000;"); ui->txFirstCheckBox->setChecked(false); ui->txFirstCheckBox->setEnabled(false); ui->cbAutoSeq->setEnabled(false); @@ -7048,7 +7046,6 @@ void MainWindow::on_actionFT8_triggered() } if(m_specOp != SpecOp::HOUND) { ui->houndButton->setChecked(false); - ui->houndButton->setStyleSheet(""); } m_specOp=m_config.special_op_id(); @@ -10587,13 +10584,11 @@ QString MainWindow::WSPR_message() void MainWindow::on_houndButton_clicked (bool checked) { if (checked) { - ui->houndButton->setStyleSheet("background-color: #ff0000;"); m_config.setSpecial_Hound(); ui->tx1->setVisible(true); ui->tx1->setEnabled(true); ui->txb1->setEnabled(true); } else { - ui->houndButton->setStyleSheet(""); m_config.setSpecial_None(); keep_frequency = true; QTimer::singleShot (250, [=] {keep_frequency = false;}); diff --git a/widgets/mainwindow.ui b/widgets/mainwindow.ui index 57ef59ff7..d22601b34 100644 --- a/widgets/mainwindow.ui +++ b/widgets/mainwindow.ui @@ -2901,6 +2901,17 @@ QLabel[oob="true"] { Toggle FT8 hound mode On/Off + + QPushButton:checked { + color: rgb(0, 0, 0); + background-color: red; + border-style: outset; + border-width: 1px; + border-radius: 5px; + border-color: black; + padding: 3px; +} + H