mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-30 00:12:50 -05:00
Improved applications naming in AudioOutputDetail (#821)
This commit is contained in:
@@ -354,7 +354,12 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
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
|
font.pixelSize: Theme.fontSizeMedium
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
font.weight: modelData === AudioService.sink ? Font.Medium : Font.Normal
|
font.weight: modelData === AudioService.sink ? Font.Medium : Font.Normal
|
||||||
|
|||||||
Reference in New Issue
Block a user