1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 11:18:13 +00:00

LibGUI+FileManager: Add a GIcon class to support multi-size icons.

A GIcon can contain any number of bitmaps internally, and will give you
the best fitting icon when you call bitmap_for_size().
This commit is contained in:
Andreas Kling 2019-03-24 04:28:36 +01:00
parent 7e54fdce99
commit 86413a6f5a
12 changed files with 165 additions and 23 deletions

View file

@ -64,6 +64,7 @@ public:
bool operator==(const Iterator& other) const { return m_node == other.m_node; }
Iterator& operator++() { m_node = m_node->next; return *this; }
T& operator*() { return m_node->value; }
T* operator->() { return &m_node->value; }
bool is_end() const { return !m_node; }
static Iterator universal_end() { return Iterator(nullptr); }
private:
@ -81,6 +82,7 @@ public:
bool operator==(const ConstIterator& other) const { return m_node == other.m_node; }
ConstIterator& operator++() { m_node = m_node->next; return *this; }
const T& operator*() const { return m_node->value; }
const T* operator->() const { return &m_node->value; }
bool is_end() const { return !m_node; }
static ConstIterator universal_end() { return ConstIterator(nullptr); }
private: