SailfishOS: Small user interface improvements

* Pressing shuffle will now show a notification indicating it is not
  implemented.
* On the initial setup, the discovered settings are displayed somewhat
  more neatly.
* Disable reloading the main view each time the MainPage gets activated.
This commit is contained in:
Chris Josten 2021-09-08 21:57:23 +02:00
parent 14c9de0aac
commit 8a9cb73686
3 changed files with 34 additions and 15 deletions

View File

@ -158,8 +158,8 @@ PanelBackground {
verticalCenter: playButton.verticalCenter verticalCenter: playButton.verticalCenter
} }
icon.source: "image://theme/icon-m-shuffle" icon.source: "image://theme/icon-m-shuffle"
enabled: false
opacity: 0 opacity: 0
onClicked: Notices.show(qsTr("Shuffle not yet implemented"))
} }
IconButton { IconButton {

View File

@ -167,7 +167,6 @@ Page {
onStatusChanged: { onStatusChanged: {
if (status == PageStatus.Active) { if (status == PageStatus.Active) {
appWindow.itemData = null appWindow.itemData = null
loadModels(false)
} }
} }

View File

@ -62,20 +62,40 @@ Dialog {
description: qsTr("Sailfin will try to search for Jellyfin servers on your local network automatically") description: qsTr("Sailfin will try to search for Jellyfin servers on your local network automatically")
menu: ContextMenu { menu: ContextMenu {
MenuItem { MenuItem {
// Special values are cool, aren't they? // Special values are cool, aren't they?
readonly property string _address: manualAddress.text readonly property string _address: manualAddress.text
readonly property string _name: manualAddress.text readonly property string _name: manualAddress.text
text: qsTr("enter address manually") text: qsTr("enter address manually")
} }
Repeater { Repeater {
model: serverModel model: serverModel
delegate: MenuItem { delegate: MenuItem {
readonly property string _address: address readonly property string _address: address
readonly property string _name: name readonly property string _name: name
text: qsTr("%1 - %2").arg(name).arg(address) // No, this isn't a clever hack that depends on how ComboBox is
// implemented. It really isn't, trust me!
readonly property string description: address
height: Theme.itemSizeSmall + Theme.paddingSmall * 2
text: name
topPadding: -description.implicitHeight
Label {
id: description
text: parent.description
anchors {
verticalCenter: parent.verticalCenter
verticalCenterOffset: parent.implicitHeight + Theme.paddingSmall
}
width: parent.width
horizontalAlignment: parent.horizontalAlignment
verticalAlignment: parent.verticalAlignment
font.pixelSize: Theme.fontSizeExtraSmall
truncationMode: parent.truncationMode
color: Theme.rgba(parent.color, Theme.opacityHigh)
}
}
} }
}
} }
} }