Using the Oxygen Icon set, when I double click on an event and opening the Attendees tab, the columns Role, Status and Response are always blank (no icon shown), although when I click on any of the shown buttons, the dropdown menu shows all icons, so it's not an issue of missing icon files.
Which korganizer version ?§
current from git (Version 5.5.40 alpha1) last compiled on 6.May
works fine for me. no idea why this would be happening.
I'm using self-compiled from master.
And you're using Oxygen icons ?
I don't see how this could be a problem with KOrganizer itself.
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
@@ -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 ?
Wierd that they don't use copy constructor for creating QStyleOptionButton
but it seems logical.
Please commit it.
Git commit 35440057afcd456f9e3640d3e9625b14df0fcd5a by Martin Koller.
Committed on 13/07/2017 at 07:44.
Pushed by mkoller into branch 'master'.
set iconSize fixing not shown icon
M +1 -0 src/attendeecomboboxdelegate.cpp
(In reply to Laurent Montel from comment #7)
> Wierd that they don't use copy constructor for creating QStyleOptionButton
not possible since given option is a QStyleOptionViewItem