perf(frontend):搜索结果列表使用主题的默认行高

This commit is contained in:
iaom 2023-11-21 10:03:53 +08:00
parent 8c4a0fd6e0
commit 13336d5653
2 changed files with 0 additions and 8 deletions

View File

@ -36,13 +36,6 @@ void ResultViewDelegate::setSearchKeyword(const QString &regFindKeyWords)
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;

View File

@ -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: