mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
19 lines
427 B
C++
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
|