Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Elisa
Commits
ab712cd2
Commit
ab712cd2
authored
May 14, 2021
by
Tranter Madi
🌧
Browse files
Fix binding loop in ContextView when resizing
parent
3b1f0b6c
Pipeline
#61976
passed with stage
in 8 minutes and 27 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
src/qml/ContextView.qml
View file @
ab712cd2
...
...
@@ -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
-
allMetaData
Loader
.
margins
maximumWidth
:
contentLayout
.
width
-
allMetaData
.
margins
index
:
model
.
index
name
:
model
.
name
display
:
model
.
display
...
...
src/qml/MediaTrackMetadataDelegate.qml
View file @
ab712cd2
...
...
@@ -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
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment