config: allow adjusting the speed of gifs (#1147)
Signed-off-by: Dan Griffiths <dgriffiths@widgitlabs.com>
This commit is contained in:
parent
4c72e3e06b
commit
7a41a85954
6 changed files with 9 additions and 3 deletions
|
|
@ -219,6 +219,8 @@ default, you must create it manually.
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"appearance": {
|
"appearance": {
|
||||||
|
"mediaGifSpeedAdjustment": 300,
|
||||||
|
"sessionGifSpeed": 0.7,
|
||||||
"anim": {
|
"anim": {
|
||||||
"durations": {
|
"durations": {
|
||||||
"scale": 1
|
"scale": 1
|
||||||
|
|
|
||||||
|
|
@ -80,6 +80,8 @@ JsonObject {
|
||||||
}
|
}
|
||||||
|
|
||||||
component Anim: JsonObject {
|
component Anim: JsonObject {
|
||||||
|
property real mediaGifSpeedAdjustment: 300
|
||||||
|
property real sessionGifSpeed: 0.7
|
||||||
property AnimCurves curves: AnimCurves {}
|
property AnimCurves curves: AnimCurves {}
|
||||||
property AnimDurations durations: AnimDurations {}
|
property AnimDurations durations: AnimDurations {}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -122,6 +122,8 @@ Singleton {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
anim: {
|
anim: {
|
||||||
|
mediaGifSpeedAdjustment: 300,
|
||||||
|
sessionGifSpeed: 0.7,
|
||||||
durations: {
|
durations: {
|
||||||
scale: appearance.anim.durations.scale
|
scale: appearance.anim.durations.scale
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -380,7 +380,7 @@ Item {
|
||||||
height: visualiser.height * 0.75
|
height: visualiser.height * 0.75
|
||||||
|
|
||||||
playing: Players.active?.isPlaying ?? false
|
playing: Players.active?.isPlaying ?? false
|
||||||
speed: Audio.beatTracker.bpm / 300
|
speed: Audio.beatTracker.bpm / Appearance.anim.mediaGifSpeedAdjustment
|
||||||
source: Paths.absolutePath(Config.paths.mediaGif)
|
source: Paths.absolutePath(Config.paths.mediaGif)
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
fillMode: AnimatedImage.PreserveAspectFit
|
fillMode: AnimatedImage.PreserveAspectFit
|
||||||
|
|
|
||||||
|
|
@ -213,7 +213,7 @@ Item {
|
||||||
anchors.margins: Appearance.padding.large * 2
|
anchors.margins: Appearance.padding.large * 2
|
||||||
|
|
||||||
playing: Players.active?.isPlaying ?? false
|
playing: Players.active?.isPlaying ?? false
|
||||||
speed: Audio.beatTracker.bpm / 300
|
speed: Audio.beatTracker.bpm / Appearance.anim.mediaGifSpeedAdjustment
|
||||||
source: Paths.absolutePath(Config.paths.mediaGif)
|
source: Paths.absolutePath(Config.paths.mediaGif)
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
fillMode: AnimatedImage.PreserveAspectFit
|
fillMode: AnimatedImage.PreserveAspectFit
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ Column {
|
||||||
|
|
||||||
playing: visible
|
playing: visible
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
speed: 0.7
|
speed: Appearance.anim.sessionGifSpeed
|
||||||
source: Paths.absolutePath(Config.paths.sessionGif)
|
source: Paths.absolutePath(Config.paths.sessionGif)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue