perf(frontend):搜索结果列表使用主题的默认行高
This commit is contained in:
parent
8c4a0fd6e0
commit
13336d5653
|
@ -36,13 +36,6 @@ void ResultViewDelegate::setSearchKeyword(const QString ®FindKeyWords)
|
||||||
m_hightLightEffectHelper->setExpression(regFindKeyWords);
|
m_hightLightEffectHelper->setExpression(regFindKeyWords);
|
||||||
}
|
}
|
||||||
|
|
||||||
QSize ResultViewDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
|
|
||||||
{
|
|
||||||
QSize size = QStyledItemDelegate::sizeHint(option,index);
|
|
||||||
size.setHeight(size.height() + 10);
|
|
||||||
return size;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ResultViewDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
|
void ResultViewDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
|
||||||
{
|
{
|
||||||
QStyleOptionViewItem opt = option;
|
QStyleOptionViewItem opt = option;
|
||||||
|
|
|
@ -55,7 +55,6 @@ public:
|
||||||
~ResultViewDelegate() = default;
|
~ResultViewDelegate() = default;
|
||||||
void setSearchKeyword(const QString &);
|
void setSearchKeyword(const QString &);
|
||||||
protected:
|
protected:
|
||||||
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
|
||||||
void paint(QPainter *, const QStyleOptionViewItem &, const QModelIndex &) const override;
|
void paint(QPainter *, const QStyleOptionViewItem &, const QModelIndex &) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Reference in New Issue