Merge pull request #808 from fourtf/pajlada-fix-emote-scale
Fix emote scale
This commit is contained in:
@@ -58,6 +58,8 @@ const ImagePtr &ImageSet::getImage3() const
|
|||||||
|
|
||||||
const ImagePtr &ImageSet::getImage(float scale) const
|
const ImagePtr &ImageSet::getImage(float scale) const
|
||||||
{
|
{
|
||||||
|
scale *= getSettings()->emoteScale;
|
||||||
|
|
||||||
int quality = 1;
|
int quality = 1;
|
||||||
|
|
||||||
if (scale > 2.999)
|
if (scale > 2.999)
|
||||||
|
|||||||
@@ -117,8 +117,11 @@ void EmoteElement::addToContainer(MessageLayoutContainer &container,
|
|||||||
auto image = this->emote_->images.getImage(container.getScale());
|
auto image = this->emote_->images.getImage(container.getScale());
|
||||||
if (image->isEmpty()) return;
|
if (image->isEmpty()) return;
|
||||||
|
|
||||||
auto size = QSize(int(container.getScale() * image->width()),
|
auto emoteScale = getSettings()->emoteScale.getValue();
|
||||||
int(container.getScale() * image->height()));
|
|
||||||
|
auto size =
|
||||||
|
QSize(int(container.getScale() * image->width() * emoteScale),
|
||||||
|
int(container.getScale() * image->height() * emoteScale));
|
||||||
|
|
||||||
container.addElement((new ImageLayoutElement(*this, image, size))
|
container.addElement((new ImageLayoutElement(*this, image, size))
|
||||||
->setLink(this->getLink()));
|
->setLink(this->getLink()));
|
||||||
|
|||||||
Reference in New Issue
Block a user