Changeset View
Changeset View
Standalone View
Standalone View
src/qml/HeaderBar.qml
Show First 20 Lines • Show All 211 Lines • ▼ Show 20 Line(s) | 207 | ColumnLayout { | |||
---|---|---|---|---|---|
212 | Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter | 212 | Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter | ||
213 | Layout.preferredHeight: contentZone.height * 0.9 | 213 | Layout.preferredHeight: contentZone.height * 0.9 | ||
214 | Layout.minimumHeight: contentZone.height * 0.9 | 214 | Layout.minimumHeight: contentZone.height * 0.9 | ||
215 | Layout.maximumHeight: contentZone.height * 0.9 | 215 | Layout.maximumHeight: contentZone.height * 0.9 | ||
216 | 216 | | |||
217 | Layout.fillWidth: true | 217 | Layout.fillWidth: true | ||
218 | 218 | | |||
219 | TextMetrics { | 219 | TextMetrics { | ||
220 | id: titleFontInfo | 220 | id: mainLabelSize | ||
221 | font | 221 | text: title | ||
222 | { | 222 | font.pointSize: elisaTheme.defaultFontPointSize * 2.5 | ||
223 | bold: albumLabel.font.bold | 223 | font.bold: true | ||
224 | pointSize: albumLabel.font.pointSize | 224 | elide: Text.ElideRight | ||
225 | } | | |||
226 | text: albumLabel.text | | |||
227 | } | 225 | } | ||
228 | 226 | | |||
229 | LabelWithToolTip { | 227 | LabelWithToolTip { | ||
230 | id: mainLabel | 228 | id: mainLabel | ||
231 | text: title | 229 | text: title | ||
232 | Layout.alignment: Qt.AlignLeft | 230 | Layout.alignment: Qt.AlignLeft | ||
233 | Layout.fillWidth: true | 231 | Layout.fillWidth: true | ||
232 | Layout.maximumWidth: mainLabelSize.boundingRect.width - mainLabelSize.boundingRect.x | ||||
234 | elide: Text.ElideRight | 233 | elide: Text.ElideRight | ||
235 | color: myPalette.highlightedText | 234 | color: myPalette.highlightedText | ||
236 | font.pointSize: elisaTheme.defaultFontPointSize * 2.5 | 235 | font.pointSize: elisaTheme.defaultFontPointSize * 2.5 | ||
237 | font.bold: true | 236 | font.bold: true | ||
238 | 237 | | |||
239 | Layout.bottomMargin: titleFontInfo.height * 0.5 | 238 | Layout.bottomMargin: albumLabelSize.height * 0.5 | ||
240 | 239 | | |||
241 | MouseArea { | 240 | MouseArea { | ||
242 | id: titleMouseArea | 241 | id: titleMouseArea | ||
243 | hoverEnabled: true | 242 | hoverEnabled: true | ||
244 | anchors.fill: parent | 243 | anchors.fill: parent | ||
245 | cursorShape: Qt.PointingHandCursor | 244 | cursorShape: Qt.PointingHandCursor | ||
246 | onClicked: { | 245 | onClicked: { | ||
247 | openNowPlaying() | 246 | openNowPlaying() | ||
248 | } | 247 | } | ||
249 | } | 248 | } | ||
250 | } | 249 | } | ||
251 | 250 | | |||
251 | TextMetrics { | ||||
252 | id: authorLabelSize | ||||
253 | text: artist | ||||
254 | font.pointSize: elisaTheme.defaultFontPointSize * 1.5 | ||||
255 | elide: Text.ElideRight | ||||
256 | } | ||||
257 | | ||||
252 | LabelWithToolTip { | 258 | LabelWithToolTip { | ||
253 | id: authorLabel | 259 | id: authorLabel | ||
254 | text: artist | 260 | text: artist | ||
255 | Layout.alignment: Qt.AlignLeft | 261 | Layout.alignment: Qt.AlignLeft | ||
256 | Layout.fillWidth: true | 262 | Layout.fillWidth: true | ||
263 | Layout.maximumWidth: authorLabelSize.boundingRect.width - authorLabelSize.boundingRect.x | ||||
257 | elide: Text.ElideRight | 264 | elide: Text.ElideRight | ||
258 | color: myPalette.highlightedText | 265 | color: myPalette.highlightedText | ||
259 | font.pointSize: elisaTheme.defaultFontPointSize * 1.5 | 266 | font.pointSize: elisaTheme.defaultFontPointSize * 1.5 | ||
260 | 267 | | |||
261 | MouseArea { | 268 | MouseArea { | ||
262 | id: authorMouseArea | 269 | id: authorMouseArea | ||
263 | hoverEnabled: true | 270 | hoverEnabled: true | ||
264 | anchors.fill: parent | 271 | anchors.fill: parent | ||
265 | cursorShape: Qt.PointingHandCursor | 272 | cursorShape: Qt.PointingHandCursor | ||
266 | onClicked: { | 273 | onClicked: { | ||
267 | openArtist() | 274 | openArtist() | ||
268 | } | 275 | } | ||
269 | } | 276 | } | ||
270 | 277 | | |||
271 | layer.effect: Glow { | 278 | layer.effect: Glow { | ||
272 | cached: true | 279 | cached: true | ||
273 | 280 | | |||
274 | color: myPalette.shadow | 281 | color: myPalette.shadow | ||
275 | 282 | | |||
276 | radius: 4.0 | 283 | radius: 4.0 | ||
277 | samples: 9 | 284 | samples: 9 | ||
278 | } | 285 | } | ||
279 | } | 286 | } | ||
280 | 287 | | |||
288 | TextMetrics { | ||||
289 | id: albumLabelSize | ||||
290 | text: album | ||||
291 | font.weight: Font.Light | ||||
292 | font.pointSize: elisaTheme.defaultFontPointSize * 1 | ||||
293 | elide: Text.ElideRight | ||||
294 | } | ||||
295 | | ||||
281 | LabelWithToolTip { | 296 | LabelWithToolTip { | ||
282 | id: albumLabel | 297 | id: albumLabel | ||
283 | text: album | 298 | text: album | ||
284 | Layout.alignment: Qt.AlignLeft | 299 | Layout.alignment: Qt.AlignLeft | ||
285 | Layout.fillWidth: true | 300 | Layout.fillWidth: true | ||
301 | Layout.maximumWidth: albumLabelSize.boundingRect.width - albumLabelSize.boundingRect.x | ||||
286 | elide: Text.ElideRight | 302 | elide: Text.ElideRight | ||
287 | color: myPalette.highlightedText | 303 | color: myPalette.highlightedText | ||
288 | font.weight: Font.Light | 304 | font.weight: Font.Light | ||
289 | font.pointSize: elisaTheme.defaultFontPointSize * 1 | 305 | font.pointSize: elisaTheme.defaultFontPointSize * 1 | ||
290 | 306 | | |||
291 | layer.effect: Glow { | 307 | layer.effect: Glow { | ||
292 | cached: true | 308 | cached: true | ||
293 | 309 | | |||
▲ Show 20 Lines • Show All 149 Lines • Show Last 20 Lines |