Discussion:
[KPhotoAlbum] new insight into mangled icons in Ubuntu / Linux Mint
Andreas Schleth
2018-01-02 18:44:48 UTC
Permalink
Hi everybody,

regarding this bug: https://bugs.kde.org/show_bug.cgi?id=387943 (icons
cut off / not shown on the home screen of KPA) I did quite a few
experiments such as amending the Ubuntu install with lots of files from
Kubuntu, but none were successful.

Finally I dug around in the code and found in *Browser/OverviewPage.cpp*
starting at line 148 some code, that adds icons to the home screen:

1. I noticed that sometimes QString::fromLatin1 and sometimes
QString::fromUtf8 is used. (does it matter??)

2 The icons are pulled from some theme "QIcon::fromTheme" ... and this
does not work. So most probably a dependency is missing, that adds this
theme and the corresponding icons. Or the respective icons are not there
in gtk-*

3. I replaced the lines with *QIcon::fromTheme *with
*QIcon(QString::fromUtf8("some abs. filename, known to exist") *and got
the screenshot as appended. If the icons were from the 64x64 folder.
With smaller icons, all the icons are cut off, depending on image size.
In the original code all icons are cut off to the hight of the text line.

I did not find the place in the code, where the icon for Media Type is
set. This seems to happen somewhere else (??).

So the issue seems to find a set of really existing icons of size 64x64
- maybe set some image shipped with KPA as the default. And find the
correct dependency for the icons from the theme.

I hope this helps nailing the bug above.

Happy New Year, Andreas
Tobias Leupold
2018-01-02 19:20:01 UTC
Permalink
Post by Andreas Schleth
1. I noticed that sometimes QString::fromLatin1 and sometimes
QString::fromUtf8 is used. (does it matter??)
For now I can at least answer this one: We should use QString::fromUtf8()
everywhere, as our sources are UTF-8 encoded (or at least, they should be).

But: As we're writing all this in English, the sources (and also the literal
strings you found) should not contain any non-ASCII character. So
QString::fromLatin1() and QString::fromUtf8() will give us the same result in
this case.

So, to answer your question: In this case, it does not matter.

I don't have an idea about the icon problem, though ;-) I also saw this some
time ago, but I don't remember if we changed something or it simply
disappeared somehow. But we'll get this :-)

Cheers, Tobias

Loading...