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

View file

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

View file

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