diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2023-07-25 15:56:28 -0400 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2023-07-25 15:56:28 -0400 |
commit | ab2896b838d32d88e7a79b37e6a24ef770e64bc2 (patch) | |
tree | 6ac3dfb2e4ab4a91e2244109801270ddcd5aaa39 | |
parent | 22025c2f0d13e4a4179cc7bc88a854fc4ab2105e (diff) | |
parent | 1bb9ac8976d24c339c3bf56834406f78b8a87bca (diff) | |
download | abaddon-portaudio-ab2896b838d32d88e7a79b37e6a24ef770e64bc2.tar.gz abaddon-portaudio-ab2896b838d32d88e7a79b37e6a24ef770e64bc2.zip |
Merge branch 'master' of https://github.com/uowuo/abaddon
-rw-r--r-- | src/components/lazyimage.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/components/lazyimage.cpp b/src/components/lazyimage.cpp index 13bd65d..90b8f28 100644 --- a/src/components/lazyimage.cpp +++ b/src/components/lazyimage.cpp @@ -39,7 +39,9 @@ bool LazyImage::OnDraw(const Cairo::RefPtr<Cairo::Context> &context) { Abaddon::Get().GetImageManager().LoadAnimationFromURL(m_url, m_width, m_height, sigc::track_obj(cb, *this)); } else { auto cb = [this](const Glib::RefPtr<Gdk::Pixbuf> &pb) { - property_pixbuf() = pb->scale_simple(m_width, m_height, Gdk::INTERP_BILINEAR); + int cw, ch; + GetImageDimensions(pb->get_width(), pb->get_height(), cw, ch, m_width, m_height); + property_pixbuf() = pb->scale_simple(cw, ch, Gdk::INTERP_BILINEAR); }; Abaddon::Get().GetImageManager().LoadFromURL(m_url, sigc::track_obj(cb, *this)); |