summaryrefslogtreecommitdiff
path: root/components/lazyimage.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'components/lazyimage.hpp')
-rw-r--r--components/lazyimage.hpp21
1 files changed, 0 insertions, 21 deletions
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 <gtkmm.h>
-
-// 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<Cairo::Context> &context);
-
- bool m_animated = false;
- bool m_needs_request = true;
- std::string m_url;
- int m_width;
- int m_height;
-};