reduce icon size in completion popup

This commit is contained in:
Roy Qu 2024-04-07 10:22:57 +08:00
parent ba6d8fa77d
commit dce6d97009
1 changed files with 1 additions and 1 deletions

View File

@ -1345,7 +1345,7 @@ void CodeCompletionListItemDelegate::paint(QPainter *painter, const QStyleOption
painter->fillRect(option.rect, mCurrentSelectionColor); painter->fillRect(option.rect, mCurrentSelectionColor);
} }
QFontMetrics fm{font()}; QFontMetrics fm{font()};
int iconSize = fm.ascent(); int iconSize = fm.height()*0.8;
QPixmap icon = mModel->statementIcon(index, iconSize); QPixmap icon = mModel->statementIcon(index, iconSize);
int x=option.rect.left(); int x=option.rect.left();
if (!icon.isNull()) { if (!icon.isNull()) {