Compare commits

...

18 Commits

Author SHA1 Message Date
tooomm
ad7e1795db tweaks 2022-01-19 01:06:22 +01:00
tooomm
8b809826d5 fix 2022-01-19 00:10:09 +01:00
tooomm
121fcf09d4 rewording 2022-01-19 00:09:23 +01:00
tooomm
717a272291 Update dlg_settings.cpp 2022-01-18 23:37:25 +01:00
tooomm
4fc81b159d fix label 2022-01-18 23:23:32 +01:00
tooomm
66bcedd9c4 reorder 2022-01-18 23:16:04 +01:00
tooomm
c450471f12 Update dlg_settings.cpp 2022-01-18 22:52:10 +01:00
tooomm
56fb4e09e0 hex label 2022-01-18 22:45:55 +01:00
tooomm
7a7db574b3 stretch adjustments 2022-01-18 22:01:32 +01:00
tooomm
5f8d5479da fix 2022-01-18 21:34:50 +01:00
tooomm
1538d4b187 set column stretch 2022-01-18 21:32:30 +01:00
tooomm
0ea4a73fd2 fix 2022-01-18 21:26:01 +01:00
tooomm
cb5b8d34b2 simplify hex hint 2022-01-18 21:14:01 +01:00
tooomm
a7faa5c139 clear buttons 2022-01-18 21:00:42 +01:00
tooomm
6561ca216c Revert "grid adjustments"
This reverts commit 2f924ccb4e.
2022-01-18 20:58:31 +01:00
tooomm
2f924ccb4e grid adjustments 2022-01-18 20:34:13 +01:00
tooomm
f98809eabf adjust span 2022-01-18 16:40:26 +01:00
tooomm
71b79915d3 fix layout 2022-01-18 15:29:36 +01:00
2 changed files with 25 additions and 17 deletions

View File

@@ -421,7 +421,7 @@ void AppearanceSettingsPage::retranslateUi()
cardScalingCheckBox.setText(tr("Scale cards on mouse over"));
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"));
@@ -805,6 +805,7 @@ MessagesSettingsPage::MessagesSettingsPage()
connect(&invertHighlightForeground, SIGNAL(stateChanged(int)), this, SLOT(updateTextHighlightColor(int)));
mentionColor = new QLineEdit();
mentionColor->setPlaceholderText(tr("Enter HEX code"));
mentionColor->setText(SettingsCache::instance().getChatMentionColor());
updateMentionPreview();
connect(mentionColor, SIGNAL(textChanged(QString)), this, SLOT(updateColor(QString)));
@@ -826,29 +827,36 @@ 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(&messagePopups, 4, 0);
chatGrid->addWidget(&mentionPopups, 5, 0);
chatGrid->addWidget(&roomHistory, 6, 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(&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, 3);
chatGrid->setColumnStretch(1, 1);
chatGroupBox = new QGroupBox;
chatGroupBox->setLayout(chatGrid);
highlightColor = new QLineEdit();
highlightColor->setPlaceholderText(tr("Enter HEX code"));
highlightColor->setText(SettingsCache::instance().getChatHighlightColor());
updateHighlightPreview();
connect(highlightColor, SIGNAL(textChanged(QString)), this, SLOT(updateHighlightColor(QString)));
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 first column more than following ones
highlightNotice->setColumnStretch(0, 3);
highlightNotice->setColumnStretch(1, 1);
highlightGroupBox = new QGroupBox;
highlightGroupBox->setLayout(highlightNotice);
@@ -993,11 +1001,11 @@ void MessagesSettingsPage::retranslateUi()
ignoreUnregUserMessages.setText(tr("Ignore private messages sent by unregistered users"));
invertMentionForeground.setText(tr("Invert text color"));
invertHighlightForeground.setText(tr("Invert text color"));
mentionColorStringLabel.setText(tr("Color"));
highlightColorStringLabel.setText(tr("Color"));
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"));
hexLabel.setText(tr("(Color is hexadecimal)"));
hexHighlightLabel.setText(tr("(Color is hexadecimal)"));
customAlertStringLabel.setText(tr("Separate words with a space, alphanumeric characters only"));
}

View File

@@ -206,9 +206,9 @@ private:
QLineEdit *mentionColor;
QLineEdit *highlightColor;
QLineEdit *customAlertString;
QLabel hexLabel;
QLabel hexHighlightLabel;
QLabel customAlertStringLabel;
QLabel mentionColorStringLabel;
QLabel highlightColorStringLabel;
void storeSettings();
void updateMentionPreview();