summaryrefslogtreecommitdiff
path: root/gui/qml/BackgroundImage.qml
blob: 3071bf45bf72ee79657e01a28104b22e60af12b8 (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";
    }
}