From a51a54bc5979a2491f152abc47ad54e6b63f27c8 Mon Sep 17 00:00:00 2001 From: Dylam De La Torre Date: Tue, 23 Nov 2021 05:21:56 +0100 Subject: Restructure source and resource files (#46) importantly, res is now res/res and css is now res/css --- components/lazyimage.hpp | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 components/lazyimage.hpp (limited to 'components/lazyimage.hpp') diff --git a/components/lazyimage.hpp b/components/lazyimage.hpp deleted file mode 100644 index fae69df..0000000 --- a/components/lazyimage.hpp +++ /dev/null @@ -1,21 +0,0 @@ -#pragma once -#include - -// loads an image only when the widget is drawn for the first time -class LazyImage : public Gtk::Image { -public: - LazyImage(int w, int h, bool use_placeholder = true); - LazyImage(const std::string &url, int w, int h, bool use_placeholder = true); - - void SetAnimated(bool is_animated); - void SetURL(const std::string &url); - -private: - bool OnDraw(const Cairo::RefPtr &context); - - bool m_animated = false; - bool m_needs_request = true; - std::string m_url; - int m_width; - int m_height; -}; -- cgit v1.2.3