1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-08 06:25:37 -05:00

file search: add a bunch of nerd icon mappings

This commit is contained in:
bbedward
2025-10-27 11:27:15 -04:00
parent 42e7cb7b5f
commit cde7427449
2 changed files with 119 additions and 11 deletions

View File

@@ -105,14 +105,23 @@ Rectangle {
color: Theme.surfaceLight
visible: fileType !== "image"
Loader {
DankNFIcon {
id: nerdIcon
anchors.centerIn: parent
active: fileName.toLowerCase().startsWith("dockerfile")
sourceComponent: DankNFIcon {
name: "docker"
size: Theme.fontSizeLarge
color: Theme.surfaceText
name: {
const lowerName = fileName.toLowerCase()
if (lowerName.startsWith("dockerfile"))
return "docker"
if (lowerName.startsWith("makefile"))
return "makefile"
if (lowerName.startsWith("license"))
return "license"
if (lowerName.startsWith("readme"))
return "readme"
return fileExtension.toLowerCase()
}
size: Theme.fontSizeXLarge
color: Theme.surfaceText
}
StyledText {
@@ -121,7 +130,7 @@ Rectangle {
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceText
font.weight: Font.Bold
visible: !fileName.toLowerCase().startsWith("dockerfile")
visible: !nerdIcon.visible
}
}