Make sure that duration and position labels are readable on resize

This commit is contained in:
Bart De Vries 2021-04-15 22:53:21 +02:00
parent 2e118d9a7e
commit 00a9d75c33

View File

@ -15,6 +15,7 @@ import org.kde.alligator 1.0
Kirigami.SwipeListItem {
id: listItem
alwaysVisibleActions: true
contentItem: RowLayout {
Kirigami.ListItemDragHandle {
@ -91,7 +92,6 @@ Kirigami.SwipeListItem {
RowLayout {
Controls.Label {
text: (Math.floor(entry.enclosure.playPosition/3600000) < 10 ? "0" : "") + Math.floor(entry.enclosure.playPosition/3600000) + ":" + (Math.floor(entry.enclosure.playPosition/60000) % 60 < 10 ? "0" : "") + Math.floor(entry.enclosure.playPosition/60000) % 60 + ":" + (Math.floor(entry.enclosure.playPosition/1000) % 60 < 10 ? "0" : "") + Math.floor(entry.enclosure.playPosition/1000) % 60
Layout.fillWidth: true
elide: Text.ElideRight
font: Kirigami.Theme.smallFont
opacity: 0.7
@ -104,7 +104,6 @@ Kirigami.SwipeListItem {
}
Controls.Label {
text: (Math.floor(entry.enclosure.duration/3600) < 10 ? "0" : "") + Math.floor(entry.enclosure.duration/3600) + ":" + (Math.floor(entry.enclosure.duration/60) % 60 < 10 ? "0" : "") + Math.floor(entry.enclosure.duration/60) % 60 + ":" + (Math.floor(entry.enclosure.duration) % 60 < 10 ? "0" : "") + Math.floor(entry.enclosure.duration) % 60
Layout.fillWidth: true
elide: Text.ElideRight
font: Kirigami.Theme.smallFont
opacity: 0.7