mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
fixed tiny badges
This commit is contained in:
parent
fb750d6d85
commit
96103de1ea
2 changed files with 4 additions and 4 deletions
|
@ -240,7 +240,7 @@ int Image::getWidth() const
|
||||||
|
|
||||||
int Image::getScaledWidth() const
|
int Image::getScaledWidth() const
|
||||||
{
|
{
|
||||||
return static_cast<int>(this->getWidth() * this->scale *
|
return static_cast<int>((float)this->getWidth() * this->scale *
|
||||||
getApp()->settings->emoteScale.getValue());
|
getApp()->settings->emoteScale.getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -254,7 +254,7 @@ int Image::getHeight() const
|
||||||
|
|
||||||
int Image::getScaledHeight() const
|
int Image::getScaledHeight() const
|
||||||
{
|
{
|
||||||
return static_cast<int>(this->getHeight() * this->scale *
|
return static_cast<int>((float)this->getHeight() * this->scale *
|
||||||
getApp()->settings->emoteScale.getValue());
|
getApp()->settings->emoteScale.getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -70,8 +70,8 @@ ImageElement::ImageElement(Image *_image, MessageElement::Flags flags)
|
||||||
void ImageElement::addToContainer(MessageLayoutContainer &container, MessageElement::Flags _flags)
|
void ImageElement::addToContainer(MessageLayoutContainer &container, MessageElement::Flags _flags)
|
||||||
{
|
{
|
||||||
if (_flags & this->getFlags()) {
|
if (_flags & this->getFlags()) {
|
||||||
QSize size(this->image->getScaledWidth() * this->image->getScale() * container.getScale(),
|
QSize size(this->image->getScaledWidth() * container.getScale(),
|
||||||
this->image->getScaledHeight() * this->image->getScale() * container.getScale());
|
this->image->getScaledHeight() * container.getScale());
|
||||||
|
|
||||||
container.addElement(
|
container.addElement(
|
||||||
(new ImageLayoutElement(*this, this->image, size))->setLink(this->getLink()));
|
(new ImageLayoutElement(*this, this->image, size))->setLink(this->getLink()));
|
||||||
|
|
Loading…
Reference in a new issue