diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2020-10-03 18:49:22 -0400 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2020-10-03 18:49:22 -0400 |
commit | bbe36a8246041544d6ebe420dfa1b695b6c74521 (patch) | |
tree | aa2c607b812c04afd2ef4a240489e7c8adec7c3b /components/chatmessage.hpp | |
parent | c7a958a3bb241b28c766faa3db6f4ff1876bd065 (diff) | |
download | abaddon-portaudio-bbe36a8246041544d6ebe420dfa1b695b6c74521.tar.gz abaddon-portaudio-bbe36a8246041544d6ebe420dfa1b695b6c74521.zip |
maybe slightly better image loading maybe hopefully
Diffstat (limited to 'components/chatmessage.hpp')
-rw-r--r-- | components/chatmessage.hpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/components/chatmessage.hpp b/components/chatmessage.hpp index 73307d2..144118f 100644 --- a/components/chatmessage.hpp +++ b/components/chatmessage.hpp @@ -13,7 +13,7 @@ public: // attributes = edited, deleted void UpdateAttributes(); void UpdateContent(); - void UpdateImage(); + void UpdateImage(std::string url, Glib::RefPtr<Gdk::Pixbuf> buf); protected: bool EmitImageLoad(std::string url); @@ -24,7 +24,6 @@ protected: Gtk::Image *CreateImageComponent(const AttachmentData &data); Gtk::Box *CreateAttachmentComponent(const AttachmentData &data); // non-image attachments void HandleImage(const AttachmentData &data, Gtk::Image *img, std::string url); - static std::pair<int, int> GetImageDimensions(int width, int height, int clampw = 400, int clamph = 300); std::unordered_map<std::string, std::pair<Gtk::Image *, AttachmentData>> m_img_loadmap; |