From 56fb4e09e003403c687791a844fae983723fad3f Mon Sep 17 00:00:00 2001 From: tooomm Date: Tue, 18 Jan 2022 22:45:55 +0100 Subject: [PATCH] hex label --- cockatrice/src/dlg_settings.cpp | 29 ++++++++++++++++------------- cockatrice/src/dlg_settings.h | 1 + 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/cockatrice/src/dlg_settings.cpp b/cockatrice/src/dlg_settings.cpp index cfc8f8c94..8d6c96ad4 100644 --- a/cockatrice/src/dlg_settings.cpp +++ b/cockatrice/src/dlg_settings.cpp @@ -829,14 +829,15 @@ MessagesSettingsPage::MessagesSettingsPage() auto *chatGrid = new QGridLayout; chatGrid->addWidget(&chatMentionCheckBox, 0, 0); - chatGrid->addWidget(&invertMentionForeground, 0, 1, Qt::AlignRight); - chatGrid->addWidget(mentionColor, 0, 2); - chatGrid->addWidget(&chatMentionCompleterCheckbox, 1, 0, 1, 2); - chatGrid->addWidget(&ignoreUnregUsersMainChat, 2, 0, 1, 3); - chatGrid->addWidget(&ignoreUnregUserMessages, 3, 0, 1, 3); - chatGrid->addWidget(&messagePopups, 4, 0, 1, 3); - chatGrid->addWidget(&mentionPopups, 5, 0, 1, 3); - chatGrid->addWidget(&roomHistory, 6, 0, 1, 3); + chatGrid->addWidget(&invertMentionForeground, 0, 1); + chatGrid->addWidget(hexStringLabel, 0, 2, Qt::AlignRight); + chatGrid->addWidget(mentionColor, 0, 3); + chatGrid->addWidget(&chatMentionCompleterCheckbox, 1, 0, 1, -1); + chatGrid->addWidget(&ignoreUnregUsersMainChat, 2, 0, 1, -1); + chatGrid->addWidget(&ignoreUnregUserMessages, 3, 0, 1, -1); + chatGrid->addWidget(&messagePopups, 4, 0, 1, -1); + chatGrid->addWidget(&mentionPopups, 5, 0, 1, -1); + chatGrid->addWidget(&roomHistory, 6, 0, 1, -1); // Expand first column more than following ones chatGrid->setColumnStretch(0, 2); chatGrid->setColumnStretch(1, 1); @@ -852,9 +853,10 @@ MessagesSettingsPage::MessagesSettingsPage() auto *highlightNotice = new QGridLayout; highlightNotice->addWidget(customAlertString, 0, 0); - highlightNotice->addWidget(&invertHighlightForeground, 0, 1, Qt::AlignRight); - highlightNotice->addWidget(highlightColor, 0, 2); - highlightNotice->addWidget(&customAlertStringLabel, 1, 0, 1, 2); + highlightNotice->addWidget(&invertHighlightForeground, 0, 1); + highlightNotice->addWidget(hexStringLabel, 0, 2, Qt::AlignRight); + highlightNotice->addWidget(highlightColor, 0, 3); + highlightNotice->addWidget(&customAlertStringLabel, 1, 0, 1, -1); // Expand first column more than following ones highlightNotice->setColumnStretch(0, 2); highlightNotice->setColumnStretch(1, 1); @@ -1000,8 +1002,9 @@ void MessagesSettingsPage::retranslateUi() messageShortcuts->setTitle(tr("In-game message macros")); ignoreUnregUsersMainChat.setText(tr("Ignore chat room messages sent by unregistered users")); ignoreUnregUserMessages.setText(tr("Ignore private messages sent by unregistered users")); - invertMentionForeground.setText(tr("Invert text color (HEX)")); - invertHighlightForeground.setText(tr("Invert text color (HEX)")); + invertMentionForeground.setText(tr("Invert text color")); + invertHighlightForeground.setText(tr("Invert text color")); + hexStringLabel.setText("HEX"); messagePopups.setText(tr("Enable desktop notifications for private messages")); mentionPopups.setText(tr("Enable desktop notification for mentions")); roomHistory.setText(tr("Enable room message history on join")); diff --git a/cockatrice/src/dlg_settings.h b/cockatrice/src/dlg_settings.h index a9e475200..ae65a5d5d 100644 --- a/cockatrice/src/dlg_settings.h +++ b/cockatrice/src/dlg_settings.h @@ -207,6 +207,7 @@ private: QLineEdit *highlightColor; QLineEdit *customAlertString; QLabel customAlertStringLabel; + QLabel hexStringLabel; void storeSettings(); void updateMentionPreview();