mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
reformat
This commit is contained in:
parent
391d75f208
commit
cd5972522b
|
@ -347,8 +347,7 @@ void TwitchModerationElement::addToContainer(MessageLayoutContainer &container,
|
|||
QSize size(int(container.getScale() * 16),
|
||||
int(container.getScale() * 16));
|
||||
|
||||
for (const auto &action :
|
||||
getApp()->moderationActions->items)
|
||||
for (const auto &action : getApp()->moderationActions->items)
|
||||
{
|
||||
if (auto image = action.getImage())
|
||||
{
|
||||
|
|
|
@ -509,8 +509,7 @@ void TwitchMessageBuilder::parseUsername()
|
|||
{
|
||||
this->usernameColor_ = QColor(color);
|
||||
}
|
||||
else if (getSettings()->colorizeNicknames &&
|
||||
this->tags.contains("user-id"))
|
||||
else if (getSettings()->colorizeNicknames && this->tags.contains("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 delta = event->delta();
|
||||
const auto selectTab = [this](int delta) {
|
||||
delta > 0
|
||||
? this->notebook_->selectPreviousTab()
|
||||
: this->notebook_->selectNextTab();
|
||||
delta > 0 ? this->notebook_->selectPreviousTab()
|
||||
: this->notebook_->selectNextTab();
|
||||
};
|
||||
// If it's true
|
||||
// Then the user uses the trackpad or perhaps the most accurate mouse
|
||||
|
|
|
@ -175,18 +175,19 @@ Split::Split(QWidget *parent)
|
|||
this->setSizePolicy(QSizePolicy::MinimumExpanding,
|
||||
QSizePolicy::MinimumExpanding);
|
||||
|
||||
this->managedConnect(modifierStatusChanged,
|
||||
[this](Qt::KeyboardModifiers status) {
|
||||
if ((status == showSplitOverlayModifiers /*|| status == showAddSplitRegions*/) &&
|
||||
this->managedConnect(modifierStatusChanged, [this](Qt::KeyboardModifiers
|
||||
status) {
|
||||
if ((status ==
|
||||
showSplitOverlayModifiers /*|| status == showAddSplitRegions*/) &&
|
||||
this->isMouseOver_)
|
||||
{
|
||||
this->overlay_->show();
|
||||
}
|
||||
else
|
||||
{
|
||||
this->overlay_->hide();
|
||||
}
|
||||
});
|
||||
{
|
||||
this->overlay_->show();
|
||||
}
|
||||
else
|
||||
{
|
||||
this->overlay_->hide();
|
||||
}
|
||||
});
|
||||
|
||||
this->input_->ui_.textEdit->focused.connect(
|
||||
[this] { this->focused.invoke(); });
|
||||
|
|
|
@ -176,9 +176,7 @@ void SplitHeader::initializeLayout()
|
|||
switch (button)
|
||||
{
|
||||
case Qt::LeftButton:
|
||||
if (getApp()
|
||||
->moderationActions->items
|
||||
.empty())
|
||||
if (getApp()->moderationActions->items.empty())
|
||||
{
|
||||
getApp()->windows->showSettingsDialog(
|
||||
SettingsDialogPreference::
|
||||
|
@ -222,19 +220,19 @@ void SplitHeader::initializeLayout()
|
|||
});
|
||||
|
||||
// update moderation button when items changed
|
||||
this->managedConnect(
|
||||
getApp()->moderationActions->items.delayedItemsChanged, [this] {
|
||||
if (getApp()->moderationActions->items.empty())
|
||||
{
|
||||
if (this->split_->getModerationMode())
|
||||
this->split_->setModerationMode(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this->split_->getModerationMode())
|
||||
this->split_->setModerationMode(true);
|
||||
}
|
||||
});
|
||||
this->managedConnect(getApp()->moderationActions->items.delayedItemsChanged,
|
||||
[this] {
|
||||
if (getApp()->moderationActions->items.empty())
|
||||
{
|
||||
if (this->split_->getModerationMode())
|
||||
this->split_->setModerationMode(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this->split_->getModerationMode())
|
||||
this->split_->setModerationMode(true);
|
||||
}
|
||||
});
|
||||
|
||||
layout->setMargin(0);
|
||||
layout->setSpacing(0);
|
||||
|
@ -507,9 +505,8 @@ void SplitHeader::updateChannelText()
|
|||
|
||||
void SplitHeader::updateModerationModeIcon()
|
||||
{
|
||||
auto moderationMode =
|
||||
this->split_->getModerationMode() &&
|
||||
!getApp()->moderationActions->items.empty();
|
||||
auto moderationMode = this->split_->getModerationMode() &&
|
||||
!getApp()->moderationActions->items.empty();
|
||||
|
||||
this->moderationButton_->setPixmap(
|
||||
moderationMode ? getApp()->resources->buttons.modModeEnabled
|
||||
|
|
Loading…
Reference in a new issue