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
Kdenlive
Commits
bbff1151
Commit
bbff1151
authored
Jan 21, 2021
by
Jean-Baptiste Mardelle
Browse files
Improve show/hide monitor toolbar (ensure it doesn't stay visible when mouse exits monitor)
parent
994afbbd
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/monitor/view/SceneToolBar.qml
View file @
bbff1151
...
...
@@ -5,24 +5,15 @@ import QtQuick 2.11
Rectangle
{
id
:
scenetoolbar
property
bool
rightSide
:
true
objectName
:
"
scenetoolbar
"
width
:
fullscreenButton
.
width
height
:
childrenRect
.
height
property
bool
rightSide
:
true
property
bool
barContainsMouse
height
:
barZone
.
childrenRect
.
height
SystemPalette
{
id
:
myPalette
;
colorGroup
:
SystemPalette
.
Active
}
color
:
Qt
.
rgba
(
myPalette
.
window
.
r
,
myPalette
.
window
.
g
,
myPalette
.
window
.
b
,
0.7
)
radius
:
4
border.color
:
Qt
.
rgba
(
0
,
0
,
0
,
0.3
)
border.width
:
1
Timer
{
id
:
fadeTimer
interval
:
2500
;
running
:
false
;
onTriggered
:
{
scenetoolbar
.
visible
=
false
scenetoolbar
.
opacity
=
1
}
}
OpacityAnimator
{
id
:
animator
target
:
scenetoolbar
;
...
...
@@ -34,12 +25,25 @@ Rectangle {
function
fadeBar
()
{
scenetoolbar
.
visible
=
true
animator
.
start
()
fadeTimer
.
start
()
}
MouseArea
{
id
:
barZone
hoverEnabled
:
true
acceptedButtons
:
Qt
.
NoButton
x
:
scenetoolbar
.
rightSide
?
-
root
.
baseUnit
:
0
width
:
fullscreenButton
.
width
+
root
.
baseUnit
height
:
scenetoolbar
.
parent
.
height
onEntered
:
{
scenetoolbar
.
opacity
=
1
}
onExited
:
{
scenetoolbar
.
opacity
=
0
}
Column
{
x
:
scenetoolbar
.
rightSide
?
root
.
baseUnit
:
0
ToolButton
{
id
:
fullscreenButton
objectName
:
"
fullScreen
"
...
...
@@ -116,4 +120,8 @@ Rectangle {
}
}
}
}
Component.onCompleted
:
{
scenetoolbar
.
fadeBar
()
}
}
src/monitor/view/kdenliveclipmonitor.qml
View file @
bbff1151
...
...
@@ -151,11 +151,6 @@ Item {
SceneToolBar
{
id
:
sceneToolBar
barContainsMouse
:
sceneToolBar
.
rightSide
?
barOverArea
.
mouseX
>=
x
-
10
:
barOverArea
.
mouseX
<
x
+
width
+
10
onBarContainsMouseChanged
:
{
sceneToolBar
.
opacity
=
1
sceneToolBar
.
visible
=
sceneToolBar
.
barContainsMouse
}
anchors
{
right
:
parent
.
right
top
:
parent
.
top
...
...
src/monitor/view/kdenlivemonitor.qml
View file @
bbff1151
...
...
@@ -80,11 +80,6 @@ Item {
}
SceneToolBar
{
id
:
sceneToolBar
barContainsMouse
:
sceneToolBar
.
rightSide
?
barOverArea
.
mouseX
>=
x
-
10
:
barOverArea
.
mouseX
<
x
+
width
+
10
onBarContainsMouseChanged
:
{
sceneToolBar
.
opacity
=
1
sceneToolBar
.
visible
=
sceneToolBar
.
barContainsMouse
}
anchors
{
right
:
parent
.
right
top
:
parent
.
top
...
...
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