simplified Image

This commit is contained in:
fourtf
2018-08-10 18:56:17 +02:00
parent 6344fa6b23
commit edfae49cc9
22 changed files with 146 additions and 314 deletions
+9 -12
View File
@@ -715,41 +715,38 @@ void TwitchMessageBuilder::appendTwitchBadges()
//}
} else if (badge == "staff/1") {
this->emplace<ImageElement>(
Image::fromNonOwningPixmap(&app->resources->twitch.staff),
Image::fromPixmap(app->resources->twitch.staff),
MessageElementFlag::BadgeGlobalAuthority)
->setTooltip("Twitch Staff");
} else if (badge == "admin/1") {
this->emplace<ImageElement>(
Image::fromNonOwningPixmap(&app->resources->twitch.admin),
Image::fromPixmap(app->resources->twitch.admin),
MessageElementFlag::BadgeGlobalAuthority)
->setTooltip("Twitch Admin");
} else if (badge == "global_mod/1") {
this->emplace<ImageElement>(
Image::fromNonOwningPixmap(
&app->resources->twitch.globalmod),
Image::fromPixmap(app->resources->twitch.globalmod),
MessageElementFlag::BadgeGlobalAuthority)
->setTooltip("Twitch Global Moderator");
} else if (badge == "moderator/1") {
// TODO: Implement custom FFZ moderator badge
this->emplace<ImageElement>(
Image::fromNonOwningPixmap(
&app->resources->twitch.moderator),
Image::fromPixmap(app->resources->twitch.moderator),
MessageElementFlag::BadgeChannelAuthority)
->setTooltip("Twitch Channel Moderator");
} else if (badge == "turbo/1") {
this->emplace<ImageElement>(
Image::fromNonOwningPixmap(&app->resources->twitch.turbo),
Image::fromPixmap(app->resources->twitch.turbo),
MessageElementFlag::BadgeGlobalAuthority)
->setTooltip("Twitch Turbo Subscriber");
} else if (badge == "broadcaster/1") {
this->emplace<ImageElement>(
Image::fromNonOwningPixmap(
&app->resources->twitch.broadcaster),
Image::fromPixmap(app->resources->twitch.broadcaster),
MessageElementFlag::BadgeChannelAuthority)
->setTooltip("Twitch Broadcaster");
} else if (badge == "premium/1") {
this->emplace<ImageElement>(
Image::fromNonOwningPixmap(&app->resources->twitch.prime),
Image::fromPixmap(app->resources->twitch.prime),
MessageElementFlag::BadgeVanity)
->setTooltip("Twitch Prime Subscriber");
} else if (badge.startsWith("partner/")) {
@@ -757,8 +754,8 @@ void TwitchMessageBuilder::appendTwitchBadges()
switch (index) {
case 1: {
this->emplace<ImageElement>(
Image::fromNonOwningPixmap(
&app->resources->twitch.verified, 0.25),
Image::fromPixmap(app->resources->twitch.verified,
0.25),
MessageElementFlag::BadgeVanity)
->setTooltip("Twitch Verified");
} break;