Skip to content
Snippets Groups Projects
Commit e4267e45 authored by Rohan Rajpal's avatar Rohan Rajpal Committed by Jean-Baptiste Kempf
Browse files

qml: Editor - Add hover highlight to EditorDND buttons


Add a highlight color to easily identify which button is going
to be active when you start DND.

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 5a8b56dc
No related branches found
No related tags found
No related merge requests found
......@@ -35,6 +35,7 @@ MouseArea {
drag.target: held ? content : undefined
width: buttonloader.width
height: VLCStyle.icon_medium
hoverEnabled: true
Rectangle {
z: 1
......@@ -49,6 +50,7 @@ MouseArea {
color: VLCStyle.colors.accent
}
onPressed: held = true
onEntered: playerBtnDND.currentIndex = index
onExited: {
if(containsPress)
......
......@@ -89,6 +89,10 @@ ListView {
delegate: EditorDNDDelegate {
dndView: playerBtnDND
}
highlight: Rectangle{
anchors.verticalCenter: currentIndex > 0 ? parent.verticalCenter : undefined
color: VLCStyle.colors.bgHover
}
displaced: Transition {
NumberAnimation { properties: "x,y"; easing.type: Easing.OutQuad }
}
......
......@@ -132,6 +132,8 @@ Rectangle{
Connections{
target: toolbareditor
onUpdatePlayerModel: {
playerBtnDND.currentIndex = -1
miniPlayerBtnDND.currentIndex = -1
if (toolbarName == "MainPlayerToolbar")
playerControlBarModel.reloadConfig(config)
else
......
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