From dce6d97009d42de92ec50c832ef9e06970e25d37 Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Sun, 7 Apr 2024 10:22:57 +0800 Subject: [PATCH] reduce icon size in completion popup --- RedPandaIDE/widgets/codecompletionpopup.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RedPandaIDE/widgets/codecompletionpopup.cpp b/RedPandaIDE/widgets/codecompletionpopup.cpp index 7f964aab..b5f4d4a2 100644 --- a/RedPandaIDE/widgets/codecompletionpopup.cpp +++ b/RedPandaIDE/widgets/codecompletionpopup.cpp @@ -1345,7 +1345,7 @@ void CodeCompletionListItemDelegate::paint(QPainter *painter, const QStyleOption painter->fillRect(option.rect, mCurrentSelectionColor); } QFontMetrics fm{font()}; - int iconSize = fm.ascent(); + int iconSize = fm.height()*0.8; QPixmap icon = mModel->statementIcon(index, iconSize); int x=option.rect.left(); if (!icon.isNull()) {