Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
PlayWallDesktop
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PlayWall
PlayWallDesktop
Commits
3d81c617
Commit
3d81c617
authored
Nov 20, 2021
by
Tobias Ullerich
Browse files
Options
Downloads
Patches
Plain Diff
#173 - Improve content playlist item view layout
parent
19bbd87b
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
PlayWallPlugins/PlayWallPluginContentPlayer/src/main/scala/de/tobias/playpad/plugin/content/pad/ContentPlayerPlaylistView.scala
+24
-6
24 additions, 6 deletions
...laypad/plugin/content/pad/ContentPlayerPlaylistView.scala
with
24 additions
and
6 deletions
PlayWallPlugins/PlayWallPluginContentPlayer/src/main/scala/de/tobias/playpad/plugin/content/pad/ContentPlayerPlaylistView.scala
+
24
−
6
View file @
3d81c617
...
...
@@ -7,13 +7,15 @@ import de.tobias.playpad.pad.mediapath.MediaPath
import
de.tobias.playpad.plugin.content.util.FfmpegUtils
import
javafx.application.Platform
import
javafx.event.ActionEvent
import
javafx.scene.control.
{
Button
,
Label
}
import
javafx.geometry.Pos
import
javafx.scene.control.
{
Button
,
Label
,
ProgressIndicator
,
Separator
}
import
javafx.scene.layout.
{
HBox
,
VBox
}
class
ContentPlayerPlaylistView
(
pad
:
Pad
,
mediaPath
:
MediaPath
)
extends
VBox
{
var
sizeLabel
:
Label
=
new
Label
()
var
convertButton
=
new
Button
(
Localization
.
getString
(
"plugin.content.player.playlist.convert"
))
val
progressIndicator
=
new
ProgressIndicator
()
val
sizeLabel
:
Label
=
new
Label
()
val
convertButton
=
new
Button
(
Localization
.
getString
(
"plugin.content.player.playlist.convert"
))
private
val
sizeTextLabel
=
new
Label
(
Localization
.
getString
(
"plugin.content.player.playlist.size"
))
private
val
sizeBox
=
new
HBox
(
sizeTextLabel
,
sizeLabel
)
...
...
@@ -22,18 +24,34 @@ class ContentPlayerPlaylistView(pad: Pad, mediaPath: MediaPath) extends VBox {
sizeBox
.
setSpacing
(
14
)
convertButton
.
setOnAction
(
onConvertVStackButton
)
progressIndicator
.
setProgress
(
ProgressIndicator
.
INDETERMINATE_PROGRESS
)
progressIndicator
.
setPrefSize
(
30
,
30
)
getChildren
.
addAll
(
sizeBox
,
convertButton
)
private
val
actionBox
=
new
HBox
(
convertButton
,
progressIndicator
)
actionBox
.
setAlignment
(
Pos
.
CENTER_LEFT
)
actionBox
.
setSpacing
(
14
)
private
val
separator
=
new
Separator
()
getChildren
.
addAll
(
separator
,
sizeBox
,
actionBox
)
setSpacing
(
14
)
Worker
.
runLater
(()
=>
{
val
resolution
=
FfmpegUtils
.
getResolution
(
mediaPath
.
getPath
)
Platform
.
runLater
(()
=>
{
sizeLabel
.
setText
(
f
"${resolution.getKey} x ${resolution.getValue}"
)
progressIndicator
.
setVisible
(
false
)
})
})
private
def
onConvertVStackButton
(
event
:
ActionEvent
)
=
{
private
def
onConvertVStackButton
(
event
:
ActionEvent
)
:
Unit
=
{
progressIndicator
.
setVisible
(
true
)
Worker
.
runLater
(()
=>
{
FfmpegUtils
.
convertMediaVStack
(
mediaPath
.
getPath
)
Platform
.
runLater
(()
=>
{
progressIndicator
.
setVisible
(
false
)
})
})
}
}
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