Changeset View
Changeset View
Standalone View
Standalone View
src/MediaAlbumDelegate.qml
Show First 20 Lines • Show All 102 Lines • ▼ Show 20 Line(s) | 99 | ColumnLayout { | |||
---|---|---|---|---|---|
103 | 103 | | |||
104 | MouseArea { | 104 | MouseArea { | ||
105 | id: hoverHandle | 105 | id: hoverHandle | ||
106 | 106 | | |||
107 | hoverEnabled: true | 107 | hoverEnabled: true | ||
108 | acceptedButtons: Qt.LeftButton | 108 | acceptedButtons: Qt.LeftButton | ||
109 | focus: true | 109 | focus: true | ||
110 | 110 | | |||
111 | Layout.preferredHeight: mediaServerEntry.width * 0.9 + elisaTheme.layoutVerticalMargin * 0.5 + titleSize.height + artistSize.height | 111 | Layout.preferredHeight: mediaServerEntry.width * 0.85 + elisaTheme.layoutVerticalMargin * 0.5 + titleSize.height + artistSize.height | ||
112 | Layout.fillWidth: true | 112 | Layout.fillWidth: true | ||
113 | 113 | | |||
114 | onClicked: | 114 | onClicked: | ||
115 | { | 115 | { | ||
116 | hoverHandle.forceActiveFocus() | 116 | hoverHandle.forceActiveFocus() | ||
117 | albumClicked() | 117 | albumClicked() | ||
118 | } | 118 | } | ||
119 | 119 | | |||
Show All 15 Lines | 134 | Loader { | |||
135 | id: hoverLoader | 135 | id: hoverLoader | ||
136 | active: false | 136 | active: false | ||
137 | 137 | | |||
138 | z: 2 | 138 | z: 2 | ||
139 | 139 | | |||
140 | anchors.top: parent.top | 140 | anchors.top: parent.top | ||
141 | anchors.left: parent.left | 141 | anchors.left: parent.left | ||
142 | anchors.right: parent.right | 142 | anchors.right: parent.right | ||
143 | height: mediaServerEntry.width * 0.9 + elisaTheme.layoutVerticalMargin | 143 | height: mediaServerEntry.width * 0.85 + elisaTheme.layoutVerticalMargin | ||
144 | 144 | | |||
145 | sourceComponent: Item { | 145 | sourceComponent: Item { | ||
146 | GaussianBlur { | 146 | GaussianBlur { | ||
147 | id: hoverLayer | 147 | id: hoverLayer | ||
148 | 148 | | |||
149 | radius: 4 | 149 | radius: 4 | ||
150 | samples: 16 | 150 | samples: 16 | ||
151 | deviation: 5 | 151 | deviation: 5 | ||
▲ Show 20 Lines • Show All 52 Lines • ▼ Show 20 Line(s) | 203 | ColumnLayout { | |||
204 | id: mainData | 204 | id: mainData | ||
205 | 205 | | |||
206 | spacing: 0 | 206 | spacing: 0 | ||
207 | anchors.fill: parent | 207 | anchors.fill: parent | ||
208 | 208 | | |||
209 | z: 1 | 209 | z: 1 | ||
210 | 210 | | |||
211 | Item { | 211 | Item { | ||
212 | Layout.preferredHeight: mediaServerEntry.width * 0.9 | 212 | Layout.preferredHeight: mediaServerEntry.width * 0.85 | ||
213 | Layout.preferredWidth: mediaServerEntry.width * 0.9 | 213 | Layout.preferredWidth: mediaServerEntry.width * 0.85 | ||
214 | 214 | | |||
215 | Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter | 215 | Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter | ||
216 | 216 | | |||
217 | focus: true | 217 | focus: true | ||
218 | 218 | | |||
219 | Image { | 219 | Image { | ||
220 | id: coverImage | 220 | id: coverImage | ||
221 | 221 | | |||
222 | anchors.fill: parent | 222 | anchors.fill: parent | ||
223 | 223 | | |||
224 | sourceSize.width: mediaServerEntry.width * 0.9 | 224 | sourceSize.width: parent.width | ||
225 | sourceSize.height: mediaServerEntry.width * 0.9 | 225 | sourceSize.height: parent.height | ||
226 | fillMode: Image.PreserveAspectFit | 226 | fillMode: Image.PreserveAspectFit | ||
227 | smooth: true | 227 | smooth: true | ||
228 | 228 | | |||
229 | source: (mediaServerEntry.image ? mediaServerEntry.image : Qt.resolvedUrl(elisaTheme.albumCover)) | 229 | source: (mediaServerEntry.image ? mediaServerEntry.image : Qt.resolvedUrl(elisaTheme.albumCover)) | ||
230 | 230 | | |||
231 | asynchronous: true | 231 | asynchronous: true | ||
232 | 232 | | |||
233 | layer.enabled: image == undefined ? false : true | 233 | layer.enabled: image == undefined ? false : true | ||
Show All 15 Lines | 248 | LabelWithToolTip { | |||
249 | id: titleLabel | 249 | id: titleLabel | ||
250 | 250 | | |||
251 | font.weight: Font.Bold | 251 | font.weight: Font.Bold | ||
252 | color: myPalette.text | 252 | color: myPalette.text | ||
253 | 253 | | |||
254 | horizontalAlignment: Text.AlignLeft | 254 | horizontalAlignment: Text.AlignLeft | ||
255 | 255 | | |||
256 | Layout.topMargin: elisaTheme.layoutVerticalMargin * 0.5 | 256 | Layout.topMargin: elisaTheme.layoutVerticalMargin * 0.5 | ||
257 | Layout.preferredWidth: mediaServerEntry.width * 0.9 | 257 | Layout.preferredWidth: mediaServerEntry.width * 0.85 | ||
258 | Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom | 258 | Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom | ||
259 | 259 | | |||
260 | elide: Text.ElideRight | 260 | elide: Text.ElideRight | ||
261 | } | 261 | } | ||
262 | 262 | | |||
263 | LabelWithToolTip { | 263 | LabelWithToolTip { | ||
264 | id: artistLabel | 264 | id: artistLabel | ||
265 | 265 | | |||
266 | font.weight: Font.Normal | 266 | font.weight: Font.Light | ||
267 | color: myPalette.text | 267 | color: myPalette.text | ||
268 | 268 | | |||
269 | horizontalAlignment: Text.AlignLeft | 269 | horizontalAlignment: Text.AlignLeft | ||
270 | 270 | | |||
271 | Layout.preferredWidth: mediaServerEntry.width * 0.9 | 271 | Layout.preferredWidth: mediaServerEntry.width * 0.85 | ||
272 | Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom | 272 | Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom | ||
273 | 273 | | |||
274 | elide: Text.ElideRight | 274 | elide: Text.ElideRight | ||
275 | } | 275 | } | ||
276 | } | 276 | } | ||
277 | } | 277 | } | ||
278 | 278 | | |||
279 | Item { | 279 | Item { | ||
Show All 26 Lines |