base ui fixes and improvements

This commit is contained in:
emmaus 2018-10-05 11:00:32 +00:00
parent 75135a183f
commit d836948842
4 changed files with 96 additions and 36 deletions

View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<TargetFramework>netcoreapp2.1</TargetFramework>
<PublishDir>bin\Release\netcoreapp2.1\publish\</PublishDir>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<_IsPortable>false</_IsPortable>
</PropertyGroup>
</Project>

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M40 22H15.66l11.17-11.17L24 8 8 24l16 16 2.83-2.83L15.66 26H40v-4z"/></svg>

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

View file

@ -28,11 +28,12 @@ ApplicationWindow {
text: qsTr("")
spacing: 3
display: AbstractButton.IconOnly
icon.source: "./Images/drawer.png"
icon.source: !drawer.visible ? "./Images/drawer.png"
: "./Images/arrowBack.svg"
onClicked: {
if (contentStack.depth > 1) {
contentStack.pop()
if (drawer.visible) {
drawer.close()
} else {
drawer.open()
}
@ -41,9 +42,9 @@ ApplicationWindow {
RowLayout {
id: mainControlPanel
spacing: 20
Layout.fillHeight: true
Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
ToolButton {
id: openGameFileButton
@ -54,7 +55,7 @@ ApplicationWindow {
}
onClicked: {
loadDialog.loadGame()
loadDialog.loadGame()
}
}
@ -67,15 +68,10 @@ ApplicationWindow {
}
onClicked: {
loadDialog.loadGameFolder()
loadDialog.loadGameFolder()
}
}
}
ToolButton {
id: menuButton
text: qsTr("Tool Button")
}
}
}
@ -85,55 +81,102 @@ ApplicationWindow {
}
Drawer {
id: drawer
width: Math.min(window.width, window.height) / 3 * 2
height: window.height
interactive: stackView.depth === 1
id: drawer
width: window.width / 3
height: window.height
topMargin: toolBar.height
spacing: 10
ListView {
id: drawerMenuList
focus: true
currentIndex: -1
anchors.fill: parent
Rectangle{
delegate: ItemDelegate {
width: parent.width
text: model.title
highlighted: ListView.isCurrentItem
Column{
id: column
x: 40
y: 20
anchors.left: parent.left
anchors.leftMargin: 40
anchors.top: parent.top
anchors.topMargin: 20
spacing: 20
Image {
id: logo
width: 100
height: 100
fillMode: Image.PreserveAspectFit
source: "./Images/ryujinxLogo.png"
}
model: ListModel {
ListElement { title: "Games"}
ListElement { title: "Settings"}
ListElement { title: "Exit"}
Label {
id: appLabel
text: qsTr("Ryujinx")
font.bold: true
font.pointSize: 16
font.weight: Font.Bold
lineHeight: 1.2
}
Rectangle{
id: rectangle
anchors.top: appLabel.bottom
anchors.topMargin: 20
ListView {
id: drawerMenuList
width: 100
height: 120
anchors.top: parent.top
anchors.topMargin: 0
currentIndex: -1
delegate: ItemDelegate {
width: parent.width
text: model.title
highlighted: ListView.isCurrentItem
}
model: ListModel {
ListElement { title: "Games"}
ListElement { title: "Settings"}
ListElement { title: "Exit"}
}
ScrollIndicator.vertical: ScrollIndicator { }
}
}
ScrollIndicator.vertical: ScrollIndicator { }
}
}
}
FileDialog {
id: loadDialog
selectMultiple: false
nameFilters: ["Game Carts (*.xci)",
"Application Packages (*.nca *.nsp)",
"Executable (*.nso *.nro)",
"All Supported Formats (*.xci *.nca *.nsp *.nso *.nro)"]
Component.onCompleted: visible = false
"Application Packages (*.nca *.nsp)",
"Executable (*.nso *.nro)",
"All Supported Formats (*.xci *.nca *.nsp *.nso *.nro)"]
folder: shortcuts.home
function loadGame() {
selectFolder = false
title = qsTr("Load Game File")
show()
open()
}
function loadGameFolder() {
selectFolder = true
title = qsTr("Load Game Folder")
show()
open()
}
}
}
/*##^## Designer {
D{i:272;anchors_height:120;anchors_width:100}
}
##^##*/