Changeset View
Changeset View
Standalone View
Standalone View
src/qml/ContextView.qml
Show First 20 Lines • Show All 67 Lines • ▼ Show 20 Line(s) | 42 | ColumnLayout { | |||
---|---|---|---|---|---|
68 | Image { | 68 | Image { | ||
69 | id: albumIcon | 69 | id: albumIcon | ||
70 | 70 | | |||
71 | source: albumArtUrl.toString() === '' ? Qt.resolvedUrl(elisaTheme.defaultAlbumImage) : albumArtUrl | 71 | source: albumArtUrl.toString() === '' ? Qt.resolvedUrl(elisaTheme.defaultAlbumImage) : albumArtUrl | ||
72 | 72 | | |||
73 | Layout.fillWidth: true | 73 | Layout.fillWidth: true | ||
74 | Layout.maximumHeight: elisaTheme.contextCoverImageSize | 74 | Layout.maximumHeight: elisaTheme.contextCoverImageSize | ||
75 | Layout.preferredHeight: elisaTheme.contextCoverImageSize | 75 | Layout.preferredHeight: elisaTheme.contextCoverImageSize | ||
76 | Layout.maximumWidth: topItem.width | ||||
76 | 77 | | |||
77 | Layout.bottomMargin: elisaTheme.layoutVerticalMargin | 78 | Layout.bottomMargin: elisaTheme.layoutVerticalMargin | ||
78 | 79 | | |||
79 | width: elisaTheme.contextCoverImageSize | 80 | sourceSize.width: topItem.width | ||
80 | height: elisaTheme.contextCoverImageSize | 81 | sourceSize.height: topItem.width | ||
81 | | ||||
82 | sourceSize.width: parent.width | | |||
83 | sourceSize.height: elisaTheme.contextCoverImageSize | | |||
84 | 82 | | |||
85 | asynchronous: true | 83 | asynchronous: true | ||
86 | 84 | | |||
87 | fillMode: Image.PreserveAspectCrop | 85 | fillMode: Image.PreserveAspectCrop | ||
88 | } | 86 | } | ||
89 | 87 | | |||
90 | LabelWithToolTip { | 88 | LabelWithToolTip { | ||
91 | id: titleLabel | 89 | id: titleLabel | ||
92 | 90 | | |||
93 | font.pointSize: elisaTheme.defaultFontPointSize * 2 | 91 | font.pointSize: elisaTheme.defaultFontPointSize * 2 | ||
94 | font.weight: Font.Bold | 92 | font.weight: Font.Bold | ||
95 | 93 | | |||
96 | Layout.alignment: Qt.AlignLeft | Qt.AlignTop | 94 | Layout.alignment: Qt.AlignLeft | Qt.AlignTop | ||
97 | Layout.topMargin: elisaTheme.layoutVerticalMargin | 95 | Layout.topMargin: elisaTheme.layoutVerticalMargin | ||
98 | 96 | Layout.fillWidth: true | |||
99 | elide: Text.ElideRight | 97 | Layout.maximumWidth: topItem.width | ||
100 | } | 98 | } | ||
101 | 99 | | |||
102 | LabelWithToolTip { | 100 | LabelWithToolTip { | ||
103 | id: albumArtistLabel | 101 | id: albumArtistLabel | ||
104 | 102 | | |||
105 | text: (artistName && albumName ? i18nc('display of artist and album in context view', '<i>by</i> <b>%1</b> <i>from</i> <b>%2</b>', artistName, albumName) : '') | 103 | text: (artistName && albumName ? i18nc('display of artist and album in context view', '<i>by</i> <b>%1</b> <i>from</i> <b>%2</b>', artistName, albumName) : '') | ||
106 | 104 | | |||
107 | font.pointSize: elisaTheme.defaultFontPointSize * 1.4 | 105 | font.pointSize: elisaTheme.defaultFontPointSize * 1.4 | ||
108 | 106 | | |||
109 | visible: artistName !== '' && albumName !== '' | 107 | visible: artistName !== '' && albumName !== '' | ||
110 | 108 | | |||
111 | Layout.alignment: Qt.AlignLeft | Qt.AlignTop | 109 | Layout.alignment: Qt.AlignLeft | Qt.AlignTop | ||
112 | Layout.bottomMargin: elisaTheme.layoutVerticalMargin | 110 | Layout.bottomMargin: elisaTheme.layoutVerticalMargin | ||
113 | 111 | Layout.fillWidth: true | |||
114 | elide: Text.ElideRight | 112 | Layout.maximumWidth: topItem.width | ||
115 | } | 113 | } | ||
116 | 114 | | |||
117 | LabelWithToolTip { | 115 | LabelWithToolTip { | ||
118 | id: albumLabel | 116 | id: albumLabel | ||
119 | 117 | | |||
120 | text: (albumName ? i18nc('display of album in context view', '<i>from</i> <b>%1</b>', albumName) : '') | 118 | text: (albumName ? i18nc('display of album in context view', '<i>from</i> <b>%1</b>', albumName) : '') | ||
121 | 119 | | |||
122 | font.pointSize: elisaTheme.defaultFontPointSize * 1.4 | 120 | font.pointSize: elisaTheme.defaultFontPointSize * 1.4 | ||
123 | 121 | | |||
124 | visible: artistName === '' && albumName !== '' | 122 | visible: artistName === '' && albumName !== '' | ||
125 | 123 | | |||
126 | Layout.alignment: Qt.AlignLeft | Qt.AlignTop | 124 | Layout.alignment: Qt.AlignLeft | Qt.AlignTop | ||
127 | Layout.bottomMargin: elisaTheme.layoutVerticalMargin | 125 | Layout.bottomMargin: elisaTheme.layoutVerticalMargin | ||
128 | 126 | Layout.fillWidth: true | |||
129 | elide: Text.ElideRight | 127 | Layout.maximumWidth: topItem.width | ||
130 | } | 128 | } | ||
131 | 129 | | |||
132 | LabelWithToolTip { | 130 | LabelWithToolTip { | ||
133 | id: artistLabel | 131 | id: artistLabel | ||
134 | 132 | | |||
135 | text: (artistName ? i18nc('display of artist in context view', '<i>by</i> <b>%1</b>', artistName) : '') | 133 | text: (artistName ? i18nc('display of artist in context view', '<i>by</i> <b>%1</b>', artistName) : '') | ||
136 | 134 | | |||
137 | font.pointSize: elisaTheme.defaultFontPointSize * 1.4 | 135 | font.pointSize: elisaTheme.defaultFontPointSize * 1.4 | ||
138 | 136 | | |||
139 | visible: artistName !== '' && albumName === '' | 137 | visible: artistName !== '' && albumName === '' | ||
140 | 138 | | |||
141 | Layout.alignment: Qt.AlignLeft | Qt.AlignTop | 139 | Layout.alignment: Qt.AlignLeft | Qt.AlignTop | ||
142 | Layout.bottomMargin: elisaTheme.layoutVerticalMargin | 140 | Layout.bottomMargin: elisaTheme.layoutVerticalMargin | ||
143 | 141 | Layout.fillWidth: true | |||
144 | elide: Text.ElideRight | 142 | Layout.maximumWidth: topItem.width | ||
145 | } | 143 | } | ||
146 | 144 | | |||
147 | Flickable { | 145 | Flickable { | ||
148 | id: flickable | 146 | id: flickable | ||
149 | clip: true | 147 | clip: true | ||
150 | 148 | | |||
151 | contentWidth: topItem.width | 149 | contentWidth: topItem.width | ||
152 | contentHeight: allMetaData.height | 150 | contentHeight: allMetaData.height | ||
Show All 32 Lines | 179 | ContextViewLyrics { | |||
185 | 183 | | |||
186 | visible: metaDataModel.lyrics !== "" | 184 | visible: metaDataModel.lyrics !== "" | ||
187 | 185 | | |||
188 | lyrics: metaDataModel.lyrics | 186 | lyrics: metaDataModel.lyrics | ||
189 | } | 187 | } | ||
190 | } | 188 | } | ||
191 | } | 189 | } | ||
192 | 190 | | |||
193 | Row { | 191 | RowLayout { | ||
194 | Layout.alignment: Qt.AlignLeft | Qt.AlignBottom | 192 | Layout.alignment: Qt.AlignLeft | Qt.AlignBottom | ||
195 | Layout.topMargin: elisaTheme.layoutVerticalMargin | 193 | Layout.topMargin: elisaTheme.layoutVerticalMargin | ||
196 | Layout.bottomMargin: elisaTheme.layoutVerticalMargin | 194 | Layout.bottomMargin: elisaTheme.layoutVerticalMargin | ||
195 | Layout.maximumWidth: topItem.width | ||||
197 | 196 | | |||
198 | spacing: elisaTheme.layoutHorizontalMargin | 197 | spacing: elisaTheme.layoutHorizontalMargin | ||
199 | 198 | | |||
200 | Image { | 199 | Image { | ||
201 | sourceSize.width: fileNameLabel.height | 200 | sourceSize.width: fileNameLabel.height | ||
202 | sourceSize.height: fileNameLabel.height | 201 | sourceSize.height: fileNameLabel.height | ||
203 | 202 | | |||
204 | source: elisaTheme.folderIcon | 203 | source: elisaTheme.folderIcon | ||
205 | } | 204 | } | ||
206 | 205 | | |||
207 | LabelWithToolTip { | 206 | LabelWithToolTip { | ||
208 | id: fileNameLabel | 207 | id: fileNameLabel | ||
209 | 208 | | |||
209 | Layout.fillWidth: true | ||||
210 | | ||||
210 | text: fileUrl | 211 | text: fileUrl | ||
211 | 212 | | |||
212 | elide: Text.ElideRight | 213 | elide: Text.ElideLeft | ||
213 | } | 214 | } | ||
214 | } | 215 | } | ||
215 | } | 216 | } | ||
216 | 217 | | |||
217 | onDatabaseIdChanged: { | 218 | onDatabaseIdChanged: { | ||
218 | metaDataModel.initializeByTrackId(databaseId) | 219 | metaDataModel.initializeByTrackId(databaseId) | ||
219 | } | 220 | } | ||
220 | 221 | | |||
Show All 14 Lines |