[vlc-commits] [Git][videolan/vlc][master] 5 commits: qml: fix accidental tab change in toolbar editor
Jean-Baptiste Kempf (@jbk)
gitlab at videolan.org
Tue Oct 19 11:02:20 UTC 2021
Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC
Commits:
d2357fd9 by Fatih Uzunoglu at 2021-10-19T10:21:08+00:00
qml: fix accidental tab change in toolbar editor
- - - - -
ca3d25e8 by Fatih Uzunoglu at 2021-10-19T10:21:08+00:00
qml: use null instead of Item to clear background
- - - - -
b8e5eaef by Fatih Uzunoglu at 2021-10-19T10:21:08+00:00
qml: remove unneeded anchors
- - - - -
0c48b143 by Fatih Uzunoglu at 2021-10-19T10:21:08+00:00
qml: view drag auto scroll consider footer size
- - - - -
636d3e71 by Fatih Uzunoglu at 2021-10-19T10:21:08+00:00
qml: customize DialogButtonBox better
- - - - -
3 changed files:
- modules/gui/qt/dialogs/dialogs/qml/WindowDialog.qml
- modules/gui/qt/dialogs/toolbar/qml/ToolbarEditor.qml
- modules/gui/qt/playlist/qml/PlaylistListView.qml
Changes:
=====================================
modules/gui/qt/dialogs/dialogs/qml/WindowDialog.qml
=====================================
@@ -93,8 +93,10 @@ Window {
onDiscarded: root.discarded()
onReset: root.reset()
- // Customize DialogButtonBox so that it matches with the app theme
- background: Item { }
+ Component.onCompleted: {
+ background.color = Qt.binding(function() { return VLCStyle.colors.bgAlt })
+ }
+
delegate: Widgets.TextToolButton { }
}
}
=====================================
modules/gui/qt/dialogs/toolbar/qml/ToolbarEditor.qml
=====================================
@@ -46,7 +46,7 @@ Rectangle{
id: bar
z: 1
- background: Item { }
+ background: null
readonly property int currentIdentifier: currentItem.identifier
@@ -54,9 +54,6 @@ Rectangle{
model: PlayerListModel.model
delegate: EditorTabButton {
- anchors.top: parent.top
- anchors.bottom: parent.bottom
-
text: modelData.name
readonly property int identifier: modelData.identifier
}
@@ -269,6 +266,9 @@ Rectangle{
color: VLCStyle.colors.buttonText
opacity: 0.75
+ x: -1
+ y: -1
+
onXChanged: {
if (Drag.active)
handleScroll(this)
@@ -324,7 +324,7 @@ Rectangle{
if (direction === -1)
0
else if (direction === 1 && !!target)
- target.contentWidth - target.width
+ target.contentWidth - target.width + target.footerItem.width
else
0
}
=====================================
modules/gui/qt/playlist/qml/PlaylistListView.qml
=====================================
@@ -175,40 +175,40 @@ Control {
var topDiff = (viewY + margin) - dragItemY
var bottomDiff = dragItemY - (viewY + listView.height - toolbar.height - margin)
- if (!listView.listView.atYBeginning && topDiff > 0) {
+ if (topDiff > 0)
_scrollingDirection = -1
-
- listView.fadeRectTopHovered = true
- } else if (!listView.listView.atYEnd && bottomDiff > 0) {
+ else if (bottomDiff > 0)
_scrollingDirection = 1
-
- listView.fadeRectBottomHovered = true
- } else {
+ else
_scrollingDirection = 0
-
- listView.fadeRectTopHovered = false
- listView.fadeRectBottomHovered = false
- }
}
SmoothedAnimation {
id: upAnimation
- target: listView.listView
+ target: listView
property: "contentY"
to: 0
- running: dragItem._scrollingDirection === -1 && dragItem.visible
+ running: dragItem._scrollingDirection === -1 && dragItem.visible && !target.listView.atYBeginning
velocity: VLCStyle.dp(225, VLCStyle.scale)
+
+ onRunningChanged: {
+ target.fadeRectTopHovered = running
+ }
}
SmoothedAnimation {
id: downAnimation
- target: listView.listView
+ target: listView
property: "contentY"
- to: listView.listView.contentHeight - listView.height
- running: dragItem._scrollingDirection === 1 && dragItem.visible
+ to: target.contentHeight - target.height + target.footerItem.height
+ running: dragItem._scrollingDirection === 1 && dragItem.visible && !target.listView.atYEnd
velocity: VLCStyle.dp(225, VLCStyle.scale)
+
+ onRunningChanged: {
+ target.fadeRectBottomHovered = running
+ }
}
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/744248f5ee6e2ffa205e2282036f9450025bc80f...636d3e71ef555cf852773153d7900285bba2dec9
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/744248f5ee6e2ffa205e2282036f9450025bc80f...636d3e71ef555cf852773153d7900285bba2dec9
You're receiving this email because of your account on code.videolan.org.
More information about the vlc-commits
mailing list