Changeset View
Changeset View
Standalone View
Standalone View
applets/digital-clock/package/contents/ui/CalendarView.qml
Show First 20 Lines • Show All 136 Lines • ▼ Show 20 Line(s) | 134 | anchors { | |||
---|---|---|---|---|---|
137 | right: parent.right | 137 | right: parent.right | ||
138 | leftMargin: spacing / 2 | 138 | leftMargin: spacing / 2 | ||
139 | } | 139 | } | ||
140 | elide: Text.ElideRight | 140 | elide: Text.ElideRight | ||
141 | text: Qt.locale().standaloneMonthName(monthView.currentDate.getMonth()) | 141 | text: Qt.locale().standaloneMonthName(monthView.currentDate.getMonth()) | ||
142 | + agenda.dateString(" yyyy") | 142 | + agenda.dateString(" yyyy") | ||
143 | } | 143 | } | ||
144 | 144 | | |||
145 | ListView { | 145 | PlasmaExtras.ScrollArea { | ||
146 | id: holidaysList | 146 | id: holidaysView | ||
147 | anchors { | 147 | anchors { | ||
148 | top: dateHeading.bottom | 148 | top: dateHeading.bottom | ||
149 | left: parent.left | 149 | left: parent.left | ||
150 | right: parent.right | 150 | right: parent.right | ||
151 | bottom: parent.bottom | 151 | bottom: parent.bottom | ||
152 | } | 152 | } | ||
153 | flickableItem.boundsBehavior: Flickable.StopAtBounds | ||||
broulik: no semicolon | |||||
154 | | ||||
155 | ListView { | ||||
156 | id: holidaysList | ||||
153 | 157 | | |||
broulik: I don't think this is needed | |||||
154 | delegate: Item { | 158 | delegate: Item { | ||
155 | id: eventItem | 159 | id: eventItem | ||
156 | width: holidaysList.width | 160 | width: holidaysList.width | ||
157 | height: eventTitle.paintedHeight | 161 | height: eventTitle.paintedHeight | ||
158 | property bool hasTime: { | 162 | property bool hasTime: { | ||
159 | var startIsMidnight = modelData.startDateTime.getHours() == 0 | 163 | var startIsMidnight = modelData.startDateTime.getHours() == 0 | ||
160 | && modelData.startDateTime.getMinutes() == 0; | 164 | && modelData.startDateTime.getMinutes() == 0; | ||
161 | 165 | | |||
Show All 21 Lines | 179 | PlasmaComponents.Label { | |||
183 | visible: eventItem.hasTime | 187 | visible: eventItem.hasTime | ||
184 | } | 188 | } | ||
185 | PlasmaComponents.Label { | 189 | PlasmaComponents.Label { | ||
186 | id: eventTitle | 190 | id: eventTitle | ||
187 | width: eventItem.hasTime ? parent.width * 0.7 : parent.width | 191 | width: eventItem.hasTime ? parent.width * 0.7 : parent.width | ||
188 | anchors.right: parent.right | 192 | anchors.right: parent.right | ||
189 | text: modelData.title | 193 | text: modelData.title | ||
190 | } | 194 | } | ||
191 | } | 195 | } | ||
broulik: Isn't this the default? | |||||
drosca: It's center aligned by default | |||||
192 | 196 | | |||
193 | section.property: "modelData.eventType" | 197 | section.property: "modelData.eventType" | ||
194 | section.delegate: PlasmaExtras.Heading { | 198 | section.delegate: PlasmaExtras.Heading { | ||
195 | level: 3 | 199 | level: 3 | ||
196 | elide: Text.ElideRight | 200 | elide: Text.ElideRight | ||
197 | text: section | 201 | text: section | ||
198 | } | 202 | } | ||
199 | } | 203 | } | ||
204 | } | ||||
200 | 205 | | |||
201 | PlasmaExtras.Heading { | 206 | PlasmaExtras.Heading { | ||
202 | anchors.fill: holidaysList | 207 | anchors.fill: holidaysView | ||
203 | anchors.leftMargin: units.largeSpacing | 208 | anchors.leftMargin: units.largeSpacing | ||
204 | anchors.rightMargin: units.largeSpacing | 209 | anchors.rightMargin: units.largeSpacing | ||
205 | text: monthView.isToday(monthView.currentDate) ? i18n("No events for today") | 210 | text: monthView.isToday(monthView.currentDate) ? i18n("No events for today") | ||
206 | : i18n("No events for this day"); | 211 | : i18n("No events for this day"); | ||
207 | level: 3 | 212 | level: 3 | ||
208 | opacity: 0.4 | 213 | opacity: 0.4 | ||
209 | visible: holidaysList.count == 0 | 214 | visible: holidaysList.count == 0 | ||
210 | } | 215 | } | ||
Show All 32 Lines |
no semicolon