A default icon per file type has been fixed.
See more details at : https://github.com/pdulvp/pmane-sa/issues/7
- Options > Default Icons... gives each file type the icon its items get
when the file carries no artwork of its own, picked from the same "Change
Icon" listing the properties dialog uses -- so a shelf of ROMs no longer
shares one generic icon
- the types listed are the ones the launchers claim, so adding a file type to a
launcher makes a row for it appear; a type that keeps an icon after being
removed from a launcher keeps its row as well
- an icon picked for an item wins, then the artwork the file itself carries --
an .exe dropped on a group keeps its own -- then the type's icon, then the
generic fallbacks; a document's icon from the desktop theme moved below the
type's, being a default itself
- accepting the dialog redraws the groups already open, so the items that took
their icon from their file type follow without a restart
A default icon per file type
<sub>2026-10-30-1753-a-default-icon-per-file-type.md — 2026-10-30 17:53</sub>
A ROM, a disc image or a DOSBox config carries no artwork, so every one of them
ends up under the same generic icon. Options > Default Icons... sets one
icon per file type, from the same "Change Icon" listing the properties dialog
uses, and every item of that type that has no artwork of its own takes it.
The types listed are the ones the launchers claim, so adding smc to RetroArch
makes a row for it appear.
Decisions
- Where it sits in the chain. An icon picked for the item wins, then the
artwork the file itself carries (an .exe's resources, a .desktop's icon,
the one a DOSBox [ui] names, Steam's cached artwork), then the default for
the file type, then the generic fallbacks that exist today. So an .exe
dropped on a group keeps its own icon and only falls back to the default
when it has none, which is what was asked.
- The desktop's mime icon moves below it. A document's type icon from the
icon theme is itself a generic default; one set here is deliberate and must
win over it.
- Stored by extension, not by launcher. A .iso is one file type whoever
runs it, and two launchers claiming it must not disagree.
- An icon is a file and an index, as an item's is: the listing offers every
icon an .exe or .ico holds, and the index chooses between them.
- A type that no longer belongs to any launcher keeps its row if an icon
was set for it, so removing an extension from a launcher by accident does
not throw the setting away.
- The open desktop is refreshed when the dialog is accepted: items whose
icon was derived rather than picked take the new default without a restart.
Steps
- [x] 1. src/DefaultIcons.{h,cpp}: `struct DefaultIcon { QString file; int
index; bool legacy; }, everyFileType()` (the extensions every launcher
claims, plus those already set), defaultIcons() / setDefaultIcons()
over the defaultIcons group of the settings, and
defaultIconForPath() loading and caching the artwork.
- [x] 2. src/ItemDetails.cpp completeProgramItem(): the default after the
per-kind discovery and before the theme and style fallbacks, with the
document mime icon moved below it.
- [x] 3. src/DefaultIconsDialog.{h,cpp}: the table -- file type, the icon and
the file it comes from -- with Change Icon... opening
IconPickerDialog on the row's current icon and Clear emptying it.
- [x] 4. CMakeLists.txt; src/MainWindow.cpp: the Options entry, and the
open groups re-deriving their icons afterwards
(GroupWindow::refreshDerivedIcons()).
- [x] 5. Checked offscreen: the table lists the types of every launcher; an
icon set for nes reaches a .nes item and no other type; with an icon
set for exe, Pharaoh.exe still shows its own 32x32 artwork while a
file with no resources in it takes the default; clearing puts the
generic icon back.
- [x] 6. README: a "Default icons" section with the order the icons are
resolved in, and docs/images/default-icons.png taken by the
screenshots tool, which now shoots this dialog too.
<sub>Filed by prel from the completed plans at commit time.</sub>