Fixes #225 fix am/pm for timestamps

This commit is contained in:
fourtf
2018-01-17 18:36:12 +01:00
parent 4ddb4616ee
commit f3357cf0f4
12 changed files with 77 additions and 11 deletions
+4 -2
View File
@@ -18,7 +18,9 @@
#define SCROLL_SMOOTH "Enable smooth scrolling"
#define SCROLL_NEWMSG "Enable smooth scrolling for new messages"
#define TIMESTAMP_FORMATS "hh:mm a", "h:mm a", "HH:mm", "H:mm"
// clang-format off
#define TIMESTAMP_FORMATS "hh:mm a", "h:mm a", "hh:mm:ss a", "h:mm:ss a", "HH:mm", "H:mm", "HH:mm:ss", "H:mm:ss"
// clang-format on
namespace chatterino {
namespace widgets {
@@ -55,7 +57,7 @@ AppearancePage::AppearancePage()
messages.append(this->createCheckBox("Show timestamp", settings.showTimestamps));
auto tbox = messages.emplace<QHBoxLayout>();
{
tbox.emplace<QLabel>("timestamp format:");
tbox.emplace<QLabel>("timestamp format (a = am/pm):");
tbox.append(this->createComboBox({TIMESTAMP_FORMATS}, settings.timestampFormat));
}
messages.append(this->createCheckBox("Show badges", settings.showBadges));
+1 -3
View File
@@ -27,9 +27,7 @@ ModerationPage::ModerationPage()
auto text = layout.emplace<QTextEdit>().getElement();
settings.moderationActions.connect([=](const QString &str, auto) {
text->setPlainText(str); //
});
text->setPlainText(settings.moderationActions);
QObject::connect(text, &QTextEdit::textChanged, this,
[this] { this->itemsChangedTimer.start(200); });