1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-07 19:42:45 +01:00

Change ui to contain some tutorials

This commit is contained in:
Elias Steurer 2020-09-27 21:46:53 +02:00
parent bd7e95fd02
commit 462d7acc00

View File

@ -20,22 +20,6 @@ Item {
Component.onCompleted: { Component.onCompleted: {
root.state = "in" root.state = "in"
checkFFMPEG()
}
function checkFFMPEG() {
if (!ScreenPlay.util.ffmpegAvailable) {
ffmpegPopup.open()
}
}
FFMPEGPopup {
id: ffmpegPopup
anchors.centerIn: root
closePolicy: Popup.NoAutoClose
focus: true
modal: true
parent: root
} }
BackgroundParticleSystem { BackgroundParticleSystem {
@ -50,86 +34,127 @@ Item {
RowLayout { RowLayout {
id: wrapper id: wrapper
height: parent.height - (footer.height + 80) spacing: 0
height: parent.height - footer.height
anchors { anchors {
top: parent.top top: parent.top
right: parent.right right: parent.right
left: parent.left left: parent.left
margins: 40
} }
spacing: 40
Rectangle {
Layout.fillHeight: true
Layout.preferredWidth: parent.width * 0.25
color: Material.theme === Material.Dark ? Qt.darker(
Material.background) : Material.background
ListView { ListView {
id: listView id: listView
Layout.fillHeight: true anchors.fill: parent
Layout.preferredWidth: parent.width * 0.25 anchors.margins: 20
currentIndex: 0 spacing: 20
spacing: 10
model: ListModel { model: ListModel {
ListElement { ListElement {
headline: "Empty Html Wallpaper" headline: "Video import & convert (all types)"
source: ""
category: "Video Import"
}
ListElement {
headline: "Video Import native video (.webm)"
source: ""
category: "Video Import"
}
ListElement {
headline: "GIF Import"
source: ""
category: "Video Import"
}
ListElement {
headline: "Html Wallpaper"
source: "qrc:/qml/Create/Wizards/CreateEmptyHtmlWallpaper/CreateEmptyHtmlWallpaper.qml" source: "qrc:/qml/Create/Wizards/CreateEmptyHtmlWallpaper/CreateEmptyHtmlWallpaper.qml"
category: "create" category: "Create Wallpaper"
} }
ListElement { ListElement {
headline: "Empty Widget" headline: "QML Wallpaper"
source: "qrc:/qml/Create/Wizards/CreateEmptyHtmlWallpaper/CreateEmptyHtmlWallpaper.qml"
category: "Create Wallpaper"
}
ListElement {
headline: "QML Widget"
source: "qrc:/qml/Create/Wizards/CreateEmptyWidget/CreateEmptyWidget.qml" source: "qrc:/qml/Create/Wizards/CreateEmptyWidget/CreateEmptyWidget.qml"
category: "create" category: "Create Widget"
} }
ListElement { ListElement {
headline: "Create3" headline: "HTML Widget"
source: "" source: "qrc:/qml/Create/Wizards/CreateEmptyWidget/CreateEmptyWidget.qml"
category: "create" category: "Create Widget"
} }
ListElement { ListElement {
headline: "1" headline: "QML Particle Wallpaper"
source: "" source: "qrc:/qml/Create/Wizards/CreateEmptyHtmlWallpaper/CreateEmptyHtmlWallpaper.qml"
category: "import" category: "Example Wallpaper"
} }
ListElement { ListElement {
headline: "2" headline: "QML Water Shader Wallpaper"
source: "" source: "qrc:/qml/Create/Wizards/CreateEmptyHtmlWallpaper/CreateEmptyHtmlWallpaper.qml"
category: "import" category: "Example Wallpaper"
} }
ListElement { ListElement {
headline: "Create3" headline: "QML Shadertoy Shader Wallpaper"
source: "" source: "qrc:/qml/Create/Wizards/CreateEmptyHtmlWallpaper/CreateEmptyHtmlWallpaper.qml"
category: "create" category: "Example Wallpaper"
} }
ListElement { ListElement {
headline: "1" headline: "QML Lightning Shader Wallpaper"
source: "" source: "qrc:/qml/Create/Wizards/CreateEmptyHtmlWallpaper/CreateEmptyHtmlWallpaper.qml"
category: "import" category: "Example Wallpaper"
} }
ListElement { ListElement {
headline: "2" headline: "HTML IFrame Wallpaper"
source: "" source: "qrc:/qml/Create/Wizards/CreateEmptyHtmlWallpaper/CreateEmptyHtmlWallpaper.qml"
category: "import" category: "Example Wallpaper"
}
ListElement {
headline: "Create3"
source: ""
category: "create"
} }
ListElement { ListElement {
headline: "1" headline: "Clock Widget"
source: "" source: "qrc:/qml/Create/Wizards/CreateEmptyWidget/CreateEmptyWidget.qml"
category: "import" category: "Example Widget"
} }
ListElement { ListElement {
headline: "2" headline: "CPU Widget"
source: "" source: "qrc:/qml/Create/Wizards/CreateEmptyWidget/CreateEmptyWidget.qml"
category: "import" category: "Example Widget"
}
ListElement {
headline: "Storage Widget"
source: "qrc:/qml/Create/Wizards/CreateEmptyWidget/CreateEmptyWidget.qml"
category: "Example Widget"
}
ListElement {
headline: "RAM Widget"
source: "qrc:/qml/Create/Wizards/CreateEmptyWidget/CreateEmptyWidget.qml"
category: "Example Widget"
}
ListElement {
headline: "XKCD Widget"
source: "qrc:/qml/Create/Wizards/CreateEmptyWidget/CreateEmptyWidget.qml"
category: "Example Widget"
} }
} }
@ -137,10 +162,10 @@ Item {
snapMode: ScrollBar.SnapOnRelease snapMode: ScrollBar.SnapOnRelease
policy: ScrollBar.AlwaysOn policy: ScrollBar.AlwaysOn
} }
snapMode: ListView.SnapToItem // snapMode: ListView.SnapToItem
section.property: "category" section.property: "category"
section.delegate: Item { section.delegate: Item {
height: 80 height: 60
Text { Text {
verticalAlignment: Qt.AlignVCenter verticalAlignment: Qt.AlignVCenter
anchors { anchors {
@ -149,7 +174,7 @@ Item {
left: parent.left left: parent.left
leftMargin: 20 leftMargin: 20
} }
font.pointSize: 16 font.pointSize: 18
color: Material.primaryTextColor color: Material.primaryTextColor
text: section text: section
@ -163,15 +188,13 @@ Item {
highlighted: ListView.isCurrentItem highlighted: ListView.isCurrentItem
onClicked: { onClicked: {
listView.currentIndex = index listView.currentIndex = index
print(source)
loader.source = source loader.source = source
} }
// required property string source
background: Rectangle { background: Rectangle {
radius: 4 radius: 3
layer.enabled: true layer.enabled: true
layer.effect: ElevationEffect { layer.effect: ElevationEffect {
elevation: 6 elevation: listItem.highlighted ? 6 : 1
} }
color: { color: {
if (Material.theme === Material.Light) { if (Material.theme === Material.Light) {
@ -180,11 +203,18 @@ Item {
return listItem.highlighted ? Material.accentColor : Material.background return listItem.highlighted ? Material.accentColor : Material.background
} }
} }
Behavior on color {
PropertyAnimation {
property: "color"
duration: 200
easing.type: Easing.InOutQuart
}
}
} }
Text { Text {
verticalAlignment: Qt.AlignVCenter verticalAlignment: Qt.AlignVCenter
color: Material.secondaryTextColor color: Material.primaryTextColor
text: headline text: headline
anchors { anchors {
top: parent.top top: parent.top
@ -192,28 +222,33 @@ Item {
left: parent.left left: parent.left
leftMargin: 20 leftMargin: 20
} }
font.pointSize: 14 font.pointSize: 11
} }
} }
} }
}
Item {
Layout.fillHeight: true
Layout.preferredWidth: parent.width * 0.75
Rectangle { Rectangle {
Layout.fillHeight: true
Layout.preferredWidth: parent.width * 0.75 - parent.spacing
radius: 4 radius: 4
layer.enabled: true layer.enabled: true
layer.effect: ElevationEffect { layer.effect: ElevationEffect {
elevation: 6 elevation: 6
} }
color: Material.theme === Material.Light ? "white" : Material.background color: Material.theme === Material.Light ? "white" : Material.background
Loader {
id: loader
anchors { anchors {
fill: parent fill: parent
margins: 20 margins: 20
} }
} }
Loader {
id: loader
anchors.fill: parent
}
} }
} }