hex label

This commit is contained in:
tooomm 2022-01-18 22:45:55 +01:00
parent 7a7db574b3
commit 56fb4e09e0
2 changed files with 17 additions and 13 deletions

View file

@ -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"));

View file

@ -207,6 +207,7 @@ private:
QLineEdit *highlightColor;
QLineEdit *customAlertString;
QLabel customAlertStringLabel;
QLabel hexStringLabel;
void storeSettings();
void updateMentionPreview();