The icon in different installed themes is shown in an overlay sheet.
- Group Reviewers
- R118:66d7bc83fc1e: [Cuttlefish] Compare an icon in different themes
LGTM. Can the overlay be spawned in the vertical center of the window as well or is that defined in Kirigami itself? Also what happens when there are a lot of themes, does the overlay remain the same size and just get a scrollbar?
The QML is generally fine! Since you specifically requested it, I added nitpicky minor comments below. :) I don't consider them blockers, but feel free to take a look anyway!
Rather than creating a complicated additional item for the "no icon" case, I would just do source: modelData.iconPath ? modelData.iconPath : "paint-none". If you don't like the paint-none icon, we can adjust it.
That's what I did first acutally but I didn't like that for two reasons. First it would scale with the other icons and when you are looking at paint-none you couldn't distinguish it anymore.
In that case what about just setting color: Kirigami.Theme.disabledTextColor when there's no icon? That should serve to distinguish the actual paint-none icon from the use of that icon to denote "no icon available"
I don't think having it scale is a huge deal.
I use it for centering the icon in the middle of the 128x128 free space for the icon. Qt.AlignCenter is not enough for that. In the first version of the diff I tried make up for that with setting of top and bottom margins depending on the text height and icon size but that was to complicated and also didn't produce the correct result I think.