Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLMC
Manage
Activity
Members
Labels
Plan
Issues
26
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
VideoLAN
VLMC
Commits
0d1b01ed
Commit
0d1b01ed
authored
7 years ago
by
luyikei
Browse files
Options
Downloads
Patches
Plain Diff
MediaLiraryView: Move media items with animation when filtered
parent
484c0ad0
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Gui/library/ui/MediaItem.qml
+5
-4
5 additions, 4 deletions
src/Gui/library/ui/MediaItem.qml
src/Gui/library/ui/MediaLibraryView.qml
+29
-11
29 additions, 11 deletions
src/Gui/library/ui/MediaLibraryView.qml
with
34 additions
and
15 deletions
src/Gui/library/ui/MediaItem.qml
+
5
−
4
View file @
0d1b01ed
...
...
@@ -3,10 +3,11 @@ import QtQuick.Controls 1.4
Rectangle
{
id
:
mediaItem
color
:
GridView
.
isCurrentItem
?
"
black
"
:
"
#333333
"
border.color
:
"
#222222
"
width
:
visible
?
gridView
.
cellWidth
:
0
height
:
visible
?
gridView
.
cellWidth
+
50
:
0
color
:
gridView
.
currentMedia
==
mediaId
?
"
black
"
:
"
#333333
"
border.width
:
1
visible
:
searchText
.
length
>
0
?
containsString
(
searchText
)
:
true
visible
:
searchText
.
length
==
0
||
containsString
(
searchText
)
enabled
:
visible
property
string
thumbnailPath
property
string
title
...
...
@@ -64,7 +65,7 @@ Rectangle {
id
:
dragArea
anchors.fill
:
parent
onPressed
:
{
gridView
.
current
Index
=
index
;
gridView
.
current
Media
=
mediaId
;
view
.
onMediaSelected
(
mediaId
);
}
}
...
...
This diff is collapsed.
Click to expand it.
src/Gui/library/ui/MediaLibraryView.qml
+
29
−
11
View file @
0d1b01ed
...
...
@@ -52,19 +52,37 @@ Rectangle {
}
}
GridView
{
Flickable
{
id
:
gridView
model
:
mlModel
width
:
sView
.
viewport
.
width
height
:
(
count
+
3
-
(
count
%
3
)
)
/
3
*
cellHeight
cellHeight
:
cellWidth
delegate
:
MediaItem
{
width
:
gridView
.
cellWidth
height
:
width
duration
:
model
.
duration
thumbnailPath
:
model
.
thumbnailPath
title
:
model
.
title
mediaId
:
model
.
id
height
:
(
mlRepeater
.
count
+
3
-
(
mlRepeater
.
count
%
3
)
)
/
3
*
cellHeight
property
int
cellWidth
:
200
property
int
cellHeight
:
cellWidth
property
int
currentMedia
:
-
1
Grid
{
columns
:
3
add
:
Transition
{
NumberAnimation
{
property
:
"
opacity
"
;
from
:
0.0
;
to
:
1.0
;
duration
:
200
;
easing.type
:
Easing
.
OutSine
}
}
move
:
Transition
{
NumberAnimation
{
property
:
"
x
"
;
duration
:
400
;
easing.type
:
Easing
.
OutSine
}
NumberAnimation
{
property
:
"
y
"
;
duration
:
400
;
easing.type
:
Easing
.
OutSine
}
}
Repeater
{
id
:
mlRepeater
model
:
mlModel
MediaItem
{
duration
:
model
.
duration
thumbnailPath
:
model
.
thumbnailPath
title
:
model
.
title
mediaId
:
model
.
id
}
}
}
}
}
...
...
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