~majster-pl/utorch/trunk

« back to all changes in this revision

Viewing changes to UI/WarningComponent.qml

  • Committer: Szymon Waliczek
  • Date: 2016-11-18 01:21:48 UTC
  • Revision ID: majsterrr@gmail.com-20161118012148-l1hfkw8ta4xtabct
Fix network pormisions

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Copyright (C) 2013-2016 Szymon Waliczek.
3
 
 *
4
 
 * Authors:
5
 
 *  Szymon Waliczek <majsterrr@gmail.com>
6
 
 *
7
 
 * This file is part of SocketWorld app for Ubuntu Touch
8
 
 *
9
 
 * This program is free software; you can redistribute it and/or modify
10
 
 * it under the terms of the GNU Lesser General Public License as published by
11
 
 * the Free Software Foundation; version 3.
12
 
 *
13
 
 * This program is distributed in the hope that it will be useful,
14
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
 
 * GNU Lesser General Public License for more details.
17
 
 *
18
 
 * You should have received a copy of the GNU Lesser General Public License
19
 
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
 
 */
21
 
 
22
 
 
23
 
import QtQuick 2.4
24
 
import Ubuntu.Components 1.3
25
 
import Ubuntu.Components.Popups 1.3
26
 
 
27
 
 
28
 
Component {
29
 
    id: warningDialog
30
 
 
31
 
    Dialog {
32
 
        id: dialogue
33
 
        title: "<b><font color='red'>" + i18n.tr("Warning!") + "</font></b>"
34
 
        // Created on Label
35
 
        Label {
36
 
            width: parent.width
37
 
            wrapMode: Text.WrapAtWordBoundaryOrAnywhere
38
 
            color: "#4e4e4e"
39
 
            text: i18n.tr("Using this option might couse Camera and other aplications <b>NOT</b> to work as expected or at all!<br><br><b>You are using this on your own risk!</b>")
40
 
            horizontalAlignment: Text.AlignHCenter
41
 
        }
42
 
 
43
 
        // devider
44
 
        Item {
45
 
            width: parent.width
46
 
            height: units.gu(3)
47
 
        }
48
 
 
49
 
 
50
 
        // Ok button
51
 
        Row {
52
 
            width: parent.width
53
 
            spacing: units.gu(2)
54
 
            // cancel button
55
 
            Button {
56
 
                id: button
57
 
                width: parent.width / 2 - units.gu(1)
58
 
                text: i18n.tr("<b>OK</b>")
59
 
                color: UbuntuColors.red
60
 
                onClicked: PopupUtils.close(dialogue)
61
 
            }
62
 
            Button {
63
 
                id: button2
64
 
                width: parent.width / 2 - units.gu(1)
65
 
                text: i18n.tr("<b>No thanks!</b>")
66
 
                color: UbuntuColors.green
67
 
                onClicked: {
68
 
                    PopupUtils.close(dialogue)
69
 
                    controlSwith.checked = false
70
 
                    changeFlashSettings()
71
 
                }
72
 
            }
73
 
 
74
 
        }
75
 
 
76
 
    }
77
 
 
78
 
}