From 5b23aff58dab051393ab720b1fe38487acfe3767 Mon Sep 17 00:00:00 2001 From: Rasmus Karlsson Date: Sun, 21 Oct 2018 10:23:53 +0200 Subject: [PATCH 1/3] Re-enable emote scale --- src/messages/MessageElement.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/messages/MessageElement.cpp b/src/messages/MessageElement.cpp index a000e0a87..1fd224e64 100644 --- a/src/messages/MessageElement.cpp +++ b/src/messages/MessageElement.cpp @@ -117,8 +117,11 @@ void EmoteElement::addToContainer(MessageLayoutContainer &container, auto image = this->emote_->images.getImage(container.getScale()); if (image->isEmpty()) return; - auto size = QSize(int(container.getScale() * image->width()), - int(container.getScale() * image->height())); + auto emoteScale = getSettings()->emoteScale.getValue(); + + auto size = + QSize(int(container.getScale() * image->width() * emoteScale), + int(container.getScale() * image->height() * emoteScale)); container.addElement((new ImageLayoutElement(*this, image, size)) ->setLink(this->getLink())); From 64669879ad409eede1d552f617607a5e00ab15af Mon Sep 17 00:00:00 2001 From: Rasmus Karlsson Date: Sun, 21 Oct 2018 10:27:36 +0200 Subject: [PATCH 2/3] Also use emote scale setting to help figure out what version emote to use --- src/messages/ImageSet.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/messages/ImageSet.cpp b/src/messages/ImageSet.cpp index dd4f23b97..44ae9c390 100644 --- a/src/messages/ImageSet.cpp +++ b/src/messages/ImageSet.cpp @@ -58,6 +58,10 @@ const ImagePtr &ImageSet::getImage3() const const ImagePtr &ImageSet::getImage(float scale) const { + auto emoteScale = getSettings()->emoteScale.getValue(); + + scale += emoteScale - 1.f; + int quality = 1; if (scale > 2.999) From 0abe85f53cdb0a20ea896c236f47f491930e1cbf Mon Sep 17 00:00:00 2001 From: Rasmus Karlsson Date: Sun, 21 Oct 2018 10:39:40 +0200 Subject: [PATCH 3/3] Change image set emote scale calculation --- src/messages/ImageSet.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/messages/ImageSet.cpp b/src/messages/ImageSet.cpp index 44ae9c390..b952e8ee3 100644 --- a/src/messages/ImageSet.cpp +++ b/src/messages/ImageSet.cpp @@ -58,9 +58,7 @@ const ImagePtr &ImageSet::getImage3() const const ImagePtr &ImageSet::getImage(float scale) const { - auto emoteScale = getSettings()->emoteScale.getValue(); - - scale += emoteScale - 1.f; + scale *= getSettings()->emoteScale; int quality = 1;