Changeset View
Changeset View
Standalone View
Standalone View
src/qml/UserInfoDialog.qml
- This file was added.
1 | /* | ||||
---|---|---|---|---|---|
2 | * Copyright © 2020 Red Hat, Inc | ||||
3 | * This program is free software; you can redistribute it and/or | ||||
4 | * modify it under the terms of the GNU Lesser General Public | ||||
5 | * License as published by the Free Software Foundation; either | ||||
6 | * version 2 of the License, or (at your option) any later version. | ||||
7 | * | ||||
8 | * This library is distributed in the hope that it will be useful, | ||||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||||
11 | * Lesser General Public License for more details. | ||||
12 | * | ||||
13 | * You should have received a copy of the GNU Lesser General Public | ||||
14 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. | ||||
15 | * | ||||
16 | * Authors: | ||||
17 | * Jan Grulich <jgrulich@redhat.com> | ||||
18 | */ | ||||
19 | | ||||
20 | | ||||
21 | import QtQuick 2.12 | ||||
22 | import QtQuick.Controls 2.12 as QQC2 | ||||
23 | import QtQuick.Layouts 1.12 | ||||
24 | import org.kde.plasma.core 2.0 | ||||
25 | import org.kde.kirigami 2.9 as Kirigami | ||||
26 | | ||||
27 | Item { | ||||
28 | id: root | ||||
29 | | ||||
30 | signal accepted() | ||||
31 | signal rejected() | ||||
32 | | ||||
33 | Rectangle { | ||||
34 | id: background | ||||
35 | anchors.fill: parent | ||||
36 | color: Kirigami.Theme.backgroundColor | ||||
37 | } | ||||
38 | | ||||
39 | | ||||
40 | ColumnLayout { | ||||
41 | anchors.fill: parent | ||||
42 | | ||||
43 | RowLayout { | ||||
44 | Layout.fillWidth: true | ||||
45 | Layout.alignment: Qt.AlignTop | ||||
46 | | ||||
47 | Kirigami.Icon { | ||||
48 | height: units.iconSizes.enormous | ||||
49 | width: units.iconSizes.enormous | ||||
50 | source: image | ||||
51 | } | ||||
52 | | ||||
53 | ColumnLayout { | ||||
54 | Kirigami.Heading { | ||||
55 | id: nameText | ||||
56 | Layout.fillWidth: true | ||||
57 | text: name | ||||
58 | } | ||||
59 | Kirigami.Heading { | ||||
60 | id: idText | ||||
61 | Layout.fillWidth: true | ||||
62 | level: 3 | ||||
63 | text: id | ||||
64 | } | ||||
65 | } | ||||
66 | } | ||||
67 | | ||||
68 | QQC2.Label { | ||||
69 | Layout.alignment: Qt.AlignTop | ||||
70 | Layout.fillWidth: true | ||||
71 | text: i18n("Share your personal information with the requesting application?") | ||||
72 | wrapMode: Text.WordWrap | ||||
73 | } | ||||
74 | | ||||
75 | QQC2.Label { | ||||
76 | Layout.fillWidth: true | ||||
77 | text: reason | ||||
78 | wrapMode: Text.WordWrap | ||||
79 | } | ||||
80 | | ||||
81 | RowLayout { | ||||
82 | Layout.alignment: Qt.AlignBottom | Qt.AlignRight | ||||
83 | | ||||
84 | QQC2.Button { | ||||
85 | text: i18n("Share") | ||||
86 | | ||||
87 | onClicked: accepted() | ||||
88 | } | ||||
89 | QQC2.Button { | ||||
90 | text: i18n("Cancel") | ||||
91 | | ||||
92 | onClicked: rejected() | ||||
93 | } | ||||
94 | } | ||||
95 | } | ||||
96 | } |