[UI] Improve Nyan Cat Rainbow.
This commit is contained in:
parent
19f186182b
commit
30e56c2d08
BIN
src/qml/icons/rainbow.png
Normal file
BIN
src/qml/icons/rainbow.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
|
@ -1,4 +1,4 @@
|
||||||
import QtQuick 2.11
|
import QtQuick 2.11
|
||||||
import QtQuick.Controls 2.4
|
import QtQuick.Controls 2.4
|
||||||
import QtQuick.Dialogs 1.3
|
import QtQuick.Dialogs 1.3
|
||||||
import QtQuick.Layouts 1.11
|
import QtQuick.Layouts 1.11
|
||||||
|
@ -148,7 +148,8 @@ ApplicationWindow {
|
||||||
|
|
||||||
function setProgressBarValue(val) {
|
function setProgressBarValue(val) {
|
||||||
timeLabel.text = createTimestamp(val) + " / " + createTimestamp(
|
timeLabel.text = createTimestamp(val) + " / " + createTimestamp(
|
||||||
progressBar.to) + " (" + parseFloat(player.getProperty("speed").toFixed(2)) + "x)"
|
progressBar.to) + " (" + parseFloat(
|
||||||
|
player.getProperty("speed").toFixed(2)) + "x)"
|
||||||
progressBar.value = val
|
progressBar.value = val
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -693,7 +694,7 @@ ApplicationWindow {
|
||||||
Action {
|
Action {
|
||||||
text: "Toggle Nyan Cat"
|
text: "Toggle Nyan Cat"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
fun.nyanCat = ! fun.nyanCat
|
fun.nyanCat = !fun.nyanCat
|
||||||
}
|
}
|
||||||
shortcut: keybinds.nyanCat
|
shortcut: keybinds.nyanCat
|
||||||
}
|
}
|
||||||
|
@ -886,8 +887,9 @@ ApplicationWindow {
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: controlsBackground
|
id: controlsBackground
|
||||||
height: controlsBar.visible ? controlsBar.height + progressBackground.height + (progressBar.topPadding * 2)
|
height: controlsBar.visible ? controlsBar.height + progressBackground.height
|
||||||
- (progressBackground.height * 2): 0
|
+ (progressBar.topPadding * 2)
|
||||||
|
- (progressBackground.height * 2) : 0
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
@ -1019,47 +1021,21 @@ ApplicationWindow {
|
||||||
height: parent.height
|
height: parent.height
|
||||||
color: "red"
|
color: "red"
|
||||||
opacity: 1
|
opacity: 1
|
||||||
LinearGradient {
|
Image {
|
||||||
height: parent.height
|
|
||||||
visible: fun.nyanCat
|
visible: fun.nyanCat
|
||||||
|
id: rainbow
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
gradient: Gradient {
|
height: parent.height
|
||||||
GradientStop {
|
width: parent.width
|
||||||
position: 0.0
|
source: "qrc:/player/icons/rainbow.png"
|
||||||
color: "#f00"
|
fillMode: Image.TileHorizontally
|
||||||
}
|
|
||||||
GradientStop {
|
|
||||||
position: 0.17
|
|
||||||
color: "#f90"
|
|
||||||
}
|
|
||||||
GradientStop {
|
|
||||||
position: 0.33
|
|
||||||
color: "#ff0"
|
|
||||||
}
|
|
||||||
GradientStop {
|
|
||||||
position: 0.50
|
|
||||||
color: "#3f0"
|
|
||||||
}
|
|
||||||
GradientStop {
|
|
||||||
position: 0.67
|
|
||||||
color: "#09f"
|
|
||||||
}
|
|
||||||
GradientStop {
|
|
||||||
position: 0.83
|
|
||||||
color: "#63f"
|
|
||||||
}
|
|
||||||
GradientStop {
|
|
||||||
position: 1
|
|
||||||
color: "#63f"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: cachedLength
|
id: cachedLength
|
||||||
z: 10
|
z: 10
|
||||||
anchors.left: progressLength.right
|
anchors.left: progressLength.right
|
||||||
anchors.leftMargin: progressBar.handle.width -2
|
anchors.leftMargin: progressBar.handle.width - 2
|
||||||
//anchors.left: progressBar.handle.horizontalCenter
|
//anchors.left: progressBar.handle.horizontalCenter
|
||||||
anchors.bottom: progressBar.background.bottom
|
anchors.bottom: progressBar.background.bottom
|
||||||
anchors.top: progressBar.background.top
|
anchors.top: progressBar.background.top
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
<file>icons/prev.svg</file>
|
<file>icons/prev.svg</file>
|
||||||
<file>icons/subtitles.svg</file>
|
<file>icons/subtitles.svg</file>
|
||||||
<file>icons/nyancat.gif</file>
|
<file>icons/nyancat.gif</file>
|
||||||
|
<file>icons/rainbow.png</file>
|
||||||
<file>fonts/NotoSans.ttf</file>
|
<file>fonts/NotoSans.ttf</file>
|
||||||
<file>icons/playlist.svg</file>
|
<file>icons/playlist.svg</file>
|
||||||
<file>codes.js</file>
|
<file>codes.js</file>
|
||||||
|
|
Loading…
Reference in a new issue