Skip to content
Snippets Groups Projects
Commit e3eed4fc authored by Prince Gupta's avatar Prince Gupta :speech_balloon: Committed by Jean-Baptiste Kempf
Browse files

qml: allow keyboard focus on cross button of album expand delegate

parent e58c41dc
No related branches found
No related tags found
1 merge request!2785qml: allow keyboard focus on cross button of album expand delegate
Pipeline #282880 passed with stages
in 43 minutes and 44 seconds
......@@ -212,41 +212,65 @@ FocusScope {
}
}
header: Column {
header: FocusScope {
id: headerFocusScope
width: tracks.width
height: implicitHeight
bottomPadding: VLCStyle.margin_large
implicitHeight: col.implicitHeight
focus: true
Navigation.parentItem: root
Navigation.leftItem: enqueueActionBtn
Navigation.downAction: function () {
if (tracks.count > 0) {
tracks.setCurrentItemFocus(Qt.TabFocus)
} else {
root.Navigation.downAction()
}
}
RowLayout {
width: parent.width
/* The title of the albums */
Widgets.SubtitleLabel {
id: expand_infos_title_id
Column {
id: col
text: Helpers.get(model, "title", I18n.qtr("Unknown title"))
anchors.fill: parent
bottomPadding: VLCStyle.margin_large
Layout.fillWidth: true
}
RowLayout {
width: parent.width
/* The title of the albums */
Widgets.SubtitleLabel {
id: expand_infos_title_id
Widgets.IconControlButton {
iconText: VLCIcons.close
text: Helpers.get(model, "title", I18n.qtr("Unknown title"))
Layout.rightMargin: VLCStyle.margin_small
Layout.fillWidth: true
}
Widgets.IconControlButton {
iconText: VLCIcons.close
focus: true
onClicked: root.retract()
Navigation.parentItem: headerFocusScope
Layout.rightMargin: VLCStyle.margin_small
onClicked: root.retract()
}
}
}
Widgets.CaptionLabel {
id: expand_infos_subtitle_id
width: parent.width
text: I18n.qtr("%1 - %2 - %3 - %4")
.arg(Helpers.get(model, "main_artist", I18n.qtr("Unknown artist")))
.arg(Helpers.get(model, "release_year", ""))
.arg(_getStringTrack())
.arg((model && model.duration) ? model.duration.formatHMS() : 0)
Widgets.CaptionLabel {
id: expand_infos_subtitle_id
width: parent.width
text: I18n.qtr("%1 - %2 - %3 - %4")
.arg(Helpers.get(model, "main_artist", I18n.qtr("Unknown artist")))
.arg(Helpers.get(model, "release_year", ""))
.arg(_getStringTrack())
.arg((model && model.duration) ? model.duration.formatHMS() : 0)
}
}
}
......@@ -272,6 +296,7 @@ FocusScope {
Navigation.parentItem: root
Navigation.leftItem: actionButtons
Navigation.upItem: headerItem
Widgets.TableColumns {
id: tableColumns
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment