summaryrefslogtreecommitdiff
path: root/gui/qml/BackgroundImage.qml
blob: ba2a8af0a8be2ea96bae0210d3e65d8ce71753be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import QtQuick 2.9
import QtQuick.Controls 2.4

Rectangle {

    anchors.fill: parent
    anchors.topMargin: 40

    property var backgroundSrc
    property var backgroundVisible

    Image {
        source: parent.backgroundSrc
        visible: parent.backgroundVisible
        fillMode: Image.PreserveAspectCrop
        anchors.fill: parent
        opacity: 0.8
    }

    Component.onCompleted: {
        /* default for riseup, needs customizing */
        backgroundSrc = "qrc:/assets/img/bird.jpg"
    }
}