1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-05 21:15:38 -05:00

Improved applications naming in AudioOutputDetail (#821)

This commit is contained in:
Álvaro
2025-11-26 22:28:26 +01:00
committed by GitHub
parent 4d661ff41d
commit 85704e3947

View File

@@ -354,7 +354,12 @@ Rectangle {
}
StyledText {
text: AudioService.displayName(modelData)
text: {
const mediaName = modelData && modelData.properties ? (modelData.properties["media.name"] || "") : "";
const max = 30;
const truncated = mediaName.length > max ? mediaName.substring(0, max) + "..." : mediaName;
return AudioService.displayName(modelData) + (truncated ? ": " + truncated : "");
}
font.pixelSize: Theme.fontSizeMedium
color: Theme.surfaceText
font.weight: modelData === AudioService.sink ? Font.Medium : Font.Normal