Commit ab712cd2 authored by Tranter Madi's avatar Tranter Madi 🌧
Browse files

Fix binding loop in ContextView when resizing

parent 3b1f0b6c
Pipeline #61976 passed with stage
in 8 minutes and 27 seconds
......@@ -212,21 +212,23 @@ Kirigami.Page {
Loader {
id: allMetaDataLoader
property real margins: Kirigami.Units.largeSpacing + allMetaDataScroll.ScrollBar.vertical.width
width: (implicitWidth + margins <= contentLayout.width * 0.5 ? contentLayout.width * 0.5 : contentLayout.width) - margins
x: (parent.width - width) * 0.5
sourceComponent: Kirigami.FormLayout {
id: allMetaData
property real margins: Kirigami.Units.largeSpacing + allMetaDataScroll.ScrollBar.vertical.width
width: (implicitWidth + margins <= contentLayout.width * 0.5 ? contentLayout.width * 0.5 : contentLayout.width) - margins
x: wideMode? (allMetaDataScroll.width - width) * 0.5 : Kirigami.Units.largeSpacing
Repeater {
id: trackData
model: metaDataModel
delegate: RowLayout {
delegate: Item {
Kirigami.FormData.label: "<b>" + model.name + ":</b>"
implicitWidth: childrenRect.width
implicitHeight: childrenRect.height
MediaTrackMetadataDelegate {
Layout.maximumWidth: contentLayout.width - allMetaDataLoader.margins
maximumWidth: contentLayout.width - allMetaData.margins
index: model.index
name: model.name
display: model.display
......
......@@ -13,6 +13,7 @@ import org.kde.elisa 1.0
RowLayout {
id: delegateRow
property real maximumWidth: Number.POSITIVE_INFINITY
property string name
property int index
......@@ -26,13 +27,11 @@ RowLayout {
signal edited()
signal deleteField()
Layout.maximumWidth: Infinity
Loader {
id: textDisplayLoader
active: readOnly && (type === EditableTrackMetadataModel.TextEntry || type === EditableTrackMetadataModel.IntegerEntry || type === EditableTrackMetadataModel.UrlEntry || type === EditableTrackMetadataModel.DurationEntry) && typeof display !== "undefined"
visible: active
Layout.maximumWidth: Math.min(Kirigami.Units.gridUnit * 20, parent.Layout.maximumWidth)
Layout.maximumWidth: Math.min(Kirigami.Units.gridUnit * 20, delegateRow.maximumWidth)
sourceComponent: LabelWithToolTip {
text: display
......@@ -46,7 +45,7 @@ RowLayout {
id: longTextDisplayLoader
active: readOnly && (type === EditableTrackMetadataModel.LongTextEntry) && typeof display !== "undefined"
visible: active
Layout.maximumWidth: Math.min(Kirigami.Units.gridUnit * 20, parent.Layout.maximumWidth)
Layout.maximumWidth: Math.min(Kirigami.Units.gridUnit * 20, delegateRow.maximumWidth)
sourceComponent: Label {
text: display
......@@ -59,7 +58,7 @@ RowLayout {
Loader {
active: readOnly && (type === EditableTrackMetadataModel.DateEntry) && typeof display !== "undefined"
visible: active
Layout.maximumWidth: Math.min(Kirigami.Units.gridUnit * 20, parent.Layout.maximumWidth)
Layout.maximumWidth: Math.min(Kirigami.Units.gridUnit * 20, delegateRow.maximumWidth)
sourceComponent: LabelWithToolTip {
text: rawDate.toLocaleDateString(Locale.ShortFormat)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment