Files

62 lines
2.0 KiB
QML

import QtQuick
import QtQuick.Layouts
import "../controls"
import "../../components"
import "../../services"
import "../../media"
SettingsPage {
id: root
SettingsSection {
description: "Shared playback controls for all compatible MPRIS players."
padded: true
MediaCard {
compact: true
Layout.fillWidth: true
}
}
SettingsSection {
title: "Media cards"
description: "The player in the Control Center, dashboard and this page"
PreferenceToggle {
label: "Album artwork"
icon: "󰀥"
setting: "media.showAlbumArt"
}
PreferenceToggle {
label: "Track progress"
icon: "󰦖"
setting: "media.showProgress"
}
PreferenceToggle {
label: "Album name"
icon: "󰎆"
setting: "media.showAlbum"
}
PreferenceToggle {
label: "Visualizer in cards"
description: "Cava bars under the track"
icon: "󰺢"
setting: "media.showCava"
}
}
SettingsSection {
title: "Player"
PreferenceChoice {
label: "Preferred player"
icon: "󰐊"
setting: "media.preferredPlayer"
choices: ["automatic"].concat(MediaService.players.map(p => p.dbusName)).concat(MediaService.players.some(p => p.dbusName === ConfigService.data.media.preferredPlayer) || ConfigService.data.media.preferredPlayer === "automatic" ? [] : [ConfigService.data.media.preferredPlayer])
}
SettingRow {
title: "Player ID"
description: "Preferred MPRIS player ID, or automatic"
GlassTextField {
Layout.preferredWidth: 240
text: ConfigService.data.media.preferredPlayer
onEditingFinished: ConfigService.setValue("media.preferredPlayer", text || "automatic")
}
}
}
}