summaryrefslogtreecommitdiff
path: root/src/mobile/qml/Settings.qml
blob: 391ce4c1b07f5eeea167782620680a8220f67c57 (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
import QtQuick 2.1
import BibleTime 1.0

Rectangle {
    id: settings

    property int finalHeight: 300

    color: "white"
    anchors.bottom: parent.bottom
    anchors.left: parent.left
    anchors.right: parent.right
    height: parent.height

    onVisibleChanged: PropertyAnimation {
        target: settings
        property: "opacity"
        from: 0
        to: 1
        duration: 200
        easing.type: Easing.InOutCubic
    }

    BtStyle {
        id: btStyle
    }

    ListModel {
        id: settingsModel

        ListElement { title: "Ui Font Size";   action: "uiSize" }
        ListElement { title: "Window Arrangement";   action: "arrangement" }
    }

    ListView {
        id: settingsList

        anchors.fill: parent
        anchors.topMargin: 100
        model: settingsModel

        delegate: Rectangle {
            color: "white"
            border.color: "lightgray"
            border.width: 1
            width: parent.width
            height: children[0].height * 2.5

            Text {
                id: menuText
                x: 40
                anchors.verticalCenter: parent.verticalCenter
                text: title
                color: "black"
                font.pointSize: btStyle.uiFontPointSize
            }

            MouseArea {
                anchors.fill: parent
                onClicked: {
                    if (action == "arrangement") {
                        windowArrangementMenus.visible = true;
                        settings.visible = false;
                    }
                    else if (action == "uiSize") {
                        uiFontPointSize.visible = true;
                        settings.visible = false;
                        console.log("y")
                    }
                }
            }
        }
    }

    ImageButton {
        id: backButton

        icon: "leftarrow.svg"
        height: 36
        width:  56
        anchors.bottom: parent.bottom
        anchors.horizontalCenter: parent.horizontalCenter
        anchors.bottomMargin: 8
        visible: true

        MouseArea {
            anchors.fill: parent
            onClicked: {
                settings.visible = false;
            }
        }
    }
}