mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
added additional checkbox for highlighted bits messages, fixes #1637
This commit is contained in:
parent
beda9e555f
commit
120f73db13
4 changed files with 22 additions and 16 deletions
|
@ -120,14 +120,16 @@ void HighlightModel::afterInit()
|
|||
std::vector<QStandardItem *> redeemedRow = this->createRow();
|
||||
setBoolItem(redeemedRow[Column::Pattern],
|
||||
getSettings()->enableRedeemedHighlight.getValue(), true, false);
|
||||
redeemedRow[Column::Pattern]->setData("Highlights redeemed with Bits",
|
||||
Qt::DisplayRole);
|
||||
setBoolItem(redeemedRow[Column::FlashTaskbar],
|
||||
getSettings()->enableRedeemedHighlightTaskbar.getValue(), true,
|
||||
false);
|
||||
setBoolItem(redeemedRow[Column::PlaySound],
|
||||
getSettings()->enableRedeemedHighlightSound.getValue(), true,
|
||||
false);
|
||||
redeemedRow[Column::Pattern]->setData(
|
||||
"Highlights redeemed with Twitch Bits", Qt::DisplayRole);
|
||||
// setBoolItem(redeemedRow[Column::FlashTaskbar],
|
||||
// getSettings()->enableRedeemedHighlightTaskbar.getValue(), true,
|
||||
// false);
|
||||
// setBoolItem(redeemedRow[Column::PlaySound],
|
||||
// getSettings()->enableRedeemedHighlightSound.getValue(), true,
|
||||
// false);
|
||||
redeemedRow[Column::FlashTaskbar]->setFlags(0);
|
||||
redeemedRow[Column::PlaySound]->setFlags(0);
|
||||
redeemedRow[Column::UseRegex]->setFlags(0);
|
||||
redeemedRow[Column::CaseSensitive]->setFlags(0);
|
||||
|
||||
|
@ -192,8 +194,8 @@ void HighlightModel::customRowSetData(const std::vector<QStandardItem *> &row,
|
|||
}
|
||||
else if (rowIndex == 3)
|
||||
{
|
||||
getSettings()->enableRedeemedHighlightTaskbar.setValue(
|
||||
value.toBool());
|
||||
// getSettings()->enableRedeemedHighlightTaskbar.setValue(
|
||||
// value.toBool());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -218,8 +220,8 @@ void HighlightModel::customRowSetData(const std::vector<QStandardItem *> &row,
|
|||
}
|
||||
else if (rowIndex == 3)
|
||||
{
|
||||
getSettings()->enableRedeemedHighlightSound.setValue(
|
||||
value.toBool());
|
||||
// getSettings()->enableRedeemedHighlightSound.setValue(
|
||||
// value.toBool());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -207,10 +207,10 @@ public:
|
|||
|
||||
BoolSetting enableRedeemedHighlight = {
|
||||
"/highlighting/redeemedHighlight/highlighted", true};
|
||||
BoolSetting enableRedeemedHighlightSound = {
|
||||
"/highlighting/redeemedHighlight/enableSound", false};
|
||||
BoolSetting enableRedeemedHighlightTaskbar = {
|
||||
"/highlighting/redeemedHighlight/enableTaskbarFlashing", false};
|
||||
// BoolSetting enableRedeemedHighlightSound = {
|
||||
// "/highlighting/redeemedHighlight/enableSound", false};
|
||||
// BoolSetting enableRedeemedHighlightTaskbar = {
|
||||
// "/highlighting/redeemedHighlight/enableTaskbarFlashing", false};
|
||||
QStringSetting redeemedHighlightSoundUrl = {
|
||||
"/highlighting/redeemedHighlightSoundUrl", ""};
|
||||
QStringSetting redeemedHighlightColor = {
|
||||
|
|
|
@ -445,6 +445,8 @@ void WindowManager::initialize(Settings &settings, Paths &paths)
|
|||
[this](auto, auto) { this->forceLayoutChannelViews(); });
|
||||
settings.collpseMessagesMinLines.connect(
|
||||
[this](auto, auto) { this->forceLayoutChannelViews(); });
|
||||
settings.enableRedeemedHighlight.connect(
|
||||
[this](auto, auto) { this->forceLayoutChannelViews(); });
|
||||
|
||||
this->initialized_ = true;
|
||||
}
|
||||
|
|
|
@ -359,6 +359,8 @@ void GeneralPage::initLayout(SettingsLayout &layout)
|
|||
// layout.addCheckbox("Mark last message you read");
|
||||
// layout.addDropdown("Last read message style", {"Default"});
|
||||
layout.addCheckbox("Show deleted messages", s.hideModerated, true);
|
||||
layout.addCheckbox("Highlight messages redeemed with Twitch Bits",
|
||||
s.enableRedeemedHighlight);
|
||||
layout.addDropdown<QString>(
|
||||
"Timestamps",
|
||||
{"Disable", "h:mm", "hh:mm", "h:mm a", "hh:mm a", "h:mm:ss", "hh:mm:ss",
|
||||
|
|
Loading…
Reference in a new issue