Merge remote-tracking branch 'origin/master'

# Conflicts:
#	qml/Forms/FilterForm.qml
This commit is contained in:
Dorian Zedler 2019-03-23 09:22:21 +01:00
commit f85e9a9f45
10 changed files with 48 additions and 39 deletions

View file

@ -28,6 +28,10 @@ Button {
property real imageScale: 1 property real imageScale: 1
property color color: app.style.style.buttonColor property color color: app.style.style.buttonColor
property int size: 100
height: control.size
width: control.size
scale: control.pressed ? 0.8:1 scale: control.pressed ? 0.8:1
@ -37,7 +41,14 @@ Button {
} }
} }
background: Item { onSizeChanged: {
control.width = control.size
control.height = control.size
console.log("Button: size: " + control.size + " height: " + control.height + " width: " + control.width)
}
background: Item {
id: controlBackgroundContainer id: controlBackgroundContainer
RectangularGlow { RectangularGlow {
@ -54,27 +65,30 @@ Button {
Rectangle { Rectangle {
id: controlBackground id: controlBackground
anchors.fill: parent anchors.centerIn: parent
radius: height * 0.5 height: control.height
width: control.width
radius: control.size * 0.5
color: control.color color: control.color
Image {
id: buttonIcon
source: control.image
anchors.centerIn: parent
height: parent.height * 0.5
width: height
mipmap: true
fillMode: Image.PreserveAspectFit
scale: control.imageScale
}
} }
} }
Image {
id: buttonIcon
source: control.image
anchors.centerIn: parent
height: parent.height * 0.5
width: height
mipmap: true
fillMode: Image.PreserveAspectFit
scale: control.imageScale
}
} }

View file

@ -159,7 +159,11 @@ Page {
background: Rectangle { background: Rectangle {
radius: 2 radius: 2
<<<<<<< HEAD
color: classLetterCb.Material.dialogColor//app.style.style.backgroundColor color: classLetterCb.Material.dialogColor//app.style.style.backgroundColor
=======
color: classLetterCb.Material.dialogColor
>>>>>>> origin/master
layer.enabled: classLetterCb.enabled layer.enabled: classLetterCb.enabled
// layer.effect: ElevationEffect { // layer.effect: ElevationEffect {
@ -305,8 +309,7 @@ Page {
imageScale: 0 imageScale: 0
height: 50 size: 50
width: height
onClicked: { onClicked: {
filterDialog.createContact() filterDialog.createContact()

View file

@ -33,19 +33,18 @@ Page {
Column { Column {
id: mainMenu id: mainMenu
spacing: buttonWidth * 0.1 spacing: buttonSize * 0.1
anchors { anchors {
horizontalCenter: parent.horizontalCenter horizontalCenter: parent.horizontalCenter
verticalCenter: parent.verticalCenter verticalCenter: parent.verticalCenter
} }
property int buttonHeight: app.landscape() ? root.height * (0.5*0.8):buttonWidth property int buttonSize: app.landscape() ? root.height * (0.5*0.8):root.width * (0.5*0.8)
property int buttonWidth: app.landscape() ? buttonHeight:root.width * (0.5*0.8)
Row { Row {
id: bigMenu id: bigMenu
spacing: mainMenu.buttonWidth * 0.1 spacing: mainMenu.buttonSize * 0.1
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
FancyButton { FancyButton {
@ -53,8 +52,7 @@ Page {
image: "qrc:/graphics/icons/sheute.png" image: "qrc:/graphics/icons/sheute.png"
width: mainMenu.buttonWidth size: mainMenu.buttonSize
height: mainMenu.buttonHeight
onClicked: { onClicked: {
formStack.eventDay = 0 formStack.eventDay = 0
@ -67,8 +65,7 @@ Page {
image: "qrc:/graphics/icons/smorgen.png" image: "qrc:/graphics/icons/smorgen.png"
width: mainMenu.buttonWidth size: mainMenu.buttonSize
height: mainMenu.buttonHeight
onClicked: { onClicked: {
formStack.eventDay = 1 formStack.eventDay = 1
@ -81,20 +78,18 @@ Page {
Grid { Grid {
id: smallMenu id: smallMenu
columns: app.landscape() ? 4:2 columns: app.landscape() ? 4:2
spacing: mainMenu.buttonWidth * 0.1 spacing: mainMenu.buttonSize * 0.1
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
property int buttonHeight: mainMenu.buttonHeight * 0.7 property int buttonSize: mainMenu.buttonSize * 0.7
property int buttonWidth: mainMenu.buttonWidth * 0.7
FancyButton { FancyButton {
id: foodplanButton id: foodplanButton
image: app.style.style.treffpunktFannyIcon image: app.style.style.treffpunktFannyIcon
width: smallMenu.buttonWidth size: smallMenu.buttonSize
height: smallMenu.buttonHeight
onClicked: { onClicked: {
formStack.push(foodPlanForm) formStack.push(foodPlanForm)
@ -107,8 +102,7 @@ Page {
image: app.style.style.fannyLogo image: app.style.style.fannyLogo
imageScale: 1.2 imageScale: 1.2
width: smallMenu.buttonWidth size: smallMenu.buttonSize
height: smallMenu.buttonHeight
onClicked: { onClicked: {
Qt.openUrlExternally("http://www.fanny-leicht.de") Qt.openUrlExternally("http://www.fanny-leicht.de")
@ -121,8 +115,7 @@ Page {
image: app.style.style.settingsIcon image: app.style.style.settingsIcon
imageScale: 0.8 imageScale: 0.8
width: smallMenu.buttonWidth size: smallMenu.buttonSize
height: smallMenu.buttonHeight
onClicked: { onClicked: {
formStack.push(settingsForm) formStack.push(settingsForm)
@ -135,8 +128,7 @@ Page {
image: "qrc:/graphics/icons/logoutRed.png" image: "qrc:/graphics/icons/logoutRed.png"
imageScale: 0.8 imageScale: 0.8
width: smallMenu.buttonWidth size: smallMenu.buttonSize
height: smallMenu.buttonHeight
onClicked: { onClicked: {
logoutConfirmationDialog.open() logoutConfirmationDialog.open()

Binary file not shown.

Binary file not shown.

Binary file not shown.