diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/frontend/qt_sdl/FirmwareSettingsDialog.cpp | 9 | ||||
-rw-r--r-- | src/frontend/qt_sdl/FirmwareSettingsDialog.h | 42 |
2 files changed, 39 insertions, 12 deletions
diff --git a/src/frontend/qt_sdl/FirmwareSettingsDialog.cpp b/src/frontend/qt_sdl/FirmwareSettingsDialog.cpp index 7857cdc..94e5f5a 100644 --- a/src/frontend/qt_sdl/FirmwareSettingsDialog.cpp +++ b/src/frontend/qt_sdl/FirmwareSettingsDialog.cpp @@ -20,6 +20,7 @@ #include "FirmwareSettingsDialog.h" #include "ui_FirmwareSettingsDialog.h" + FirmwareSettingsDialog* FirmwareSettingsDialog::currentDlg = nullptr; FirmwareSettingsDialog::FirmwareSettingsDialog(QWidget* parent) : QDialog(parent), ui(new Ui::FirmwareSettingsDialog) @@ -35,7 +36,13 @@ FirmwareSettingsDialog::FirmwareSettingsDialog(QWidget* parent) : QDialog(parent QDate birthDate = QDate(QDate::currentDate().year(), Config::FirmwareBirthdayMonth, Config::FirmwareBirthdayDay); ui->birthdayEdit->setDate(birthDate); - ui->colorsEdit->addItems(colours); + for (int i = 0; i < 16; i++) + { + QImage image(16, 16, QImage::Format_ARGB32); + image.fill(colors[i]); + QIcon icon(QPixmap::fromImage(image.copy())); + ui->colorsEdit->addItem(icon, colornames[i]); + } ui->colorsEdit->setCurrentIndex(Config::FirmwareFavouriteColour); ui->messageEdit->setText(Config::FirmwareMessage); diff --git a/src/frontend/qt_sdl/FirmwareSettingsDialog.h b/src/frontend/qt_sdl/FirmwareSettingsDialog.h index 5f8e5ff..ae4a795 100644 --- a/src/frontend/qt_sdl/FirmwareSettingsDialog.h +++ b/src/frontend/qt_sdl/FirmwareSettingsDialog.h @@ -30,24 +30,44 @@ class FirmwareSettingsDialog : public QDialog Q_OBJECT public: - const QStringList colours + const QStringList colornames { - "Greyish Blue", + "Greyish blue", "Brown", "Red", - "Light Pink", + "Light pink", "Orange", "Yellow", "Lime", - "Light Green", - "Dark Green", - "Turqoise", - "Light Blue", + "Light green", + "Dark green", + "Turquoise", + "Light blue", "Blue", - "Dark Blue", - "Dark Purple", - "Light Purple", - "Dark Pink" + "Dark blue", + "Dark purple", + "Light purple", + "Dark pink" + }; + + const QColor colors[16] = + { + QColor(97, 130, 154), + QColor(186, 73, 0), + QColor(251, 0, 24), + QColor(251, 138, 251), + QColor(251, 146, 0), + QColor(243, 227, 0), + QColor(170, 251, 0), + QColor(0, 251, 0), + QColor(0, 162, 56), + QColor(73, 219, 138), + QColor(48, 186, 243), + QColor(0, 89, 243), + QColor(0, 0, 146), + QColor(138, 0, 211), + QColor(211, 0, 235), + QColor(251, 0, 246) }; const QStringList languages |