2019-01-19 23:03:50 +01:00
|
|
|
/*
|
|
|
|
Fannyapp - Application to view the cover plan of the Fanny-Leicht-Gymnasium ins Stuttgart Vaihingen, Germany
|
|
|
|
Copyright (C) 2019 Itsblue Development <development@itsblue.de>
|
|
|
|
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU Affero General Public License as published
|
|
|
|
by the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU Affero General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Affero General Public License
|
|
|
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2018-12-30 20:58:52 +01:00
|
|
|
import QtQuick 2.9
|
|
|
|
import QtQuick.Controls 2.4
|
|
|
|
import QtGraphicalEffects 1.0
|
|
|
|
|
|
|
|
Button {
|
|
|
|
id: control
|
|
|
|
|
|
|
|
property string image
|
|
|
|
property real imageScale: 1
|
|
|
|
|
2019-01-27 20:47:36 +01:00
|
|
|
|
|
|
|
scale: control.pressed ? 0.8:1
|
|
|
|
|
|
|
|
Behavior on scale {
|
|
|
|
PropertyAnimation {
|
|
|
|
duration: 100
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-12-30 20:58:52 +01:00
|
|
|
background: Item {
|
|
|
|
id: controlBackgroundContainer
|
|
|
|
|
2019-01-27 20:47:36 +01:00
|
|
|
|
2018-12-30 20:58:52 +01:00
|
|
|
|
|
|
|
Behavior on scale {
|
|
|
|
PropertyAnimation {
|
|
|
|
duration: 100
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
RectangularGlow {
|
|
|
|
id: effect
|
|
|
|
glowRadius: 0.001
|
|
|
|
spread: 0.2
|
|
|
|
color: "black"
|
|
|
|
opacity: 1
|
|
|
|
cornerRadius: controlBackground.radius
|
|
|
|
anchors.fill: controlBackground
|
|
|
|
scale: 0.75
|
|
|
|
}
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
id: controlBackground
|
|
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
|
|
radius: height * 0.5
|
|
|
|
|
|
|
|
Image {
|
|
|
|
id: buttonIcon
|
|
|
|
source: control.image
|
|
|
|
|
|
|
|
anchors.centerIn: parent
|
|
|
|
height: parent.height * 0.5
|
|
|
|
width: height
|
|
|
|
|
|
|
|
mipmap: true
|
|
|
|
|
|
|
|
fillMode: Image.PreserveAspectFit
|
|
|
|
|
|
|
|
scale: control.imageScale
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
/*
|
|
|
|
background: Image {
|
|
|
|
id: smorgenBackground
|
|
|
|
source: "qrc:/circle.png"
|
|
|
|
height: control.height
|
|
|
|
width: height
|
|
|
|
|
|
|
|
scale: control.pressed ? 0.8:1
|
|
|
|
|
|
|
|
Behavior on scale {
|
|
|
|
PropertyAnimation {
|
|
|
|
duration: 100
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
mipmap: true
|
|
|
|
smooth: true
|
|
|
|
|
|
|
|
fillMode: Image.PreserveAspectFit
|
|
|
|
|
|
|
|
Image {
|
|
|
|
id: smorgenImage
|
|
|
|
source: control.image
|
|
|
|
|
|
|
|
anchors.centerIn: parent
|
|
|
|
height: parent.height * 0.5
|
|
|
|
width: height
|
|
|
|
|
|
|
|
mipmap: true
|
|
|
|
smooth: true
|
|
|
|
|
|
|
|
fillMode: Image.PreserveAspectFit
|
|
|
|
|
|
|
|
scale: control.imageScale
|
|
|
|
|
|
|
|
Behavior on scale {
|
|
|
|
PropertyAnimation {
|
|
|
|
duration: 100
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
|