|Summary:||Custom template icons are broken|
|Product:||[Applications] krita||Reporter:||Kapyia <kapyia.art>|
|Component:||Resource Management||Assignee:||Halla Rempt <halla>|
|Latest Commit:||https://invent.kde.org/graphics/krita/commit/b758c958129615ad350271f054552fd9d3de8eec||Version Fixed In:|
|Attachments:||Selecting a custom Template shows no picture/icon or preview.|
Description Kapyia 2018-06-26 13:57:22 UTC
Created attachment 113581 [details] Selecting a custom Template shows no picture/icon or preview. Pictures/icons for custom templates when creating new projects appears to be broken. The 'preview' icons don't show up, and choosing a custom picture only results in a message stating "Could not load picture." The problem is only with the pictures of custom templates; the template files opens without any errors, and the default template icons are working properly. Sidenote: allowing the users to add a brief description of the templates they create would be nice, I think.
Comment 1 Halla Rempt 2018-06-30 09:38:07 UTC
I'm sorry, but I cannot reproduce that problem :-( I'm rewriting the resource system in any case, and I'll also make templates much simpler, with everything self-contained in one .kra file.
Comment 2 Kapyia 2018-07-02 21:29:21 UTC
Ah, too bad. Maybe it's on my end then. I'll report back when the new resource system is out and I can test with that!
Comment 3 Tiar 2018-10-02 18:01:05 UTC
Krita version: 4.2.0-pre-alpha (git 5120b70) 1) I can confirm. After a little of investigation I can say that it's because custom/user templates are saved differently than the standard ones. In standard ones, there is no .icon folder with .png picture. The line about icon in .desktop file says (for example): Icon=template_animation And in custom ones it says: Icon=Icon=.icon/filename.png If we change the line in .desktop file for the custom template to the template_animation, the template have that icon. Moreover, the custom group of templates has the icon of the first template (that is, if the first template has no working icon, the group has no working icon as well; if the first template has the working icon, that icon will be used; no matter what icons the other templates have). 2) "Could not load picture." bug appears on my PC, too.
Comment 4 Halla Rempt 2020-10-21 12:16:40 UTC
Git commit 7e450cc70f80e1144301059f8d66f45115843940 by Boudewijn Rempt, on behalf of Evan Thompson. Committed on 21/10/2020 at 12:16. Pushed by rempt into branch 'master'. Fix user template icons not displaying on Windows Absolute Windows paths were not being checked for, causing user template icons to not load. QFile::exists is a simple cross platform method of checking for an absolute path. This also fixes custom icons for user templates. M +1 -1 libs/ui/KisTemplate.cpp https://invent.kde.org/graphics/krita/commit/7e450cc70f80e1144301059f8d66f45115843940
Comment 5 Halla Rempt 2020-10-21 12:17:12 UTC
Git commit b758c958129615ad350271f054552fd9d3de8eec by Boudewijn Rempt, on behalf of Evan Thompson. Committed on 21/10/2020 at 12:17. Pushed by rempt into branch 'krita/4.3'. Fix user template icons not displaying on Windows Absolute Windows paths were not being checked for, causing user template icons to not load. QFile::exists is a simple cross platform method of checking for an absolute path. This also fixes custom icons for user templates. (cherry picked from commit 7e450cc70f80e1144301059f8d66f45115843940) M +1 -1 libs/ui/KisTemplate.cpp https://invent.kde.org/graphics/krita/commit/b758c958129615ad350271f054552fd9d3de8eec