fix: compact queue item height based on font metrics
Height is now 2 line-heights + 10px padding instead of a fixed 52px, keeping the two-line layout without wasting vertical space. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -21,9 +21,10 @@ class QueueDelegate : public QStyledItemDelegate
|
||||
public:
|
||||
explicit QueueDelegate(QObject *parent = nullptr) : QStyledItemDelegate(parent) {}
|
||||
|
||||
QSize sizeHint(const QStyleOptionViewItem &, const QModelIndex &) const override
|
||||
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &) const override
|
||||
{
|
||||
return QSize(0, 52);
|
||||
const int lineH = QFontMetrics(option.font).height();
|
||||
return QSize(0, lineH * 2 + 10);
|
||||
}
|
||||
|
||||
void paint(QPainter *p, const QStyleOptionViewItem &option,
|
||||
|
||||
Reference in New Issue
Block a user