reformat
This commit is contained in:
@@ -347,8 +347,7 @@ void TwitchModerationElement::addToContainer(MessageLayoutContainer &container,
|
|||||||
QSize size(int(container.getScale() * 16),
|
QSize size(int(container.getScale() * 16),
|
||||||
int(container.getScale() * 16));
|
int(container.getScale() * 16));
|
||||||
|
|
||||||
for (const auto &action :
|
for (const auto &action : getApp()->moderationActions->items)
|
||||||
getApp()->moderationActions->items)
|
|
||||||
{
|
{
|
||||||
if (auto image = action.getImage())
|
if (auto image = action.getImage())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -509,8 +509,7 @@ void TwitchMessageBuilder::parseUsername()
|
|||||||
{
|
{
|
||||||
this->usernameColor_ = QColor(color);
|
this->usernameColor_ = QColor(color);
|
||||||
}
|
}
|
||||||
else if (getSettings()->colorizeNicknames &&
|
else if (getSettings()->colorizeNicknames && this->tags.contains("user-id"))
|
||||||
this->tags.contains("user-id"))
|
|
||||||
{
|
{
|
||||||
this->usernameColor_ = getRandomColor(this->tags.value("user-id"));
|
this->usernameColor_ = getRandomColor(this->tags.value("user-id"));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -562,9 +562,8 @@ void NotebookTab::wheelEvent(QWheelEvent *event)
|
|||||||
const auto defaultMouseDelta = 120;
|
const auto defaultMouseDelta = 120;
|
||||||
const auto delta = event->delta();
|
const auto delta = event->delta();
|
||||||
const auto selectTab = [this](int delta) {
|
const auto selectTab = [this](int delta) {
|
||||||
delta > 0
|
delta > 0 ? this->notebook_->selectPreviousTab()
|
||||||
? this->notebook_->selectPreviousTab()
|
: this->notebook_->selectNextTab();
|
||||||
: this->notebook_->selectNextTab();
|
|
||||||
};
|
};
|
||||||
// If it's true
|
// If it's true
|
||||||
// Then the user uses the trackpad or perhaps the most accurate mouse
|
// Then the user uses the trackpad or perhaps the most accurate mouse
|
||||||
|
|||||||
@@ -175,18 +175,19 @@ Split::Split(QWidget *parent)
|
|||||||
this->setSizePolicy(QSizePolicy::MinimumExpanding,
|
this->setSizePolicy(QSizePolicy::MinimumExpanding,
|
||||||
QSizePolicy::MinimumExpanding);
|
QSizePolicy::MinimumExpanding);
|
||||||
|
|
||||||
this->managedConnect(modifierStatusChanged,
|
this->managedConnect(modifierStatusChanged, [this](Qt::KeyboardModifiers
|
||||||
[this](Qt::KeyboardModifiers status) {
|
status) {
|
||||||
if ((status == showSplitOverlayModifiers /*|| status == showAddSplitRegions*/) &&
|
if ((status ==
|
||||||
|
showSplitOverlayModifiers /*|| status == showAddSplitRegions*/) &&
|
||||||
this->isMouseOver_)
|
this->isMouseOver_)
|
||||||
{
|
{
|
||||||
this->overlay_->show();
|
this->overlay_->show();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->overlay_->hide();
|
this->overlay_->hide();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this->input_->ui_.textEdit->focused.connect(
|
this->input_->ui_.textEdit->focused.connect(
|
||||||
[this] { this->focused.invoke(); });
|
[this] { this->focused.invoke(); });
|
||||||
|
|||||||
@@ -176,9 +176,7 @@ void SplitHeader::initializeLayout()
|
|||||||
switch (button)
|
switch (button)
|
||||||
{
|
{
|
||||||
case Qt::LeftButton:
|
case Qt::LeftButton:
|
||||||
if (getApp()
|
if (getApp()->moderationActions->items.empty())
|
||||||
->moderationActions->items
|
|
||||||
.empty())
|
|
||||||
{
|
{
|
||||||
getApp()->windows->showSettingsDialog(
|
getApp()->windows->showSettingsDialog(
|
||||||
SettingsDialogPreference::
|
SettingsDialogPreference::
|
||||||
@@ -222,19 +220,19 @@ void SplitHeader::initializeLayout()
|
|||||||
});
|
});
|
||||||
|
|
||||||
// update moderation button when items changed
|
// update moderation button when items changed
|
||||||
this->managedConnect(
|
this->managedConnect(getApp()->moderationActions->items.delayedItemsChanged,
|
||||||
getApp()->moderationActions->items.delayedItemsChanged, [this] {
|
[this] {
|
||||||
if (getApp()->moderationActions->items.empty())
|
if (getApp()->moderationActions->items.empty())
|
||||||
{
|
{
|
||||||
if (this->split_->getModerationMode())
|
if (this->split_->getModerationMode())
|
||||||
this->split_->setModerationMode(true);
|
this->split_->setModerationMode(true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (this->split_->getModerationMode())
|
if (this->split_->getModerationMode())
|
||||||
this->split_->setModerationMode(true);
|
this->split_->setModerationMode(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
layout->setMargin(0);
|
layout->setMargin(0);
|
||||||
layout->setSpacing(0);
|
layout->setSpacing(0);
|
||||||
@@ -507,9 +505,8 @@ void SplitHeader::updateChannelText()
|
|||||||
|
|
||||||
void SplitHeader::updateModerationModeIcon()
|
void SplitHeader::updateModerationModeIcon()
|
||||||
{
|
{
|
||||||
auto moderationMode =
|
auto moderationMode = this->split_->getModerationMode() &&
|
||||||
this->split_->getModerationMode() &&
|
!getApp()->moderationActions->items.empty();
|
||||||
!getApp()->moderationActions->items.empty();
|
|
||||||
|
|
||||||
this->moderationButton_->setPixmap(
|
this->moderationButton_->setPixmap(
|
||||||
moderationMode ? getApp()->resources->buttons.modModeEnabled
|
moderationMode ? getApp()->resources->buttons.modModeEnabled
|
||||||
|
|||||||
Reference in New Issue
Block a user