~nik90/ubuntu-weather-app/fix-ota10-sdk-issues

« back to all changes in this revision

Viewing changes to app/ui/settings/UnitsPage.qml

  • Committer: Nekhelesh Ramananthan
  • Date: 2016-02-28 22:40:41 UTC
  • Revision ID: krnekhelesh@gmail.com-20160228224041-6igc1h51f42xy2oi
Migrated all child settings page to listitemlayout and pageheader

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (C) 2015 Canonical Ltd
 
2
 * Copyright (C) 2015-2016 Canonical Ltd
3
3
 *
4
4
 * This file is part of Ubuntu Weather App
5
5
 *
21
21
import "../../components"
22
22
 
23
23
Page {
24
 
    title: i18n.tr("Units")
 
24
    id: unitsPage
 
25
 
25
26
    property bool bug1341671workaround: true
26
27
 
27
 
    flickable: null
 
28
    header: PageHeader {
 
29
        title: i18n.tr("Units")
 
30
        flickable: unitsFlickable
 
31
    }
28
32
 
29
33
    Flickable {
 
34
        id: unitsFlickable
30
35
        clip: true
31
36
        anchors.fill: parent
32
37
        height: parent.height
74
79
 
75
80
                listViewHeight: temperatureModel.count*units.gu(7) - units.gu(1)
76
81
                model: temperatureModel
77
 
                text: i18n.tr("Temperature")
78
 
                subText: settings.tempScale === "°C" ? i18n.tr("°C")
 
82
                title.text: i18n.tr("Temperature")
 
83
                subText.text: settings.tempScale === "°C" ? i18n.tr("°C")
79
84
                                                     : i18n.tr("°F")
80
85
 
81
86
                delegate: StandardListItem {
95
100
 
96
101
                listViewHeight: windSpeedModel.count*units.gu(7) - units.gu(1)
97
102
                model: windSpeedModel
98
 
                text: i18n.tr("Wind Speed")
99
 
                subText: settings.windUnits === "kph" ? i18n.tr("kph")
 
103
                title.text: i18n.tr("Wind Speed")
 
104
                subText.text: settings.windUnits === "kph" ? i18n.tr("kph")
100
105
                                                      : i18n.tr("mph")
101
106
 
102
107
                delegate: StandardListItem {