Dekko
Loading...
Searching...
No Matches
FontSizeDialog.qml
1/* Copyright (C) 2025 CIT-Services <info@cit-services.eu>
2
3 This file is part of Dekko email client for Ubuntu devices
4
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License as
7 published by the Free Software Foundation; either version 2 of
8 the License or (at your option) version 3
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18import QtQuick 2.4
19import Lomiri.Components 1.3
20import Lomiri.Components.Popups 1.3
22Dialog {
23 id: sizeDialog
24 title: qsTr("Font Size")
25
26 signal sizeSelected(string size)
27
28 Column {
29 spacing: units.gu(0.5)
30
31 Repeater {
32 model: [
33 { label: "8pt", value: "8pt" },
34 { label: "9pt", value: "9pt" },
35 { label: "10pt", value: "10pt" },
36 { label: "11pt", value: "11pt" },
37 { label: "12pt", value: "12pt" },
38 { label: "14pt", value: "14pt" },
39 { label: "16pt", value: "16pt" },
40 { label: "18pt", value: "18pt" },
41 { label: "20pt", value: "20pt" },
42 { label: "24pt", value: "24pt" },
43 { label: "36pt", value: "36pt" },
44 { label: "48pt", value: "48pt" }
45 ]
46
47 AbstractButton {
48 width: parent.width
49 height: units.gu(4)
50
51 Rectangle {
52 anchors.fill: parent
53 color: parent.pressed ? "#E0E0E0" : "transparent"
54 }
55
56 Label {
57 anchors.centerIn: parent
58 text: modelData.label
59 fontSize: "medium"
60 }
61
62 onClicked: {
63 PopupUtils.close(sizeDialog)
64 sizeDialog.sizeSelected(modelData.value)
65 }
66 }
67 }
68 }
69
70 Button {
71 text: qsTr("Cancel")
72 onClicked: PopupUtils.close(sizeDialog)
73 }
74}