Changeset View
Changeset View
Standalone View
Standalone View
src/qml/BasicPlayListAlbumHeader.qml
Show All 40 Lines | 26 | RowLayout { | |||
---|---|---|---|---|---|
41 | TextMetrics { | 41 | TextMetrics { | ||
42 | id: fakeDiscNumberSize | 42 | id: fakeDiscNumberSize | ||
43 | 43 | | |||
44 | text: '/9' | 44 | text: '/9' | ||
45 | } | 45 | } | ||
46 | 46 | | |||
47 | spacing: elisaTheme.layoutHorizontalMargin | 47 | spacing: elisaTheme.layoutHorizontalMargin | ||
48 | 48 | | |||
49 | Item { | ||||
50 | property int widthToTrackNumber: elisaTheme.playListDelegateHeight + | ||||
51 | elisaTheme.layoutHorizontalMargin + | ||||
52 | (trackNumberSize.boundingRect.width - trackNumberSize.boundingRect.x) + | ||||
53 | (fakeDiscNumberSize.boundingRect.width - fakeDiscNumberSize.boundingRect.x) | ||||
54 | | ||||
55 | Layout.minimumWidth: widthToTrackNumber | ||||
56 | Layout.maximumWidth: widthToTrackNumber | ||||
57 | Layout.preferredWidth: widthToTrackNumber | ||||
58 | Layout.fillHeight: true | ||||
59 | | ||||
49 | Image { | 60 | Image { | ||
50 | id: mainIcon | 61 | id: mainIcon | ||
51 | 62 | | |||
52 | property int layoutMargin: headerRow.height - elisaTheme.smallDelegateToolButtonSize - | | |||
53 | (trackNumberSize.boundingRect.width - trackNumberSize.boundingRect.x) - | | |||
54 | (fakeDiscNumberSize.boundingRect.width - fakeDiscNumberSize.boundingRect.x) - | | |||
55 | (elisaTheme.layoutHorizontalMargin * 5 / 4) | | |||
56 | | ||||
57 | source: (imageUrl != '' ? imageUrl : Qt.resolvedUrl(elisaTheme.defaultAlbumImage)) | 63 | source: (imageUrl != '' ? imageUrl : Qt.resolvedUrl(elisaTheme.defaultAlbumImage)) | ||
58 | 64 | | |||
59 | Layout.minimumWidth: headerRow.height - layoutMargin | 65 | anchors.right: parent.right | ||
60 | Layout.maximumWidth: headerRow.height - layoutMargin | 66 | width: headerRow.height | ||
61 | Layout.preferredWidth: headerRow.height - layoutMargin | 67 | height: headerRow.height | ||
62 | Layout.minimumHeight: headerRow.height - layoutMargin | 68 | sourceSize.width: headerRow.height | ||
63 | Layout.maximumHeight: headerRow.height - layoutMargin | 69 | sourceSize.height: headerRow.height | ||
64 | Layout.preferredHeight: headerRow.height - layoutMargin | | |||
65 | Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter | | |||
66 | | ||||
67 | sourceSize.width: headerRow.height - layoutMargin | | |||
68 | sourceSize.height: headerRow.height - layoutMargin | | |||
69 | 70 | | |||
70 | fillMode: Image.PreserveAspectFit | 71 | fillMode: Image.PreserveAspectFit | ||
71 | asynchronous: true | 72 | asynchronous: true | ||
72 | 73 | | |||
73 | opacity: 1 | 74 | opacity: 1 | ||
74 | } | 75 | } | ||
76 | } | ||||
75 | 77 | | |||
76 | ColumnLayout { | 78 | ColumnLayout { | ||
77 | id: albumHeaderTextColumn | 79 | id: albumHeaderTextColumn | ||
78 | 80 | | |||
79 | Layout.fillWidth: true | 81 | Layout.fillWidth: true | ||
80 | Layout.fillHeight: true | 82 | Layout.fillHeight: true | ||
81 | Layout.leftMargin: !LayoutMirroring.enabled ? - elisaTheme.layoutHorizontalMargin / 4 : 0 | 83 | Layout.leftMargin: !LayoutMirroring.enabled ? - elisaTheme.layoutHorizontalMargin / 4 : 0 | ||
82 | Layout.rightMargin: LayoutMirroring.enabled ? - elisaTheme.layoutHorizontalMargin / 4 : 0 | 84 | Layout.rightMargin: LayoutMirroring.enabled ? - elisaTheme.layoutHorizontalMargin / 4 : 0 | ||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |