Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nheko
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nheko Reborn
nheko
Commits
435047b1
Verified
Commit
435047b1
authored
3 years ago
by
Nicolas Werner
Browse files
Options
Downloads
Patches
Plain Diff
Make it possible to unhide the controls on mobile
parent
ffc60180
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!15
Video player enhancements
Pipeline
#2025
passed
3 years ago
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
resources/qml/delegates/PlayableMediaMessage.qml
+6
-0
6 additions, 0 deletions
resources/qml/delegates/PlayableMediaMessage.qml
resources/qml/ui/media/MediaControls.qml
+15
-19
15 additions, 19 deletions
resources/qml/ui/media/MediaControls.qml
with
21 additions
and
19 deletions
resources/qml/delegates/PlayableMediaMessage.qml
+
6
−
0
View file @
435047b1
...
...
@@ -48,6 +48,12 @@ Item {
width
:
parent
.
width
height
:
parent
.
height
-
fileInfoLabel
.
height
TapHandler
{
onTapped
:
mediaControls
.
showControls
();
}
Image
{
anchors.fill
:
parent
...
...
This diff is collapsed.
Click to expand it.
resources/qml/ui/media/MediaControls.qml
+
15
−
19
View file @
435047b1
...
...
@@ -21,16 +21,21 @@ Rectangle {
property
var
duration
property
var
positionValue
:
0
property
var
position
property
bool
shouldShowControls
:
!
playingVideo
||
playerMouseArea
.
shouldShowControls
||
volumeSlider
.
controlsVisible
property
bool
shouldShowControls
:
!
playingVideo
||
playerMouseArea
.
shouldShowControls
||
volumeSlider
.
state
==
"
shown
"
color
:
{
var
wc
=
Nheko
.
colors
.
alternateBase
;
return
Qt
.
rgba
(
wc
.
r
,
wc
.
g
,
wc
.
b
,
0.5
);
}
opacity
:
control
.
shouldShowControls
?
1
:
0
height
:
controlLayout
.
implicitHeight
signal
playPauseActivated
()
signal
loadActivated
()
function
showControls
()
{
controlHideTimer
.
restart
();
}
function
durationToString
(
duration
)
{
function
maybeZeroPrepend
(
time
)
{
return
(
time
<
10
)
?
"
0
"
+
time
.
toString
()
:
time
.
toString
();
...
...
@@ -50,26 +55,18 @@ Rectangle {
return
hh
+
"
:
"
+
mm
+
"
:
"
+
ss
;
}
MouseArea
{
HoverHandler
{
id
:
playerMouseArea
property
bool
shouldShowControls
:
(
containsMouse
&&
controlHideTimer
.
running
)
||
(
control
.
mediaState
!=
MediaPlayer
.
PlayingState
)
||
controlLayout
.
contains
(
mapToItem
(
controlLayout
,
mouseX
,
mouseY
))
property
bool
shouldShowControls
:
hovered
||
controlHideTimer
.
running
||
control
.
mediaState
!=
MediaPlayer
.
PlayingState
onClicked
:
{
control
.
mediaLoaded
?
control
.
playPauseActivated
()
:
control
.
loadActivated
();
}
hoverEnabled
:
true
onPositionChanged
:
controlHideTimer
.
start
()
onExited
:
controlHideTimer
.
start
()
onEntered
:
controlHideTimer
.
start
()
anchors.fill
:
control
propagateComposedEvents
:
true
onHoveredChanged
:
showControls
();
}
ColumnLayout
{
id
:
controlLayout
opacity
:
control
.
shouldShowControls
?
1
:
0
enabled
:
control
.
shouldShowControls
spacing
:
0
anchors.bottom
:
control
.
bottom
...
...
@@ -219,13 +216,12 @@ Rectangle {
}
}
// Fade controls in/out
Behavior
on
opacity
{
OpacityAnimator
{
duration
:
100
}
// Fade controls in/out
Behavior
on
opacity
{
OpacityAnimator
{
duration
:
100
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment