mirror of
https://github.com/Chatterino/chatterino2.git
synced 2026-10-07 14:34:55 -04:00
fix: reduce ascii art wrapping width (#7235)
Reported-by: antihack3r Reviewed-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -29,7 +29,7 @@ using namespace chatterino;
|
||||
constexpr QMargins MARGIN{8, 4, 8, 4};
|
||||
constexpr qreal COMPACT_EMOTES_OFFSET = 4;
|
||||
/// Target width used to match Twitch's desktop chat layout.
|
||||
constexpr qreal ASCII_ART_WIDTH = 340.0;
|
||||
constexpr qreal ASCII_ART_WIDTH = 300.0;
|
||||
|
||||
int maxUncollapsedLines()
|
||||
{
|
||||
|
||||
@@ -113,10 +113,10 @@ TEST(AsciiArtLayout, LimitsTheMessageWidth)
|
||||
};
|
||||
container.beginLayout(ctx.width, ctx.scale, ctx.imageScale, {});
|
||||
|
||||
EXPECT_GT(container.remainingWidth(), 340);
|
||||
EXPECT_GT(container.remainingWidth(), 300);
|
||||
container.beginLayout(ctx.width, ctx.scale, ctx.imageScale,
|
||||
MessageFlag::AsciiArt);
|
||||
EXPECT_EQ(container.remainingWidth(), 340);
|
||||
EXPECT_EQ(container.remainingWidth(), 300);
|
||||
|
||||
TextElement art(QString(100, QChar(0x28FF)), MessageElementFlag::Text);
|
||||
art.addToContainer(container, ctx);
|
||||
|
||||
Reference in New Issue
Block a user