base ui fixes and improvements

This commit is contained in:
emmaus 2018-10-05 11:00:32 +00:00
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
@ -71,11 +72,6 @@ ApplicationWindow {
}
}
}
ToolButton {
id: menuButton
text: qsTr("Tool Button")
}
}
}
@ -86,15 +82,52 @@ ApplicationWindow {
Drawer {
id: drawer
width: Math.min(window.width, window.height) / 3 * 2
width: window.width / 3
height: window.height
interactive: stackView.depth === 1
topMargin: toolBar.height
spacing: 10
Rectangle{
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"
}
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
focus: true
width: 100
height: 120
anchors.top: parent.top
anchors.topMargin: 0
currentIndex: -1
anchors.fill: parent
delegate: ItemDelegate {
width: parent.width
@ -110,6 +143,12 @@ ApplicationWindow {
ScrollIndicator.vertical: ScrollIndicator { }
}
}
}
}
}
FileDialog {
@ -119,21 +158,25 @@ ApplicationWindow {
"Application Packages (*.nca *.nsp)",
"Executable (*.nso *.nro)",
"All Supported Formats (*.xci *.nca *.nsp *.nso *.nro)"]
Component.onCompleted: visible = false
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}
}
##^##*/