Summary: | attendees icons not dhown | ||
---|---|---|---|
Product: | [Applications] korganizer | Reporter: | Martin Koller <kollix> |
Component: | incidence editors | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | montel, winter |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/incidenceeditor/35440057afcd456f9e3640d3e9625b14df0fcd5a | Version Fixed In: | |
Sentry Crash Report: |
Description
Martin Koller
2017-04-21 11:33:24 UTC
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 ? no, Breeze. 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 --- 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 ? Wierd that they don't use copy constructor for creating QStyleOptionButton but it seems logical. Please commit it. Thanks 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 https://commits.kde.org/incidenceeditor/35440057afcd456f9e3640d3e9625b14df0fcd5a (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 |