minor changes

This commit is contained in:
fourtf 2018-10-20 19:15:15 +02:00
parent a2795dec38
commit 4f4d717a52
3 changed files with 30 additions and 25 deletions

View file

@ -128,12 +128,6 @@ void LookPage::addMessageTab(LayoutCreator<QVBoxLayout> layout)
// font
layout.append(this->createFontChanger());
// bold-slider
{
auto box = layout.emplace<QHBoxLayout>().withoutMargin();
box.emplace<QLabel>("Boldness: ");
box.append(this->createBoldScaleSlider());
}
// --
layout.emplace<Line>(false);
@ -150,8 +144,8 @@ void LookPage::addMessageTab(LayoutCreator<QVBoxLayout> layout)
// --
layout.emplace<Line>(false);
// seperate
layout.append(this->createCheckBox("Seperate lines",
// separate
layout.append(this->createCheckBox("Lines between messages",
getSettings()->separateMessages));
// alternate
@ -161,12 +155,23 @@ void LookPage::addMessageTab(LayoutCreator<QVBoxLayout> layout)
// --
layout.emplace<Line>(false);
// bold-slider
{
auto box = layout.emplace<QHBoxLayout>().withoutMargin();
box.emplace<QLabel>("Username boldness: ");
box.append(this->createBoldScaleSlider());
}
// bold usernames
layout.append(this->createCheckBox("Bold mentions (@username)",
getSettings()->enableUsernameBold));
// --
layout.emplace<Line>(false);
// lowercase links
layout.append(this->createCheckBox("Lowercase domains",
getSettings()->enableLowercaseLink));
// bold usernames
layout.append(this->createCheckBox("Bold @usernames",
getSettings()->enableUsernameBold));
// collapsing
{
@ -583,14 +588,14 @@ QLayout *LookPage::createBoldScaleSlider()
// },
// this->connections_);
QPushButton *button = new QPushButton("Reset");
layout->addWidget(button);
button->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Policy::Fixed);
// QPushButton *button = new QPushButton("Reset");
// layout->addWidget(button);
// button->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Policy::Fixed);
QObject::connect(button, &QPushButton::clicked, [=]() {
getSettings()->boldScale.setValue(57);
slider->setValue(57);
});
// QObject::connect(button, &QPushButton::clicked, [=]() {
// getSettings()->boldScale.setValue(57);
// slider->setValue(57);
//});
return layout;
}

View file

@ -34,12 +34,11 @@ NotificationPage::NotificationPage()
settings.append(this->createCheckBox(
"Flash taskbar", getSettings()->notificationFlashTaskbar));
settings.append(this->createCheckBox(
"Playsound (doesn't mute the Windows 8.x sound of toasts)",
getSettings()->notificationPlaySound));
"Play sound", getSettings()->notificationPlaySound));
#ifdef Q_OS_WIN
settings.append(this->createCheckBox(
"Enable toasts (currently only for windows 8.x or 10)",
getSettings()->notificationToast));
settings.append(
this->createCheckBox("Enable toasts (Windows 8 or later)",
getSettings()->notificationToast));
#endif
auto customSound =
layout.emplace<QHBoxLayout>().withoutMargin();

View file

@ -98,7 +98,8 @@ void SplitInput::initLayout()
// textEditLength visibility
getSettings()->showMessageLength.connect(
[this](const bool &value, auto) {
this->ui_.textEditLength->setHidden(!value);
// this->ui_.textEditLength->setHidden(!value);
this->editTextChanged();
},
this->managedConnections_);
}
@ -376,7 +377,7 @@ void SplitInput::editTextChanged()
QString labelText;
if (text.length() == 0) {
if (text.length() == 0 || getSettings()->showMessageLength) {
labelText = "";
} else {
labelText = QString::number(text.length());