1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-23 03:02:30 +01:00

Change gradient from page to main.qml to speed up page switch visuals

This commit is contained in:
kelteseth 2017-10-24 20:38:17 +02:00
parent 9072e7cf46
commit 506bd98729
2 changed files with 19 additions and 33 deletions

View File

@ -1,6 +1,4 @@
import QtQuick 2.7
import QtGraphicalEffects 1.0
import QtQuick.Layouts 1.3
Rectangle {
id:tab
@ -11,36 +9,6 @@ Rectangle {
property string pageName: "tabname"
LinearGradient {
id: tabShadow
height: 5
z:99
anchors{
top:parent.top
right: parent.right
left: parent.left
}
start: Qt.point(0, 0)
end: Qt.point(0,5)
gradient: Gradient {
GradientStop { position: 0.0; color: "#22000000" }
GradientStop { position: 1.0; color: "#00000000" }
}
}
ColumnLayout {
id: columnLayout
anchors.fill: parent
Rectangle {
Layout.alignment: Qt.AlignCenter
color: "steelblue"
Layout.preferredHeight: 100
}
}
Text {
id: txtLoading
text: pageName

View File

@ -2,7 +2,7 @@ import QtQuick 2.6
import QtQuick.Window 2.2
import QtQuick.Controls 2.1
import QtQuick.Layouts 1.3
import QtGraphicalEffects 1.0
import "Components"
ApplicationWindow {
@ -18,6 +18,24 @@ ApplicationWindow {
setY(Screen.height / 2 - height / 2);
}
LinearGradient {
id: tabShadow
height: 5
z:99
anchors{
top:nav.bottom
right: parent.right
left: parent.left
}
start: Qt.point(0, 0)
end: Qt.point(0,5)
gradient: Gradient {
GradientStop { position: 0.0; color: "#22000000" }
GradientStop { position: 1.0; color: "#00000000" }
}
}
Loader {
id: pageLoader
asynchronous: true