removed red stripes and connected tape cut visuals
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
enum HistoricMessageAppearance {
|
||||
Crossed = (1 << 0),
|
||||
Greyed = (1 << 1),
|
||||
};
|
||||
|
||||
} // namespace chatterino
|
||||
@@ -103,9 +103,6 @@ void MessageLayout::actuallyLayout(int width, MessageElementFlags _flags)
|
||||
{
|
||||
this->layoutCount_++;
|
||||
|
||||
const auto addTest = this->message_->flags.hasAny(
|
||||
{MessageFlag::DisconnectedMessage, MessageFlag::ConnectedMessage});
|
||||
|
||||
auto messageFlags = this->message_->flags;
|
||||
|
||||
if (this->flags.has(MessageLayoutFlag::Expanded) ||
|
||||
@@ -117,14 +114,6 @@ void MessageLayout::actuallyLayout(int width, MessageElementFlags _flags)
|
||||
|
||||
this->container_->begin(width, this->scale_, messageFlags);
|
||||
|
||||
if (addTest)
|
||||
{
|
||||
this->container_->addElementNoLineBreak(new TestLayoutElement(
|
||||
EmptyElement::instance(), QSize(width, this->scale_ * 6),
|
||||
getTheme()->messages.backgrounds.regular, false));
|
||||
this->container_->breakLine();
|
||||
}
|
||||
|
||||
for (const auto &element : this->message_->elements)
|
||||
{
|
||||
if (getSettings()->hideModerated &&
|
||||
@@ -135,14 +124,6 @@ void MessageLayout::actuallyLayout(int width, MessageElementFlags _flags)
|
||||
element->addToContainer(*this->container_, _flags);
|
||||
}
|
||||
|
||||
if (addTest)
|
||||
{
|
||||
this->container_->breakLine();
|
||||
this->container_->addElement(new TestLayoutElement(
|
||||
EmptyElement::instance(), QSize(width, this->scale_ * 6),
|
||||
getTheme()->messages.backgrounds.regular, true));
|
||||
}
|
||||
|
||||
if (this->height_ != this->container_->getHeight())
|
||||
{
|
||||
this->deleteBuffer();
|
||||
@@ -205,29 +186,12 @@ void MessageLayout::paint(QPainter &painter, int width, int y, int messageIndex,
|
||||
app->themes->messages.disabled);
|
||||
// painter.fillRect(0, y, pixmap->width(), pixmap->height(),
|
||||
// QBrush(QColor(64, 64, 64, 64)));
|
||||
|
||||
if (getSettings()->redDisabledMessages)
|
||||
{
|
||||
painter.fillRect(0, y, pixmap->width(), pixmap->height(),
|
||||
QBrush(QColor(255, 0, 0, 63), Qt::BDiagPattern));
|
||||
// app->themes->messages.disabled);
|
||||
}
|
||||
}
|
||||
|
||||
if (this->message_->flags.has(MessageFlag::RecentMessage))
|
||||
{
|
||||
const auto &historicMessageAppearance =
|
||||
getSettings()->historicMessagesAppearance.getValue();
|
||||
if (historicMessageAppearance & HistoricMessageAppearance::Crossed)
|
||||
{
|
||||
painter.fillRect(0, y, pixmap->width(), pixmap->height(),
|
||||
QBrush(QColor(255, 0, 0, 63), Qt::BDiagPattern));
|
||||
}
|
||||
if (historicMessageAppearance & HistoricMessageAppearance::Greyed)
|
||||
{
|
||||
painter.fillRect(0, y, pixmap->width(), pixmap->height(),
|
||||
app->themes->messages.disabled);
|
||||
}
|
||||
painter.fillRect(0, y, pixmap->width(), pixmap->height(),
|
||||
app->themes->messages.disabled);
|
||||
}
|
||||
|
||||
// draw selection
|
||||
|
||||
@@ -368,72 +368,4 @@ int TextIconLayoutElement::getXFromIndex(int index)
|
||||
}
|
||||
}
|
||||
|
||||
// TestLayoutElement
|
||||
TestLayoutElement::TestLayoutElement(MessageElement &element, const QSize &size,
|
||||
const QColor &background, bool end)
|
||||
: MessageLayoutElement(element, size)
|
||||
, size_(size)
|
||||
, background_(background)
|
||||
, end_(end)
|
||||
{
|
||||
}
|
||||
|
||||
void TestLayoutElement::addCopyTextToString(QString &str, int from,
|
||||
int to) const
|
||||
{
|
||||
}
|
||||
|
||||
int TestLayoutElement::getSelectionIndexCount() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void TestLayoutElement::paint(QPainter &painter)
|
||||
{
|
||||
const auto dy = this->getRect().y();
|
||||
const auto color = end_ ? background_ : QColor(0, 0, 0, 127);
|
||||
|
||||
// make zig zag
|
||||
auto polygon = QPolygon();
|
||||
for (auto x = size_.height() / -2; x < size_.width() + 16;
|
||||
x += size_.height())
|
||||
{
|
||||
polygon.push_back({x, dy + 0});
|
||||
polygon.push_back({x + size_.height(), dy + size_.height()});
|
||||
x += size_.height();
|
||||
polygon.push_back({x, dy + size_.height()});
|
||||
polygon.push_back({x + size_.height(), dy + 0});
|
||||
}
|
||||
|
||||
// finish polygon
|
||||
polygon.push_back({size_.width(), 1000});
|
||||
polygon.push_back({0, 1000});
|
||||
|
||||
// finish polygon
|
||||
polygon.push_back({size_.width(), 1000});
|
||||
polygon.push_back({0, 1000});
|
||||
|
||||
// turn into path
|
||||
auto path = QPainterPath();
|
||||
path.addPolygon(polygon);
|
||||
|
||||
// draw
|
||||
painter.fillPath(path, color);
|
||||
painter.strokePath(path, QColor(127, 127, 127, 127));
|
||||
}
|
||||
|
||||
void TestLayoutElement::paintAnimated(QPainter &painter, int yOffset)
|
||||
{
|
||||
}
|
||||
|
||||
int TestLayoutElement::getMouseOverIndex(const QPoint &abs) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int TestLayoutElement::getXFromIndex(int index)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
} // namespace chatterino
|
||||
|
||||
@@ -125,25 +125,4 @@ private:
|
||||
QString line2;
|
||||
};
|
||||
|
||||
class TestLayoutElement : public MessageLayoutElement
|
||||
{
|
||||
public:
|
||||
TestLayoutElement(MessageElement &creator, const QSize &size,
|
||||
const QColor &background, bool end);
|
||||
|
||||
protected:
|
||||
void addCopyTextToString(QString &str, int from = 0,
|
||||
int to = INT_MAX) const override;
|
||||
int getSelectionIndexCount() const override;
|
||||
void paint(QPainter &painter) override;
|
||||
void paintAnimated(QPainter &painter, int yOffset) override;
|
||||
int getMouseOverIndex(const QPoint &abs) const override;
|
||||
int getXFromIndex(int index) override;
|
||||
|
||||
private:
|
||||
QSize size_;
|
||||
QColor background_;
|
||||
bool end_;
|
||||
};
|
||||
|
||||
} // namespace chatterino
|
||||
|
||||
@@ -233,7 +233,6 @@ void AbstractIrcServer::onConnected()
|
||||
|
||||
auto connected = makeSystemMessage("connected");
|
||||
connected->flags.set(MessageFlag::ConnectedMessage);
|
||||
connected->flags.set(MessageFlag::Centered);
|
||||
auto reconnected = makeSystemMessage("reconnected");
|
||||
reconnected->flags.set(MessageFlag::ConnectedMessage);
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
#include "controllers/highlights/HighlightPhrase.hpp"
|
||||
#include "controllers/moderationactions/ModerationAction.hpp"
|
||||
#include "messages/HistoricMessageAppearance.hpp"
|
||||
|
||||
#include <pajlada/settings/setting.hpp>
|
||||
#include <pajlada/settings/settinglistener.hpp>
|
||||
@@ -32,9 +31,6 @@ public:
|
||||
Qt::VerPattern};
|
||||
QStringSetting lastMessageColor = {"/appearance/messages/lastMessageColor",
|
||||
""};
|
||||
IntSetting historicMessagesAppearance = {
|
||||
"/appearance/messages/historicMessagesAppearance",
|
||||
HistoricMessageAppearance::Crossed | HistoricMessageAppearance::Greyed};
|
||||
BoolSetting showEmptyInput = {"/appearance/showEmptyInputBox", true};
|
||||
BoolSetting showMessageLength = {"/appearance/messages/showMessageLength",
|
||||
false};
|
||||
@@ -68,7 +64,6 @@ public:
|
||||
BoolSetting headerUptime = {"/appearance/splitheader/showUptime", false};
|
||||
FloatSetting customThemeMultiplier = {"/appearance/customThemeMultiplier",
|
||||
-0.5f};
|
||||
BoolSetting redDisabledMessages = {"/appearance/redStripes", true};
|
||||
// BoolSetting useCustomWindowFrame = {"/appearance/useCustomWindowFrame",
|
||||
// false};
|
||||
|
||||
|
||||
@@ -190,7 +190,7 @@ void GeneralPage::initLayout(SettingsLayout &layout)
|
||||
layout.addCheckbox("Show tab close button", s.showTabCloseButton);
|
||||
layout.addCheckbox("Show input when empty", s.showEmptyInput);
|
||||
layout.addCheckbox("Show input message length", s.showMessageLength);
|
||||
layout.addCheckbox("Hide preferences button (ctrl+p to show)",
|
||||
layout.addCheckbox("Hide preferences button (ctrl+p to show)",
|
||||
s.hidePreferencesButton);
|
||||
layout.addCheckbox("Hide user button", s.hideUserButton);
|
||||
|
||||
@@ -267,50 +267,6 @@ void GeneralPage::initLayout(SettingsLayout &layout)
|
||||
|
||||
layout.addTitle2("Misc");
|
||||
layout.addCheckbox("Show twitch whispers inline", s.inlineWhispers);
|
||||
layout.addDropdown<int>(
|
||||
"Historic messages appearance",
|
||||
{"Crossed and Greyed", "Crossed", "Greyed", "No change"},
|
||||
s.historicMessagesAppearance,
|
||||
[](auto val) {
|
||||
if (val & HistoricMessageAppearance::Crossed &&
|
||||
val & HistoricMessageAppearance::Greyed)
|
||||
{
|
||||
return QString("Crossed and Greyed");
|
||||
}
|
||||
else if (val & HistoricMessageAppearance::Crossed)
|
||||
{
|
||||
return QString("Crossed");
|
||||
}
|
||||
else if (val & HistoricMessageAppearance::Greyed)
|
||||
{
|
||||
return QString("Greyed");
|
||||
}
|
||||
else
|
||||
{
|
||||
return QString("No Change");
|
||||
}
|
||||
},
|
||||
[](auto args) -> int {
|
||||
switch (args.index)
|
||||
{
|
||||
default:
|
||||
case 0:
|
||||
return HistoricMessageAppearance::Crossed |
|
||||
HistoricMessageAppearance::Greyed;
|
||||
break;
|
||||
case 1:
|
||||
return HistoricMessageAppearance::Crossed;
|
||||
break;
|
||||
case 2:
|
||||
return HistoricMessageAppearance::Greyed;
|
||||
break;
|
||||
case 3:
|
||||
return 0;
|
||||
break;
|
||||
}
|
||||
},
|
||||
false);
|
||||
layout.addCheckbox("Emphasize deleted messages", s.redDisabledMessages);
|
||||
|
||||
/*
|
||||
layout.addTitle2("Cache");
|
||||
|
||||
@@ -182,12 +182,6 @@ void LookPage::addMessageTab(LayoutCreator<QVBoxLayout> layout)
|
||||
|
||||
layout.append(
|
||||
this->createCheckBox("Compact emotes", getSettings()->compactEmotes));
|
||||
/// greyOutHistoricMessages setting changed by hemirt from checkbox to
|
||||
/// historicMessagesBehaviour dropdown QString option
|
||||
// layout.append(this->createCheckBox("Grey out historic messages",
|
||||
// getSettings()->greyOutHistoricMessages));
|
||||
///
|
||||
// --
|
||||
layout.emplace<Line>(false);
|
||||
|
||||
// bold-slider
|
||||
|
||||
Reference in New Issue
Block a user