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

qml: improve width handling of TracksMenu

parent 36c7977c
Branches master
No related tags found
No related merge requests found
......@@ -33,6 +33,11 @@ T.Popup {
id: root
// Settings
property var preferredWidth : stackView.currentItem.preferredWidth
width: Math.min((typeof preferredWidth !== "undefined")
? preferredWidth : Number.MAX_VALUE
, root.parent.width)
height: VLCStyle.dp(296, VLCStyle.scale)
......@@ -92,15 +97,6 @@ T.Popup {
trackMenuController: trackMenuController
}
onCurrentItemChanged: {
if (currentItem instanceof TracksPage)
root.width = Qt.binding(function () {
return Math.min(currentItem.preferredWidth, root.parent.width)
})
else
root.width = Qt.binding(function () { return root.parent.width })
}
pushEnter: Transition {
PropertyAnimation {
property: "opacity"
......
......@@ -64,8 +64,6 @@ Widgets.IconControlButton {
parent: root._parentItem
width: parent.width
x: 0
y: (parent.positionSliderY - height)
z: 1
......
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