Changeset View
Changeset View
Standalone View
Standalone View
src/qml/HeaderBar.qml
Show All 26 Lines | 24 | FocusScope { | |||
---|---|---|---|---|---|
27 | property string title | 27 | property string title | ||
28 | property string artist | 28 | property string artist | ||
29 | property string album | 29 | property string album | ||
30 | property string image | 30 | property string image | ||
31 | property string newImage | 31 | property string newImage | ||
32 | property string oldImage | 32 | property string oldImage | ||
33 | property string tracksCount | 33 | property string tracksCount | ||
34 | property int trackRating | 34 | property int trackRating | ||
35 | property int albumID | ||||
35 | property bool ratingVisible | 36 | property bool ratingVisible | ||
36 | property alias playerControl: playControlItem | 37 | property alias playerControl: playControlItem | ||
37 | property alias isMaximized: playControlItem.isMaximized | 38 | property alias isMaximized: playControlItem.isMaximized | ||
38 | 39 | | |||
40 | signal openArtist() | ||||
41 | signal openAlbum() | ||||
42 | signal openNowPlaying() | ||||
43 | | ||||
39 | onImageChanged: | 44 | onImageChanged: | ||
40 | { | 45 | { | ||
41 | if (changeBackgroundTransition.running) { | 46 | if (changeBackgroundTransition.running) { | ||
42 | changeBackgroundTransition.complete() | 47 | changeBackgroundTransition.complete() | ||
43 | } | 48 | } | ||
44 | 49 | | |||
45 | newImage = image | 50 | newImage = image | ||
46 | changeBackgroundTransition.start() | 51 | changeBackgroundTransition.start() | ||
▲ Show 20 Lines • Show All 179 Lines • ▼ Show 20 Line(s) | 228 | LabelWithToolTip { | |||
226 | Layout.fillWidth: true | 231 | Layout.fillWidth: true | ||
227 | Layout.alignment: Qt.AlignLeft | 232 | Layout.alignment: Qt.AlignLeft | ||
228 | elide: Text.ElideRight | 233 | elide: Text.ElideRight | ||
229 | color: myPalette.highlightedText | 234 | color: myPalette.highlightedText | ||
230 | font.pointSize: elisaTheme.defaultFontPointSize * 2.5 | 235 | font.pointSize: elisaTheme.defaultFontPointSize * 2.5 | ||
231 | font.bold: true | 236 | font.bold: true | ||
232 | 237 | | |||
233 | Layout.bottomMargin: titleFontInfo.height * 0.5 | 238 | Layout.bottomMargin: titleFontInfo.height * 0.5 | ||
239 | | ||||
240 | MouseArea { | ||||
241 | id: titleMouseArea | ||||
242 | hoverEnabled: true | ||||
243 | anchors.fill: parent | ||||
244 | cursorShape: Qt.PointingHandCursor | ||||
245 | onClicked: { | ||||
246 | openNowPlaying() | ||||
247 | } | ||||
248 | } | ||||
234 | } | 249 | } | ||
235 | 250 | | |||
236 | LabelWithToolTip { | 251 | LabelWithToolTip { | ||
237 | id: authorLabel | 252 | id: authorLabel | ||
238 | text: artist | 253 | text: artist | ||
239 | Layout.fillWidth: true | 254 | Layout.fillWidth: true | ||
240 | Layout.alignment: Qt.AlignLeft | 255 | Layout.alignment: Qt.AlignLeft | ||
241 | elide: Text.ElideRight | 256 | elide: Text.ElideRight | ||
242 | color: myPalette.highlightedText | 257 | color: myPalette.highlightedText | ||
243 | font.pointSize: elisaTheme.defaultFontPointSize * 1.5 | 258 | font.pointSize: elisaTheme.defaultFontPointSize * 1.5 | ||
244 | 259 | | |||
260 | MouseArea { | ||||
261 | id: authorMouseArea | ||||
262 | hoverEnabled: true | ||||
263 | anchors.fill: parent | ||||
264 | cursorShape: Qt.PointingHandCursor | ||||
265 | onClicked: { | ||||
266 | openArtist() | ||||
267 | } | ||||
268 | } | ||||
269 | | ||||
245 | layer.effect: Glow { | 270 | layer.effect: Glow { | ||
246 | cached: true | 271 | cached: true | ||
247 | 272 | | |||
248 | color: myPalette.shadow | 273 | color: myPalette.shadow | ||
249 | 274 | | |||
250 | radius: 4.0 | 275 | radius: 4.0 | ||
251 | samples: 9 | 276 | samples: 9 | ||
252 | } | 277 | } | ||
Show All 13 Lines | 290 | layer.effect: Glow { | |||
266 | cached: true | 291 | cached: true | ||
267 | 292 | | |||
268 | color: myPalette.shadow | 293 | color: myPalette.shadow | ||
269 | 294 | | |||
270 | radius: 4.0 | 295 | radius: 4.0 | ||
271 | samples: 9 | 296 | samples: 9 | ||
272 | } | 297 | } | ||
273 | 298 | | |||
299 | MouseArea { | ||||
300 | id: albumMouseArea | ||||
301 | hoverEnabled: true | ||||
302 | anchors.fill: parent | ||||
303 | cursorShape: Qt.PointingHandCursor | ||||
304 | onClicked: { | ||||
305 | openAlbum() | ||||
306 | } | ||||
307 | } | ||||
274 | } | 308 | } | ||
275 | 309 | | |||
276 | RatingStar { | 310 | RatingStar { | ||
277 | id: mainRating | 311 | id: mainRating | ||
278 | visible: ratingVisible | 312 | visible: ratingVisible | ||
279 | starSize: elisaTheme.ratingStarSize | 313 | starSize: elisaTheme.ratingStarSize | ||
280 | starRating: trackRating | 314 | starRating: trackRating | ||
281 | Layout.alignment: Qt.AlignLeft | 315 | Layout.alignment: Qt.AlignLeft | ||
▲ Show 20 Lines • Show All 123 Lines • Show Last 20 Lines |