mirror-chatterino2/src/widgets/helper/IconDelegate.hpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
427 B
C++
Raw Normal View History

#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