~ubuntu-weather-dev/ubuntu-weather-app/reboot

« back to all changes in this revision

Viewing changes to app/ui/LocationPane.qml

  • Committer: Tarmac
  • Author(s): Victor Thompson
  • Date: 2015-02-28 14:35:49 UTC
  • mfrom: (1.3.8 reboot-graphics)
  • Revision ID: tarmac-20150228143549-1h2g8ors0vxhqmwy
* Add graphics from Design's Shapes.psd file.

Approved by Martin Borho, Ubuntu Phone Apps Jenkins Bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
    property string currentTemp
32
32
    property string todayMaxTemp
33
33
    property string todayMinTemp
 
34
    property string icon
34
35
    property string iconName
35
36
 
36
37
    Component.onCompleted: renderData(index)
69
70
 
70
71
        // set current temps and condition
71
72
        iconName = (current.icon) ? current.icon : ""
 
73
        icon = imageMap[iconName]
72
74
        conditionText = (current.condition.main) ? current.condition.main : current.condition; // difference TWC/OWM
73
75
        todayMaxTemp = (today[tempUnits].tempMax !== undefined) ? Math.round(today[tempUnits].tempMax).toString() + settings.tempScale: "";
74
76
        todayMinTemp = Math.round(today[tempUnits].tempMin).toString() + settings.tempScale;
85
87
                    day: formatTimestamp(forecasts[x].date, 'dddd'),
86
88
                    low: Math.round(forecasts[x][tempUnits].tempMin).toString() + settings.tempScale,
87
89
                    high: (forecasts[x][tempUnits].tempMax !== undefined) ? Math.round(forecasts[x][tempUnits].tempMax).toString() + settings.tempScale : "",
88
 
                                                                            image: (forecasts[x].icon !== undefined && iconMap[forecasts[x].icon] !== undefined) ? iconMap[forecasts[x].icon] + settings.tempScale : ""
 
90
                    image: (forecasts[x].icon !== undefined && iconMap[forecasts[x].icon] !== undefined) ? iconMap[forecasts[x].icon] : ""
89
91
                }
90
92
                mainPageWeekdayListView.model.append(dayData);
91
93
            }
109
111
 
110
112
        HomeGraphic {
111
113
            id: homeGraphic
112
 
            icon: locationItem.iconName
 
114
            icon: locationItem.icon
113
115
        }
114
116
 
115
117
        HomeTempInfo {
138
140
            DayDelegate {
139
141
                day: model.day
140
142
                high: model.high
 
143
                image: model.image
141
144
                low: model.low
142
145
            }
143
146
        }