[vlc-commits] [Git][videolan/vlc][master] 2 commits: qml: improve maindisplay playlist states
Jean-Baptiste Kempf (@jbk)
gitlab at videolan.org
Sun Jan 2 10:51:14 UTC 2022
Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC
Commits:
687f8c2c by Fatih Uzunoglu at 2022-01-02T10:40:29+00:00
qml: improve maindisplay playlist states
- - - - -
6901005f by Fatih Uzunoglu at 2022-01-02T10:40:29+00:00
qml: eliminate unneeded PropertyChanges in miniplayer
- - - - -
2 changed files:
- modules/gui/qt/maininterface/qml/MainDisplay.qml
- modules/gui/qt/player/qml/MiniPlayer.qml
Changes:
=====================================
modules/gui/qt/maininterface/qml/MainDisplay.qml
=====================================
@@ -228,7 +228,7 @@ FocusScope {
left: parent.left
bottom: parent.bottom
bottomMargin: miniPlayer.height
- right: playlistColumn.visible ? playlistColumn.left : playlistColumn.right
+ right: playlistColumn.visible ? playlistColumn.left : parent.right
rightMargin: (MainCtx.playlistDocked && MainCtx.playlistVisible)
? 0
: VLCStyle.applicationHorizontalMargin
@@ -259,66 +259,39 @@ FocusScope {
}
focus: false
+ implicitWidth: Helpers.clamp(root.width / resizeHandle.widthFactor,
+ playlist.minimumWidth,
+ root.width / 2)
+ width: 0
height: parent.height - miniPlayer.height
- property bool expanded: MainCtx.playlistDocked && MainCtx.playlistVisible
+ visible: false
- state: playlistColumn.expanded ? "expanded" : "collapsed"
+ state: (MainCtx.playlistDocked && MainCtx.playlistVisible) ? "expanded" : ""
- states: [
- State {
- name: "expanded"
- PropertyChanges {
- target: playlistColumn
- width: Helpers.clamp(root.width / resizeHandle.widthFactor,
- playlist.minimumWidth,
- root.width / 2)
- visible: true
- }
- },
- State {
- name: "collapsed"
- PropertyChanges {
- target: playlistColumn
- width: 0
- visible: false
- }
+ states: State {
+ name: "expanded"
+ PropertyChanges {
+ target: playlistColumn
+ width: playlistColumn.implicitWidth
+ visible: true
}
- ]
-
- transitions: [
- Transition {
- from: "*"
- to: "collapsed"
-
- SequentialAnimation {
- SmoothedAnimation {
- target: playlistColumn; property: "width"
-
- duration: VLCStyle.duration_fast
- easing.type: Easing.OutSine
- }
-
- PropertyAction { target: playlistColumn; property: "visible" }
- }
- },
-
- Transition {
- from: "*"
- to: "expanded"
+ }
- SequentialAnimation {
- PropertyAction { target: playlistColumn; property: "visible" }
+ transitions: Transition {
+ from: ""; to: "expanded";
+ reversible: true
- SmoothedAnimation {
- target: playlistColumn; property: "width"
+ SequentialAnimation {
+ PropertyAction { property: "visible" }
- duration: VLCStyle.duration_fast
- easing.type: Easing.InSine
- }
+ NumberAnimation {
+ property: "width"
+ duration: VLCStyle.duration_fast
+ easing.type: Easing.InOutSine
}
}
- ]
+ }
Rectangle {
id: playlistLeftBorder
=====================================
modules/gui/qt/player/qml/MiniPlayer.qml
=====================================
@@ -44,10 +44,6 @@ FocusScope {
PropertyChanges {
target: root
visible: true
- }
-
- PropertyChanges {
- target: root
height: implicitHeight
}
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/182f41d9b0fbe8c1a1c6aadd165ed2112d933381...6901005f6a6174a1f7e90e6f6b02bc51cde8fd49
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/182f41d9b0fbe8c1a1c6aadd165ed2112d933381...6901005f6a6174a1f7e90e6f6b02bc51cde8fd49
You're receiving this email because of your account on code.videolan.org.
More information about the vlc-commits
mailing list