From 11ce37a11e8015451a82119770251d81eeb1ffaf Mon Sep 17 00:00:00 2001 From: PianetaRadio <78976006+PianetaRadio@users.noreply.github.com> Date: Thu, 24 Nov 2022 20:24:58 +0100 Subject: [PATCH] Dark theme #33 --- mainwindow.cpp | 25 +++---- mainwindow.h | 2 + mainwindow.ui | 196 ++++++++++++++++++++++--------------------------- 3 files changed, 99 insertions(+), 124 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 110af63..52a9c6d 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -129,6 +129,7 @@ MainWindow::MainWindow(QWidget *parent) //Dark theme if (guiConf.darkTheme) { + //QFile darkStyleFile(":/dark/stylesheet.qss"); QFile darkStyleFile(":qdarkstyle/dark/darkstyle.qss"); if (!darkStyleFile.exists()) ui->statusbar->showMessage("Unable to set stylesheet, file not found!"); @@ -1472,10 +1473,10 @@ void MainWindow::on_action_AboutCatRadio_triggered() QString version = QString::number(VERSION_MAJ)+"."+QString::number(VERSION_MIN)+"."+QString::number(VERSION_MIC); msgBox.setText("CatRadio Radio control software
version "+version+" "+RELEASE_DATE); msgBox.setInformativeText("

Copyright (C) 2022 Gianfranco Sordetti IZ8EWD
" - "www.pianetaradio.it

" + "www.pianetaradio.it

" "

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
" "This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
" - "You should have received a copy of the GNU General Public License along with this program. If not, see www.gnu.org/licenses.

"); + "You should have received a copy of the GNU General Public License along with this program. If not, see www.gnu.org/licenses.

"); msgBox.setIcon(QMessageBox::Information); msgBox.setStandardButtons(QMessageBox::Ok); @@ -1502,27 +1503,23 @@ void MainWindow::on_action_AboutHamLib_triggered() msgBox.exec(); } -/** void MainWindow::on_action_AboutDarkTheme_triggered() { QMessageBox msgBox; msgBox.setWindowTitle("About Dark Theme"); msgBox.setTextFormat(Qt::RichText); - msgBox.setText("Dark Theme); - msgBox.setInformativeText("

Copyright (C) ...
" - "www....

" - "

The MIT License (MIT)

+ msgBox.setText("QDarkStyleSheet"); + msgBox.setInformativeText("

Copyright (c) 2013-2019 Colin Duquesnoy
" + "github.com/ColinDuquesnoy/QDarkStyleSheet

" + "

The MIT License (MIT)

" "

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
" "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
" - "THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

"); - msgBox.setIcon(QMessageBox::NoIcon); + "THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

" + "

Images contained in this project is licensed under CC-BY license.

"); + msgBox.setIcon(QMessageBox::Information); msgBox.setStandardButtons(QMessageBox::Ok); - - QPixmap icon("catradio.png"); - msgBox.setIconPixmap(icon); - msgBox.exec(); -}**/ +} void MainWindow::on_action_CatRadioHomepage_triggered() { diff --git a/mainwindow.h b/mainwindow.h index ac89ff1..092c277 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -210,6 +210,8 @@ private slots: void on_action_RadioInfo_triggered(); + void on_action_AboutDarkTheme_triggered(); + private: Ui::MainWindow *ui; QTimer *timer; diff --git a/mainwindow.ui b/mainwindow.ui index e55d219..fbfd1b7 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -1256,11 +1256,11 @@ - 7 + 8 - RF Power + RF Pwr Qt::AlignCenter @@ -1327,7 +1327,7 @@ - 7 + 8 @@ -1345,7 +1345,7 @@ - 7 + 8 @@ -1459,7 +1459,7 @@ - 7 + 8 @@ -1520,61 +1520,6 @@ 5 - - - - - 0 - 0 - - - - - 30 - 0 - - - - 0 - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - - 8 - - - - Comp - - - - - - - - 7 - - - - MIC Gain - - - Qt::AlignCenter - - - @@ -1637,8 +1582,23 @@ - - + + + + + 8 + + + + MIC Gain + + + Qt::AlignCenter + + + + + 0 @@ -1659,39 +1619,6 @@ - - - - - 0 - 0 - - - - - 8 - - - - Mon - - - - - - - - 7 - - - - Monitor - - - Qt::AlignCenter - - - @@ -1723,21 +1650,6 @@ - - - - - 7 - - - - Comp - - - Qt::AlignCenter - - - @@ -1760,6 +1672,64 @@ + + + + + 0 + 0 + + + + + 30 + 0 + + + + 0 + + + Qt::AlignCenter + + + + + + + + 0 + 0 + + + + + 8 + + + + Comp + + + + + + + + 0 + 0 + + + + + 8 + + + + Moni + + + @@ -2062,6 +2032,7 @@ + @@ -2121,6 +2092,11 @@ Radio info + + + About Dark Theme + +