more graphical improvements

This commit is contained in:
Dorian Zedler 2018-07-19 20:08:46 +02:00
parent faf8fa8b02
commit e0f83e525e
13 changed files with 64 additions and 36 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

After

Width:  |  Height:  |  Size: 16 KiB

BIN
graphics/icons/back.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 289 B

BIN
graphics/icons/drawer.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 B

BIN
graphics/icons/menu.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 B

View file

@ -8,6 +8,7 @@ Page {
property bool cookplanChanged
title: qsTr("Speiseplanplan")
property string icon: "qrc:/graphics/TreffpunktFannyLogo.png"
property string link: "http://www.treffpunkt-fanny.de"
// Image{
// source: "qrc:/graphics/chat_background.jpg";

View file

@ -6,7 +6,8 @@ Page {
//anchors.fill: parent
title: qsTr("Vertretungsplan")
property string icon: "qrc:/graphics/FannyLogo.png"
property string icon: "qrc:/graphics/FannyLogo_small.png"
property string link: "http://www.fanny-leicht.de/j34"
// Image{
// source: "qrc:/graphics/chat_background.jpg";

View file

@ -1,10 +1,12 @@
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.1
import QtQuick.Controls.Styles 1.2
Page {
id: root
objectName: "MainPage"
//anchors.fill: parent
Shortcut {
sequences: ["Esc", "Back"]
@ -15,21 +17,18 @@ Page {
}
header: AppToolBar {
contentHeight: toolButton.implicitHeight
ToolButton {
id: toolButton
Button {
id:toolButton
enabled: window.is_error === false
anchors {
left: parent.left
verticalCenter: parent.verticalCenter
leftMargin: 5
}
background: Label {
text: stackView.depth > 1 ? "\u2BC7" : "\u4E09"
font.pixelSize: Qt.application.font.pixelSize * 2
color: "white"
leftMargin: parent.width *0.02
}
height: parent.height - parent.height * 0.5
width: height
onClicked: {
if (stackView.depth > 1) {
@ -38,6 +37,20 @@ Page {
drawer.open()
}
}
onPressed: toolButton.scale = 0.9
onReleased: toolButton.scale = 1.0
background: Image {
source: stackView.depth > 1 ? "qrc:/graphics/icons/back.png" : "qrc:/graphics/icons/drawer.png"
height: parent.height
width: parent.width
Behavior on scale {
PropertyAnimation {
duration: 100
}
}
}
}
Label {
@ -45,21 +58,35 @@ Page {
anchors {
verticalCenter: parent.verticalCenter
left: toolButton.right
leftMargin: parent.width *0.01
leftMargin: parent.width * 0.02
}
font.bold: true
color: "white"
}
Image {
id: logo
source: stackView.currentItem.icon
anchors.right: parent.right
anchors.rightMargin: parent.width *0.1
anchors.rightMargin: parent.width * 0.02
anchors.top: parent.top
height: parent.height
fillMode: Image.PreserveAspectFit
mipmap: true
asynchronous: true
Behavior on scale {
PropertyAnimation {
duration: 100
}
}
MouseArea {
enabled: stackView.currentItem.link !== undefined && stackView.currentItem.objectName !== "WebsitePage"
anchors.fill: parent
onPressed: logo.scale = 0.9
onReleased: logo.scale = 1.0
onClicked: {
stackView.push("qrc:/WebsitePage.qml",{title: "Web", link: stackView.currentItem.link, icon: stackView.currentItem.icon})
}
}
}
}
@ -100,7 +127,7 @@ Page {
text: qsTr("Fanny Webseite")
width: parent.width
onClicked: {
stackView.push("WebsitePage.qml")
stackView.push("qrc:/WebsitePage.qml",{title: "Fanny Webseite", link: "http://www.fanny-leicht.de/j34", icon: stackView.currentItem.icon})
drawer.close()
}
}
@ -114,7 +141,7 @@ Page {
drawer.close()
busyDialog.close()
if(ret === 200 || _cppServerConn.getFoodPlanData(1).cookteam !== ""){
stackView.push("FoodPlanForm.qml")
stackView.push("qrc:/FoodPlanForm.qml")
}
}
}
@ -133,6 +160,10 @@ Page {
}
width: parent.width
onClicked: {
confirmationDialog.open()
}
Dialog {
id: confirmationDialog
@ -153,7 +184,7 @@ Page {
onAccepted: {
_cppServerConn.logout()
drawer.close()
root.StackView.view.push("LoginPage.qml")
root.StackView.view.push("qrc:/LoginPage.qml")
}
}
}
@ -162,7 +193,7 @@ Page {
StackView {
id: stackView
initialItem: "HomeForm.qml"
initialItem: "qrc:/HomeForm.qml"
anchors.fill: parent
}

View file

@ -8,12 +8,13 @@ import QtQuick.Controls.Styles 1.2
Page {
id:root
//anchors.fill: parent
objectName: "WebsitePage";
title: qsTr("Fanny Webseite")
property string icon: "qrc:/graphics/FannyLogo.png"
property string icon: "qrc:/graphics/FannyLogo_small.png"
property string link: "http://www.fanny-leicht.de/j34"
ProgressBar {
id: progress
@ -28,6 +29,8 @@ Page {
WebView {
id: webView
Keys.onBackPressed: webView.goBack()
z: 0
anchors {
top: webView.loadProgress < 100 ? progress.bottom:parent.top
bottom: parent.bottom
@ -35,23 +38,11 @@ Page {
right: parent.right
}
url: "http://www.fanny-leicht.de/j34"
url: link
onLoadingChanged: {
console.log(url)
if (loadRequest.errorString)
console.error(loadRequest.errorString);
}
// RoundButton {
// //z: -1
// anchors {
// bottom: parent.bottom
// bottomMargin: 10
// right: parent.right
// rightMargin: 10
// }
// text:"\u21BA"
// onClicked: webView.reload()
// }
}
}

View file

@ -6,5 +6,9 @@
<file>graphics/chat_background.jpg</file>
<file>graphics/FannyLogo.png</file>
<file>graphics/TreffpunktFannyLogo.png</file>
<file>graphics/icons/back.png</file>
<file>graphics/icons/drawer.png</file>
<file>graphics/icons/menu.png</file>
<file>graphics/FannyLogo_small.png</file>
</qresource>
</RCC>