Skip to content

Commit

Permalink
Display all QML automatically
Browse files Browse the repository at this point in the history
Modify: Version change


Modify: v1.3 text
  • Loading branch information
y4my4my4m committed Sep 6, 2020
1 parent 4997cf3 commit 2306d2c
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 25 deletions.
2 changes: 1 addition & 1 deletion contents/config/main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</entry>
<entry name="checkGl3Ver" type="bool">
<label>Change gl3 version for shader compatibility.</label>
<default>false</default>
<default>true</default>
</entry>
</group>

Expand Down
43 changes: 20 additions & 23 deletions contents/ui/config.qml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import QtQuick 2.12
import QtQuick.Layouts 1
import QtQuick.Controls 2.12
import QtQuick.Dialogs 1.3
import Qt.labs.folderlistmodel 2
import "./Comp"

import org.kde.plasma.core 2.0 as PlasmaCore
Expand Down Expand Up @@ -36,30 +37,26 @@ Item {

ComboBox {
id: selectedShader
model: ListModel{
ListElement { name: "Waves"; path: "./Shader/Shader_Waves.qml"}
ListElement { name: "Waves (Slower)"; path: "./Shader/Shader_Waves3.qml"}
ListElement { name: "Protean"; path: "./Shader/Shader_Protean.qml"}
ListElement { name: "Creation"; path: "./Shader/Shader_Creation.qml"}
ListElement { name: "SIG2014"; path: "./Shader/Shader_SIG2014.qml"}
ListElement { name: "Earthbound"; path: "./Shader/Shader_Earthbound.qml"}
ListElement { name: "Earthbound2"; path: "./Shader/Shader_Earthbound2.qml"}
ListElement { name: "Earthbound3"; path: "./Shader/Shader_Earthbound3.qml"}
ListElement { name: "Earthbound4"; path: "./Shader/Shader_Earthbound4.qml"}
ListElement { name: "Earthbound5"; path: "./Shader/Shader_Earthbound5.qml"}
ListElement { name: "Sanctuary"; path: "./Shader/Shader_Sanctuary.qml"}
ListElement { name: "Snail"; path: "./Shader/Shader_Snail.qml"}
ListElement { name: "Wolfenstein"; path: "./Shader/Shader_Wolfenstein.qml"}
ListElement { name: "Journey"; path: "./Shader/Shader_Journey.qml"}
ListElement { name: "Fovea"; path: "./Shader/Shader_Fovea.qml"}
ListElement { name: "Kirby"; path: "./Shader/Shader_Kirby.qml"}
ListElement { name: "Super Plumber"; path: "./Shader/Shader_SuperPlumber.qml"}
ListElement { name: "Matrix"; path: "./Shader/Shader_Matrix.qml"}
ListElement { name: "Matrix2"; path: "./Shader/Shader_Matrix2.qml"}
Layout.minimumWidth: width
Layout.maximumWidth: width
width: 435
model: FolderListModel {
id: folderListModel
showDirs: false
nameFilters: ["*.qml"]
folder: "./Shader"
}
textRole: "name"
delegate: Component {
id: folderListDelegate
ItemDelegate {
text: fileBaseName.replace("_"," ")
}
}

textRole: "fileBaseName"
displayText: currentText.replace("_"," ")
onCurrentTextChanged: {
selectedShaderField.text = model.get(currentIndex).path
selectedShaderField.text = "./Shader/" + model.get(currentIndex, "fileName")
}
}

Expand Down Expand Up @@ -214,7 +211,7 @@ Item {
Layout.maximumWidth: width
width: formAlignment - units.largeSpacing
horizontalAlignment: Text.AlignLeft
text: "Version 1.0 - Simply load shaders\nVersion 1.1 - File Dialog added\nVersion 1.2 - iGPU fix (current version)\nVersion 2.0 - Customize shaders via GUI\nVersion 3.0 - Directly load shaders from shadertoy.com or file"
text: "Version 1.2 - iGPU fix\nVersion 1.3 - list all + 70 new shaders(current version)\nVersion 2.0 - Customize shaders via GUI\nVersion 3.0 - Directly load shaders from shadertoy.com or file"
}
}

Expand Down
1 change: 1 addition & 0 deletions contents/ui/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* This software uses some of the QML code from JaredTao/[email protected]'s ToyShader for Android.
* See: https://github.com/jaredtao/TaoShaderToy/
*
* Thanks to @simons-public on github for his contributions
*/

import QtQuick 2.12
Expand Down
2 changes: 1 addition & 1 deletion metadata.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@ X-KDE-PluginInfo-Author=@y4my4my4m
X-KDE-PluginInfo-Email[email protected]
X-KDE-PluginInfo-Name=online.knowmad.shaderwallpaper
X-KDE-PluginInfo-License=GPLv3+
X-KDE-PluginInfo-Version=1.1
X-KDE-PluginInfo-Version=1.3
X-Plasma-MainScript=ui/main.qml

0 comments on commit 2306d2c

Please sign in to comment.