[KPhotoAlbum] suggested solution to the icon problem
Johannes Zarl-Zierl
johannes at zarl-zierl.at
Fri Jan 5 12:09:05 GMT 2018
Hello Andreas,
I've pushed a fix for the issue of QListView messing with the icons. Seeing
that the remaining issue is "only" missing icons, I think that we don't
need(*) to rush pre-packaged fallback icons into KPA.
From my point of view, I think that warning messages for missing icons are
probably a better solution for the problem, because they enable the user to
just install the right package and get consistent icons for other applications
as well.
(*) There is a krazy2 check for non-standard icons which did not complain
about "view-preview" in the past. Getting a fresh overview which icons we can
rely on is certainly a good idea. Then we can make an informed choice and
selectively provide fallbacks or use different icons.
Cheers,
Johannes
On Freitag, 5. Jänner 2018 01:01:59 CET you wrote:
> Hi Anreas,
>
> On Donnerstag, 4. Jänner 2018 19:48:34 CET Andreas Schleth wrote:
> > > I'm still wondering how this happens in the first place:
> > > [...]
> > > Yet, the displayed pixmap has (by the way of a screen ruler) ~20px in
> > > height.
> >
> > Yes, this is approximately the height of the text line. If I introduce
> > just one icon 64x64 für the thumbnail view via a fallback, all the other
> > items show (more or less) OK, except for the missing icons. It might be
> > a QT issue with QListView.
>
> "Height of the text line" was a good clue, and now I think I have an idea
> what's happening:
> Because the item "view-preview" (i.e. thumbnail view) is missing, it falls
> back to text view. It seems that the QListView in Qt 5.5 then assumes that
> all items have only the DisplayRole instead of DecorationRole.
>
> Forcing the issue in Qt 5.9 by setting an invalid icon did not work.
>
> > I opted for the QLatin1String because that would make it clearer, that
> > this is a fixed string, that does not need translation. I was just
> > confused because of the mixture of ::fromUtf8 and ::fromLatin1.
>
> Ok.
>
> > Could You show me, how to add ressources to KPA and how to call them?
>
> I have to admit I did not use resources with a cmake-based Qt project
> before. I need to take a look myself…
>
> Cheers,
> Johannes
More information about the Kphotoalbum
mailing list