[korganizer] [Bug 379036] attendees icons not dhown

Martin Koller bugzilla_noreply at kde.org
Thu Jul 13 07:33:48 BST 2017


https://bugs.kde.org/show_bug.cgi?id=379036

--- Comment #6 from Martin Koller <kollix at aon.at> ---
Found the bug. When painting, the iconSize member of the style option struct
was not set and defaults to an invalid size. I'm using Qt 5.9.1 if that
matters.

This fixes it:

diff --git a/src/attendeecomboboxdelegate.cpp
b/src/attendeecomboboxdelegate.cpp
index fe8c10f..f13be6d 100644
--- a/src/attendeecomboboxdelegate.cpp
+++ b/src/attendeecomboboxdelegate.cpp
@@ -126,6 +126,7 @@ void AttendeeComboBoxDelegate::paint(QPainter *painter,
const QStyleOptionViewIt
     myOption.rect = option.rect;
     myOption.state = option.state;
     myOption.icon = mEntries[value].first;
+    myOption.iconSize = myOption.icon.actualSize(option.rect.size());

     QApplication::style()->drawControl(QStyle::CE_PushButton, &myOption,
painter);
 }

Would this be ok to commit ?

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Kdepim-bugs mailing list