new settings page
This commit is contained in:
+15
-14
@@ -25,7 +25,7 @@ public:
|
||||
|
||||
/// Appearance
|
||||
BoolSetting showTimestamps = {"/appearance/messages/showTimestamps", true};
|
||||
BoolSetting enableAnimationsWhenFocused = {
|
||||
BoolSetting animationsWhenFocused = {
|
||||
"/appearance/enableAnimationsWhenFocused", false};
|
||||
QStringSetting timestampFormat = {"/appearance/messages/timestampFormat",
|
||||
"h:mm"};
|
||||
@@ -48,26 +48,27 @@ public:
|
||||
// {"/appearance/messages/collapseLongMessages", false};
|
||||
IntSetting collpseMessagesMinLines = {
|
||||
"/appearance/messages/collapseMessagesMinLines", 0};
|
||||
BoolSetting alternateMessageBackground = {
|
||||
BoolSetting alternateMessages = {
|
||||
"/appearance/messages/alternateMessageBackground", false};
|
||||
IntSetting uiScale = {"/appearance/uiScale", 0};
|
||||
IntSetting boldScale = {"/appearance/boldScale", 57};
|
||||
BoolSetting windowTopMost = {"/appearance/windowAlwaysOnTop", false};
|
||||
BoolSetting showTabCloseButton = {"/appearance/showTabCloseButton", true};
|
||||
BoolSetting showTabLive = {"/appearance/showTabLiveButton", false};
|
||||
BoolSetting hidePreferencesButton = {"/appearance/hidePreferencesButton",
|
||||
false};
|
||||
BoolSetting hideUserButton = {"/appearance/hideUserButton", false};
|
||||
BoolSetting enableSmoothScrolling = {"/appearance/smoothScrolling", true};
|
||||
BoolSetting enableSmoothScrollingNewMessages = {
|
||||
"/appearance/smoothScrollingNewMessages", false};
|
||||
BoolSetting enableUsernameBold = {"/appearance/messages/boldUsernames",
|
||||
false};
|
||||
BoolSetting boldUsernames = {"/appearance/messages/boldUsernames", false};
|
||||
// BoolSetting customizable splitheader
|
||||
BoolSetting showViewerCount = {"/appearance/splitheader/showViewerCount",
|
||||
false};
|
||||
BoolSetting showTitle = {"/appearance/splitheader/showTitle", false};
|
||||
BoolSetting showGame = {"/appearance/splitheader/showGame", false};
|
||||
BoolSetting showUptime = {"/appearance/splitheader/showUptime", false};
|
||||
BoolSetting headerViewerCount = {"/appearance/splitheader/showViewerCount",
|
||||
false};
|
||||
BoolSetting headerStreamTitle = {"/appearance/splitheader/showTitle",
|
||||
false};
|
||||
BoolSetting headerGame = {"/appearance/splitheader/showGame", false};
|
||||
BoolSetting headerUptime = {"/appearance/splitheader/showUptime", false};
|
||||
FloatSetting customThemeMultiplier = {"/appearance/customThemeMultiplier",
|
||||
-0.5f};
|
||||
// BoolSetting useCustomWindowFrame = {"/appearance/useCustomWindowFrame",
|
||||
@@ -100,7 +101,7 @@ public:
|
||||
IntSetting smallStreamerLimit = {
|
||||
"/behaviour/autocompletion/smallStreamerLimit", 1000};
|
||||
|
||||
BoolSetting pauseChatHover = {"/behaviour/pauseChatHover", false};
|
||||
BoolSetting pauseChatOnHover = {"/behaviour/pauseChatHover", false};
|
||||
|
||||
/// Commands
|
||||
BoolSetting allowCommandsAtEnd = {"/commands/allowCommandsAtEnd", false};
|
||||
@@ -112,16 +113,16 @@ public:
|
||||
BoolSetting enableBttvEmotes = {"/emotes/enableBTTVEmotes", true};
|
||||
BoolSetting enableFfzEmotes = {"/emotes/enableFFZEmotes", true};
|
||||
BoolSetting enableEmojis = {"/emotes/enableEmojis", true};
|
||||
BoolSetting enableGifAnimations = {"/emotes/enableGifAnimations", true};
|
||||
BoolSetting animateEmotes = {"/emotes/enableGifAnimations", true};
|
||||
FloatSetting emoteScale = {"/emotes/scale", 1.f};
|
||||
|
||||
QStringSetting emojiSet = {"/emotes/emojiSet", "EmojiOne 2"};
|
||||
|
||||
/// Links
|
||||
BoolSetting linksDoubleClickOnly = {"/links/doubleClickToOpen", false};
|
||||
BoolSetting enableLinkInfoTooltip = {"/links/linkInfoTooltip", false};
|
||||
BoolSetting enableUnshortLinks = {"/links/unshortLinks", false};
|
||||
BoolSetting enableLowercaseLink = {"/links/linkLowercase", true};
|
||||
BoolSetting linkInfoTooltip = {"/links/linkInfoTooltip", false};
|
||||
BoolSetting unshortLinks = {"/links/unshortLinks", false};
|
||||
BoolSetting lowercaseDomains = {"/links/linkLowercase", true};
|
||||
|
||||
/// Ignored phrases
|
||||
QStringSetting ignoredPhraseReplace = {"/ignore/ignoredPhraseReplace",
|
||||
|
||||
@@ -28,7 +28,8 @@ namespace detail {
|
||||
{
|
||||
return -0.8;
|
||||
}
|
||||
else if (themeName == "Custom") {
|
||||
else if (themeName == "Custom")
|
||||
{
|
||||
return getSettings()->customThemeMultiplier.getValue();
|
||||
}
|
||||
|
||||
@@ -214,7 +215,7 @@ void Theme::actuallyUpdate(double hue, double multiplier)
|
||||
this->messages.textColors.system = QColor(140, 127, 127);
|
||||
|
||||
this->messages.backgrounds.regular = splits.background;
|
||||
this->messages.backgrounds.alternate = getColor(0, sat, 0.93);
|
||||
this->messages.backgrounds.alternate = getColor(0, sat, 0.95);
|
||||
|
||||
if (isLight_)
|
||||
{
|
||||
|
||||
@@ -82,8 +82,8 @@ WindowManager::WindowManager()
|
||||
this->wordFlagsListener_.addSetting(settings->enableEmojis);
|
||||
this->wordFlagsListener_.addSetting(settings->enableFfzEmotes);
|
||||
this->wordFlagsListener_.addSetting(settings->enableTwitchEmotes);
|
||||
this->wordFlagsListener_.addSetting(settings->enableUsernameBold);
|
||||
this->wordFlagsListener_.addSetting(settings->enableLowercaseLink);
|
||||
this->wordFlagsListener_.addSetting(settings->boldUsernames);
|
||||
this->wordFlagsListener_.addSetting(settings->lowercaseDomains);
|
||||
this->wordFlagsListener_.cb = [this](auto) {
|
||||
this->updateWordTypeMask(); //
|
||||
};
|
||||
@@ -127,7 +127,7 @@ void WindowManager::updateWordTypeMask()
|
||||
|
||||
// bits
|
||||
flags.set(MEF::BitsAmount);
|
||||
flags.set(settings->enableGifAnimations ? MEF::BitsAnimated
|
||||
flags.set(settings->animateEmotes ? MEF::BitsAnimated
|
||||
: MEF::BitsStatic);
|
||||
|
||||
// badges
|
||||
@@ -147,9 +147,9 @@ void WindowManager::updateWordTypeMask()
|
||||
// misc
|
||||
flags.set(MEF::AlwaysShow);
|
||||
flags.set(MEF::Collapsed);
|
||||
flags.set(settings->enableUsernameBold ? MEF::BoldUsername
|
||||
flags.set(settings->boldUsernames ? MEF::BoldUsername
|
||||
: MEF::NonBoldUsername);
|
||||
flags.set(settings->enableLowercaseLink ? MEF::LowercaseLink
|
||||
flags.set(settings->lowercaseDomains ? MEF::LowercaseLink
|
||||
: MEF::OriginalLink);
|
||||
|
||||
// update flags
|
||||
@@ -384,7 +384,7 @@ void WindowManager::initialize(Settings &settings, Paths &paths)
|
||||
|
||||
settings.timestampFormat.connect(
|
||||
[this](auto, auto) { this->forceLayoutChannelViews(); });
|
||||
settings.alternateMessageBackground.connect(
|
||||
settings.alternateMessages.connect(
|
||||
[this](auto, auto) { this->forceLayoutChannelViews(); });
|
||||
settings.separateMessages.connect(
|
||||
[this](auto, auto) { this->forceLayoutChannelViews(); });
|
||||
|
||||
@@ -10,7 +10,7 @@ void GIFTimer::initialize()
|
||||
{
|
||||
this->timer.setInterval(30);
|
||||
|
||||
getSettings()->enableGifAnimations.connect([this](bool enabled, auto) {
|
||||
getSettings()->animateEmotes.connect([this](bool enabled, auto) {
|
||||
if (enabled)
|
||||
this->timer.start();
|
||||
else
|
||||
@@ -18,7 +18,7 @@ void GIFTimer::initialize()
|
||||
});
|
||||
|
||||
QObject::connect(&this->timer, &QTimer::timeout, [this] {
|
||||
if (getSettings()->enableAnimationsWhenFocused &&
|
||||
if (getSettings()->animationsWhenFocused &&
|
||||
qApp->activeWindow() == nullptr)
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user