added setting for compact emotes Fixed #821
This commit is contained in:
@@ -103,6 +103,7 @@ void MessageLayoutContainer::_addElement(MessageLayoutElement *element,
|
|||||||
|
|
||||||
// compact emote offset
|
// compact emote offset
|
||||||
bool isCompactEmote =
|
bool isCompactEmote =
|
||||||
|
getSettings()->compactEmotes &&
|
||||||
!this->flags_.has(MessageFlag::DisableCompactEmotes) &&
|
!this->flags_.has(MessageFlag::DisableCompactEmotes) &&
|
||||||
element->getCreator().getFlags().has(MessageElementFlag::EmoteImages);
|
element->getCreator().getFlags().has(MessageElementFlag::EmoteImages);
|
||||||
|
|
||||||
@@ -148,6 +149,7 @@ void MessageLayoutContainer::breakLine()
|
|||||||
MessageLayoutElement *element = this->elements_.at(i).get();
|
MessageLayoutElement *element = this->elements_.at(i).get();
|
||||||
|
|
||||||
bool isCompactEmote =
|
bool isCompactEmote =
|
||||||
|
getSettings()->compactEmotes &&
|
||||||
!this->flags_.has(MessageFlag::DisableCompactEmotes) &&
|
!this->flags_.has(MessageFlag::DisableCompactEmotes) &&
|
||||||
element->getCreator().getFlags().has(
|
element->getCreator().getFlags().has(
|
||||||
MessageElementFlag::EmoteImages);
|
MessageElementFlag::EmoteImages);
|
||||||
|
|||||||
@@ -42,6 +42,8 @@ public:
|
|||||||
false};
|
false};
|
||||||
BoolSetting separateMessages = {"/appearance/messages/separateMessages",
|
BoolSetting separateMessages = {"/appearance/messages/separateMessages",
|
||||||
false};
|
false};
|
||||||
|
BoolSetting compactEmotes = {"/appearance/messages/compactEmotes", true};
|
||||||
|
|
||||||
// BoolSetting collapseLongMessages =
|
// BoolSetting collapseLongMessages =
|
||||||
// {"/appearance/messages/collapseLongMessages", false};
|
// {"/appearance/messages/collapseLongMessages", false};
|
||||||
IntSetting collpseMessagesMinLines = {
|
IntSetting collpseMessagesMinLines = {
|
||||||
|
|||||||
@@ -83,9 +83,12 @@ void LookPage::addInterfaceTab(LayoutCreator<QVBoxLayout> layout)
|
|||||||
|
|
||||||
QObject::connect(theme, &QComboBox::currentTextChanged,
|
QObject::connect(theme, &QComboBox::currentTextChanged,
|
||||||
[w](const QString &themeName) {
|
[w](const QString &themeName) {
|
||||||
if (themeName == "Custom") {
|
if (themeName == "Custom")
|
||||||
|
{
|
||||||
w->show();
|
w->show();
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
w->hide();
|
w->hide();
|
||||||
}
|
}
|
||||||
getApp()->windows->forceLayoutChannelViews();
|
getApp()->windows->forceLayoutChannelViews();
|
||||||
@@ -97,9 +100,12 @@ void LookPage::addInterfaceTab(LayoutCreator<QVBoxLayout> layout)
|
|||||||
|
|
||||||
{
|
{
|
||||||
w->setButtonSymbols(QDoubleSpinBox::NoButtons);
|
w->setButtonSymbols(QDoubleSpinBox::NoButtons);
|
||||||
if (getApp()->themes->themeName.getValue() != "Custom") {
|
if (getApp()->themes->themeName.getValue() != "Custom")
|
||||||
|
{
|
||||||
w->hide();
|
w->hide();
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
w->show();
|
w->show();
|
||||||
}
|
}
|
||||||
w->setRange(-1.0, 1.0);
|
w->setRange(-1.0, 1.0);
|
||||||
@@ -181,6 +187,9 @@ void LookPage::addMessageTab(LayoutCreator<QVBoxLayout> layout)
|
|||||||
layout.append(this->createCheckBox(
|
layout.append(this->createCheckBox(
|
||||||
"Alternate background", getSettings()->alternateMessageBackground));
|
"Alternate background", getSettings()->alternateMessageBackground));
|
||||||
|
|
||||||
|
layout.append(
|
||||||
|
this->createCheckBox("Compact emotes", getSettings()->compactEmotes));
|
||||||
|
|
||||||
layout.append(this->createCheckBox("Grey out historic messages",
|
layout.append(this->createCheckBox("Grey out historic messages",
|
||||||
getSettings()->greyOutHistoricMessages));
|
getSettings()->greyOutHistoricMessages));
|
||||||
// --
|
// --
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
#include "SettingsPage.hpp"
|
#include "SettingsPage.hpp"
|
||||||
|
|
||||||
|
#include "Application.hpp"
|
||||||
|
#include "singletons/WindowManager.hpp"
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
|
|
||||||
@@ -51,8 +54,8 @@ QCheckBox *SettingsPage::createCheckBox(
|
|||||||
// update setting on toggle
|
// update setting on toggle
|
||||||
QObject::connect(checkbox, &QCheckBox::toggled, this,
|
QObject::connect(checkbox, &QCheckBox::toggled, this,
|
||||||
[&setting](bool state) {
|
[&setting](bool state) {
|
||||||
qDebug() << "update checkbox value";
|
setting = state;
|
||||||
setting = state; //
|
getApp()->windows->forceLayoutChannelViews();
|
||||||
});
|
});
|
||||||
|
|
||||||
return checkbox;
|
return checkbox;
|
||||||
|
|||||||
Reference in New Issue
Block a user