mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-07 18:43:26 -08:00
UI: Settings dialog layout fixes (#4531)
- Span chat and alert-word checkboxes across the full grid width - Add right-aligned Color labels and HEX placeholders to the mention, highlight and channel color fields - Reword the horizontal hand option to "requires more space"
This commit is contained in:
parent
2d625575f6
commit
0798d28dc9
3 changed files with 30 additions and 26 deletions
|
|
@ -676,7 +676,7 @@ void AppearanceSettingsPage::retranslateUi()
|
|||
}
|
||||
|
||||
handGroupBox->setTitle(tr("Hand layout"));
|
||||
horizontalHandCheckBox.setText(tr("Display hand horizontally (wastes space)"));
|
||||
horizontalHandCheckBox.setText(tr("Display hand horizontally (requires more space)"));
|
||||
leftJustifiedHandCheckBox.setText(tr("Enable left justification"));
|
||||
|
||||
tableGroupBox->setTitle(tr("Table grid layout"));
|
||||
|
|
|
|||
|
|
@ -88,18 +88,21 @@ MessagesSettingsPage::MessagesSettingsPage()
|
|||
|
||||
auto *chatGrid = new QGridLayout;
|
||||
chatGrid->addWidget(&chatMentionCheckBox, 0, 0);
|
||||
chatGrid->addWidget(&invertMentionForeground, 0, 1);
|
||||
chatGrid->addWidget(&mentionColorStringLabel, 0, 1, Qt::AlignRight);
|
||||
chatGrid->addWidget(mentionColor, 0, 2);
|
||||
chatGrid->addWidget(&chatMentionCompleterCheckbox, 1, 0);
|
||||
chatGrid->addWidget(&ignoreUnregUsersMainChat, 2, 0);
|
||||
chatGrid->addWidget(&hexLabel, 1, 2);
|
||||
chatGrid->addWidget(&ignoreUnregUserMessages, 3, 0);
|
||||
chatGrid->addWidget(&ignoreNonBuddyUserMessages, 4, 0);
|
||||
chatGrid->addWidget(&messagePopups, 5, 0);
|
||||
chatGrid->addWidget(&mentionPopups, 6, 0);
|
||||
chatGrid->addWidget(&roomHistory, 7, 0);
|
||||
chatGrid->addWidget(&ignoreAllPrivateMessagesCheckBox, 8, 0);
|
||||
chatGrid->addWidget(&useGameTimeCheckBox, 9, 0);
|
||||
chatGrid->addWidget(&invertMentionForeground, 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(&ignoreNonBuddyUserMessages, 4, 0, 1, -1);
|
||||
chatGrid->addWidget(&messagePopups, 5, 0, 1, -1);
|
||||
chatGrid->addWidget(&mentionPopups, 6, 0, 1, -1);
|
||||
chatGrid->addWidget(&roomHistory, 7, 0, 1, -1);
|
||||
chatGrid->addWidget(&ignoreAllPrivateMessagesCheckBox, 8, 0, 1, -1);
|
||||
chatGrid->addWidget(&useGameTimeCheckBox, 9, 0, 1, -1);
|
||||
// Expand the first column more than the following ones
|
||||
chatGrid->setColumnStretch(0, 3);
|
||||
chatGrid->setColumnStretch(1, 1);
|
||||
chatGroupBox = new QGroupBox;
|
||||
chatGroupBox->setLayout(chatGrid);
|
||||
|
||||
|
|
@ -109,11 +112,14 @@ MessagesSettingsPage::MessagesSettingsPage()
|
|||
connect(highlightColor, &QLineEdit::textChanged, this, &MessagesSettingsPage::updateHighlightColor);
|
||||
|
||||
auto *highlightNotice = new QGridLayout;
|
||||
highlightNotice->addWidget(highlightColor, 0, 2);
|
||||
highlightNotice->addWidget(&invertHighlightForeground, 0, 1);
|
||||
highlightNotice->addWidget(&hexHighlightLabel, 1, 2);
|
||||
highlightNotice->addWidget(customAlertString, 0, 0);
|
||||
highlightNotice->addWidget(&customAlertStringLabel, 1, 0);
|
||||
highlightNotice->addWidget(&highlightColorStringLabel, 0, 1, Qt::AlignRight);
|
||||
highlightNotice->addWidget(highlightColor, 0, 2);
|
||||
highlightNotice->addWidget(&invertHighlightForeground, 0, 3);
|
||||
highlightNotice->addWidget(&customAlertStringLabel, 1, 0, 1, -1);
|
||||
// Expand the first column more than the following ones
|
||||
highlightNotice->setColumnStretch(0, 3);
|
||||
highlightNotice->setColumnStretch(1, 1);
|
||||
customAlertStringLabel.setBuddy(customAlertString);
|
||||
highlightGroupBox = new QGroupBox;
|
||||
highlightGroupBox->setLayout(highlightNotice);
|
||||
|
|
@ -131,10 +137,8 @@ MessagesSettingsPage::MessagesSettingsPage()
|
|||
auto *channelGrid = new QGridLayout;
|
||||
channelGrid->addWidget(&channelUnreadColorLabel, 0, 0);
|
||||
channelGrid->addWidget(channelUnreadColor, 0, 1);
|
||||
channelGrid->addWidget(&hexChannelUnreadLabel, 0, 2);
|
||||
channelGrid->addWidget(&channelMentionColorLabel, 1, 0);
|
||||
channelGrid->addWidget(channelMentionColor, 1, 1);
|
||||
channelGrid->addWidget(&hexChannelMentionLabel, 1, 2);
|
||||
channelGroupBox = new QGroupBox;
|
||||
channelGroupBox->setLayout(channelGrid);
|
||||
|
||||
|
|
@ -331,6 +335,8 @@ void MessagesSettingsPage::retranslateUi()
|
|||
channelGroupBox->setTitle(tr("Room channel tabs"));
|
||||
channelUnreadColorLabel.setText(tr("Unread messages color"));
|
||||
channelMentionColorLabel.setText(tr("Mentioned messages color"));
|
||||
channelUnreadColor->setPlaceholderText(tr("Enter HEX code"));
|
||||
channelMentionColor->setPlaceholderText(tr("Enter HEX code"));
|
||||
chatMentionCheckBox.setText(tr("Enable chat mentions"));
|
||||
chatMentionCompleterCheckbox.setText(tr("Enable mention completer"));
|
||||
messageGroupBox->setTitle(tr("In-game message macros"));
|
||||
|
|
@ -341,15 +347,15 @@ void MessagesSettingsPage::retranslateUi()
|
|||
ignoreNonBuddyUserMessages.setText(tr("Ignore private messages sent by non-buddy users"));
|
||||
invertMentionForeground.setText(tr("Invert text color"));
|
||||
invertHighlightForeground.setText(tr("Invert text color"));
|
||||
mentionColorStringLabel.setText(tr("Color"));
|
||||
highlightColorStringLabel.setText(tr("Color"));
|
||||
mentionColor->setPlaceholderText(tr("Enter HEX code"));
|
||||
highlightColor->setPlaceholderText(tr("Enter HEX code"));
|
||||
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"));
|
||||
ignoreAllPrivateMessagesCheckBox.setText(tr("Ignore all private messages"));
|
||||
useGameTimeCheckBox.setText(tr("Use game time instead of local time in game logs"));
|
||||
hexLabel.setText(tr("(Color is hexadecimal)"));
|
||||
hexHighlightLabel.setText(tr("(Color is hexadecimal)"));
|
||||
hexChannelUnreadLabel.setText(tr("(Color is hexadecimal)"));
|
||||
hexChannelMentionLabel.setText(tr("(Color is hexadecimal)"));
|
||||
customAlertStringLabel.setText(tr("Separate words with a space, alphanumeric characters only"));
|
||||
customAlertString->setPlaceholderText(tr("Word1 Word2 Word3"));
|
||||
aAdd->setText(tr("Add New Message"));
|
||||
|
|
|
|||
|
|
@ -58,13 +58,11 @@ private:
|
|||
QLineEdit *channelUnreadColor;
|
||||
QLineEdit *channelMentionColor;
|
||||
QLineEdit *customAlertString;
|
||||
QLabel hexLabel;
|
||||
QLabel hexHighlightLabel;
|
||||
QLabel channelUnreadColorLabel;
|
||||
QLabel channelMentionColorLabel;
|
||||
QLabel hexChannelUnreadLabel;
|
||||
QLabel hexChannelMentionLabel;
|
||||
QLabel customAlertStringLabel;
|
||||
QLabel mentionColorStringLabel;
|
||||
QLabel highlightColorStringLabel;
|
||||
QLabel explainMessagesLabel;
|
||||
|
||||
void storeSettings();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue