Fix improper width on certain emotes without size
This commit is contained in:
parent
4a65da68a7
commit
9cd02b75d9
3 changed files with 6 additions and 5 deletions
|
|
@ -391,7 +391,7 @@ class IRCMessage {
|
|||
_createEmoteSpan(
|
||||
emote: emote,
|
||||
height: emote.height != null ? emote.height! * emoteScale : emoteSize,
|
||||
width: emote.width != null ? emote.width! * emoteScale : emoteSize,
|
||||
width: emote.width != null ? emote.width! * emoteScale : null,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
@ -419,7 +419,7 @@ class IRCMessage {
|
|||
_createEmoteSpan(
|
||||
emote: emote,
|
||||
height: emote.height != null ? emote.height! * emoteScale : emoteSize,
|
||||
width: emote.width != null ? emote.width! * emoteScale : emoteSize,
|
||||
width: emote.width != null ? emote.width! * emoteScale : null,
|
||||
),
|
||||
);
|
||||
} else {
|
||||
|
|
@ -525,7 +525,7 @@ class IRCMessage {
|
|||
static WidgetSpan _createEmoteSpan({
|
||||
required Emote emote,
|
||||
required double height,
|
||||
required double width,
|
||||
required double? width,
|
||||
}) {
|
||||
const emoteType = [
|
||||
'Twitch (Bits Tier)',
|
||||
|
|
@ -572,6 +572,7 @@ class IRCMessage {
|
|||
preferBelow: false,
|
||||
child: CachedNetworkImage(
|
||||
imageUrl: emote.url,
|
||||
placeholder: (context, url) => const SizedBox(),
|
||||
fadeInDuration: const Duration(),
|
||||
height: height,
|
||||
width: width,
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ class EmoteMenuSection extends StatelessWidget {
|
|||
child: CachedNetworkImage(
|
||||
imageUrl: emotes[index].url,
|
||||
height: emotes[index].height?.toDouble() ?? defaultEmoteSize,
|
||||
width: emotes[index].width?.toDouble() ?? defaultEmoteSize,
|
||||
width: emotes[index].width?.toDouble(),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ class RecentEmotesPanel extends StatelessWidget {
|
|||
color: matchingEmotes.isNotEmpty ? null : const Color.fromRGBO(255, 255, 255, 0.5),
|
||||
colorBlendMode: matchingEmotes.isNotEmpty ? null : BlendMode.modulate,
|
||||
height: emote.height?.toDouble() ?? defaultEmoteSize,
|
||||
width: emote.width?.toDouble() ?? defaultEmoteSize,
|
||||
width: emote.width?.toDouble(),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue