mirror-chatterino2/src/widgets/helper/IconDelegate.hpp
Mm2PL c3b84cb4b6
Add custom image functionality for inline mod buttons. (#5369)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2024-05-11 10:54:27 +00:00

19 lines
427 B
C++

#pragma once
#include <QStyledItemDelegate>
namespace chatterino {
/**
* IconDelegate draws the decoration role pixmap scaled down to a square icon
*/
class IconDelegate : public QStyledItemDelegate
{
public:
explicit IconDelegate(QObject *parent = nullptr);
void paint(QPainter *painter, const QStyleOptionViewItem &option,
const QModelIndex &index) const override;
};
} // namespace chatterino