Debian Codegraph @

src/app/qml/ui/settings/TodayColorPage.qml

raw
1 /*
2 * Copyright (C) 2020 UBports Foundation
3 *
4 * This file is part of Lomiri Weather App
5 *
6 * Lomiri Weather App is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 3 as
8 * published by the Free Software Foundation.
9 *
10 * Lomiri Weather App 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 */
18
19 import QtQuick 2.12
20 import Lomiri.Components 1.3
21 import "../../components"
22
23 Item {
24 id: highlightTodayPage
25 height: listItem.height
26
27 ListItem {
28 id: listItem
29 height: highlightLayout.height
30 divider.visible: false
31 ListItemLayout {
32 id: highlightLayout
33 title.text: i18n.tr("Grey background for current data?")
34 Switch {
35 id: highlightSwitch
36 SlotsLayout.position: SlotsLayout.Last
37 checked: settings.highlightToday
38 onCheckedChanged: settings.highlightToday = checked;
39 }
40 }
41
42 onClicked: highlightSwitch.checked = !highlightSwitch.checked
43 }
44 }