Changeset View
Changeset View
Standalone View
Standalone View
src/qml/PlayListEntry.qml
Show First 20 Lines • Show All 112 Lines • ▼ Show 20 Line(s) | 104 | Loader { | |||
---|---|---|---|---|---|
113 | } | 113 | } | ||
114 | } | 114 | } | ||
115 | 115 | | |||
116 | Rectangle { | 116 | Rectangle { | ||
117 | id: entryBackground | 117 | id: entryBackground | ||
118 | 118 | | |||
119 | anchors.fill: parent | 119 | anchors.fill: parent | ||
120 | anchors.rightMargin: LayoutMirroring.enabled ? scrollBarWidth : 0 | 120 | anchors.rightMargin: LayoutMirroring.enabled ? scrollBarWidth : 0 | ||
121 | z: 1 | ||||
121 | 122 | | |||
122 | color: (isAlternateColor ? myPalette.alternateBase : myPalette.base) | 123 | color: myPalette.base | ||
123 | 124 | | |||
124 | height: elisaTheme.playListDelegateHeight | 125 | height: elisaTheme.playListDelegateHeight | ||
125 | 126 | } | |||
126 | focus: true | | |||
127 | 127 | | |||
128 | ColumnLayout { | 128 | ColumnLayout { | ||
129 | spacing: 0 | 129 | spacing: 0 | ||
130 | 130 | | |||
131 | anchors.fill: parent | 131 | anchors.fill: parent | ||
132 | anchors.rightMargin: LayoutMirroring.enabled ? scrollBarWidth : 0 | ||||
133 | z: 2 | ||||
132 | 134 | | |||
133 | Item { | 135 | Item { | ||
134 | Layout.fillWidth: true | 136 | Layout.fillWidth: true | ||
135 | Layout.fillHeight: true | 137 | Layout.fillHeight: true | ||
136 | 138 | | |||
137 | RowLayout { | 139 | RowLayout { | ||
138 | id: trackRow | 140 | id: trackRow | ||
139 | 141 | | |||
▲ Show 20 Lines • Show All 258 Lines • ▼ Show 20 Line(s) | 391 | LabelWithToolTip { | |||
398 | Layout.leftMargin: elisaTheme.layoutHorizontalMargin / 2 | 400 | Layout.leftMargin: elisaTheme.layoutHorizontalMargin / 2 | ||
399 | Layout.rightMargin: elisaTheme.layoutHorizontalMargin / 2 | 401 | Layout.rightMargin: elisaTheme.layoutHorizontalMargin / 2 | ||
400 | 402 | | |||
401 | horizontalAlignment: Text.AlignRight | 403 | horizontalAlignment: Text.AlignRight | ||
402 | } | 404 | } | ||
403 | } | 405 | } | ||
404 | } | 406 | } | ||
405 | } | 407 | } | ||
406 | } | | |||
407 | 408 | | |||
408 | states: [ | 409 | states: [ | ||
409 | State { | 410 | State { | ||
410 | name: 'notSelected' | 411 | name: 'notSelected' | ||
411 | when: !containsMouse && (!playListEntry.activeFocus || !isSelected) | 412 | when: !containsMouse && !isSelected && !playListEntry.activeFocus | ||
412 | PropertyChanges { | 413 | PropertyChanges { | ||
413 | target: removeButton | 414 | target: removeButton | ||
414 | opacity: 0 | 415 | opacity: 0 | ||
415 | } | 416 | } | ||
416 | PropertyChanges { | 417 | PropertyChanges { | ||
417 | target: infoButton | 418 | target: infoButton | ||
418 | opacity: 0 | 419 | opacity: 0 | ||
419 | } | 420 | } | ||
420 | PropertyChanges { | 421 | PropertyChanges { | ||
421 | target: playPauseButton | 422 | target: playPauseButton | ||
422 | opacity: 0 | 423 | opacity: 0 | ||
423 | } | 424 | } | ||
424 | PropertyChanges { | 425 | PropertyChanges { | ||
425 | target: playIcon | 426 | target: playIcon | ||
426 | opacity: (isPlaying === MediaPlayList.IsPlaying || isPlaying === MediaPlayList.IsPaused ? 1.0 : 0.0) | 427 | opacity: (isPlaying === MediaPlayList.IsPlaying || isPlaying === MediaPlayList.IsPaused ? 1.0 : 0.0) | ||
427 | } | 428 | } | ||
428 | PropertyChanges { | 429 | PropertyChanges { | ||
429 | target: entryBackground | 430 | target: entryBackground | ||
430 | color: (isAlternateColor ? myPalette.alternateBase : myPalette.base) | 431 | color: (isAlternateColor ? myPalette.alternateBase : myPalette.base) | ||
431 | } | 432 | } | ||
432 | PropertyChanges { | 433 | PropertyChanges { | ||
434 | target: entryBackground | ||||
435 | opacity: 1. | ||||
436 | } | ||||
437 | PropertyChanges { | ||||
433 | target: ratingWidget | 438 | target: ratingWidget | ||
434 | hoverWidgetOpacity: 0.0 | 439 | hoverWidgetOpacity: 0.0 | ||
435 | } | 440 | } | ||
436 | }, | 441 | }, | ||
437 | State { | 442 | State { | ||
438 | name: 'hoveredOrSelected' | 443 | name: 'hovered' | ||
439 | when: containsMouse || (playListEntry.activeFocus && isSelected) | 444 | when: containsMouse && !playListEntry.activeFocus | ||
440 | PropertyChanges { | 445 | PropertyChanges { | ||
441 | target: removeButton | 446 | target: removeButton | ||
442 | opacity: 1 | 447 | opacity: 1 | ||
443 | } | 448 | } | ||
444 | PropertyChanges { | 449 | PropertyChanges { | ||
445 | target: playPauseButton | 450 | target: playPauseButton | ||
446 | opacity: 1 | 451 | opacity: 1 | ||
447 | } | 452 | } | ||
448 | PropertyChanges { | 453 | PropertyChanges { | ||
449 | target: infoButton | 454 | target: infoButton | ||
450 | opacity: 1 | 455 | opacity: 1 | ||
451 | } | 456 | } | ||
452 | PropertyChanges { | 457 | PropertyChanges { | ||
453 | target: playIcon | 458 | target: playIcon | ||
454 | opacity: (isPlaying === MediaPlayList.IsPlaying || isPlaying === MediaPlayList.IsPaused ? 1.0 : 0.0) | 459 | opacity: (isPlaying === MediaPlayList.IsPlaying || isPlaying === MediaPlayList.IsPaused ? 1.0 : 0.0) | ||
455 | } | 460 | } | ||
456 | PropertyChanges { | 461 | PropertyChanges { | ||
457 | target: entryBackground | 462 | target: entryBackground | ||
463 | color: myPalette.highlight | ||||
464 | } | ||||
465 | PropertyChanges { | ||||
466 | target: entryBackground | ||||
467 | opacity: 0.2 | ||||
468 | } | ||||
469 | PropertyChanges { | ||||
470 | target: ratingWidget | ||||
471 | hoverWidgetOpacity: 1.0 | ||||
472 | } | ||||
473 | }, | ||||
474 | State { | ||||
475 | name: 'selected' | ||||
476 | when: !playListEntry.activeFocus && isSelected | ||||
477 | PropertyChanges { | ||||
478 | target: removeButton | ||||
479 | opacity: 0 | ||||
480 | } | ||||
481 | PropertyChanges { | ||||
482 | target: playPauseButton | ||||
483 | opacity: 0 | ||||
484 | } | ||||
485 | PropertyChanges { | ||||
486 | target: infoButton | ||||
487 | opacity: 0 | ||||
488 | } | ||||
489 | PropertyChanges { | ||||
490 | target: playIcon | ||||
491 | opacity: (isPlaying === MediaPlayList.IsPlaying || isPlaying === MediaPlayList.IsPaused ? 1.0 : 0.0) | ||||
492 | } | ||||
493 | PropertyChanges { | ||||
494 | target: entryBackground | ||||
458 | color: myPalette.mid | 495 | color: myPalette.mid | ||
459 | } | 496 | } | ||
460 | PropertyChanges { | 497 | PropertyChanges { | ||
498 | target: entryBackground | ||||
499 | opacity: 1. | ||||
500 | } | ||||
501 | PropertyChanges { | ||||
502 | target: ratingWidget | ||||
503 | hoverWidgetOpacity: 1.0 | ||||
504 | } | ||||
505 | }, | ||||
506 | State { | ||||
507 | name: 'focused' | ||||
508 | when: playListEntry.activeFocus | ||||
509 | PropertyChanges { | ||||
510 | target: removeButton | ||||
511 | opacity: 1 | ||||
512 | } | ||||
513 | PropertyChanges { | ||||
514 | target: playPauseButton | ||||
515 | opacity: 1 | ||||
516 | } | ||||
517 | PropertyChanges { | ||||
518 | target: infoButton | ||||
519 | opacity: 1 | ||||
520 | } | ||||
521 | PropertyChanges { | ||||
522 | target: playIcon | ||||
523 | opacity: (isPlaying === MediaPlayList.IsPlaying || isPlaying === MediaPlayList.IsPaused ? 1.0 : 0.0) | ||||
524 | } | ||||
525 | PropertyChanges { | ||||
526 | target: entryBackground | ||||
527 | color: myPalette.highlight | ||||
528 | } | ||||
529 | PropertyChanges { | ||||
530 | target: entryBackground | ||||
531 | opacity: 0.6 | ||||
532 | } | ||||
533 | PropertyChanges { | ||||
461 | target: ratingWidget | 534 | target: ratingWidget | ||
462 | hoverWidgetOpacity: 1.0 | 535 | hoverWidgetOpacity: 1.0 | ||
463 | } | 536 | } | ||
464 | } | 537 | } | ||
465 | ] | 538 | ] | ||
466 | transitions: Transition { | 539 | transitions: Transition { | ||
467 | ParallelAnimation { | 540 | ParallelAnimation { | ||
468 | NumberAnimation { | 541 | NumberAnimation { | ||
Show All 12 Lines |