Changeset View
Changeset View
Standalone View
Standalone View
src/qml/MetaDataDelegate.qml
Show All 26 Lines | 24 | RowLayout { | |||
---|---|---|---|---|---|
27 | 27 | | |||
28 | height: (model.type === TrackMetadataModel.LongTextEntry ? longTextDisplayLoader.height : (metaDataLabelMetric.boundingRect.height - metaDataLabelMetric.boundingRect.y)) + | 28 | height: (model.type === TrackMetadataModel.LongTextEntry ? longTextDisplayLoader.height : (metaDataLabelMetric.boundingRect.height - metaDataLabelMetric.boundingRect.y)) + | ||
29 | (elisaTheme.layoutVerticalMargin / 2) | 29 | (elisaTheme.layoutVerticalMargin / 2) | ||
30 | 30 | | |||
31 | TextMetrics { | 31 | TextMetrics { | ||
32 | id: metaDataLabelMetric | 32 | id: metaDataLabelMetric | ||
33 | 33 | | |||
34 | text: 'Metadata Name' | 34 | text: 'Metadata Name' | ||
35 | | ||||
36 | font.weight: Font.Bold | | |||
37 | } | 35 | } | ||
38 | 36 | | |||
39 | Label { | 37 | Label { | ||
40 | id: metaDataLabels | 38 | id: metaDataLabels | ||
41 | 39 | | |||
42 | text: model.name | 40 | text: i18nc("Label for a piece of metadata, e.g. 'Album Artist:'", "%1:", model.name) | ||
43 | 41 | | |||
44 | font.weight: Font.Bold | 42 | font.weight: Font.Bold | ||
45 | 43 | | |||
46 | horizontalAlignment: Text.AlignLeft | 44 | horizontalAlignment: Text.AlignRight | ||
47 | 45 | | |||
48 | Layout.alignment: Qt.AlignTop | 46 | Layout.alignment: Qt.AlignTop | ||
49 | Layout.preferredWidth: 0.8 * elisaTheme.coverImageSize | 47 | Layout.preferredWidth: 0.8 * elisaTheme.coverImageSize | ||
50 | Layout.rightMargin: !LayoutMirroring.enabled ? elisaTheme.layoutHorizontalMargin * 2 : 0 | 48 | Layout.rightMargin: !LayoutMirroring.enabled ? elisaTheme.layoutHorizontalMargin / 2 : 0 | ||
51 | Layout.leftMargin: LayoutMirroring.enabled ? elisaTheme.layoutHorizontalMargin * 2 : 0 | 49 | Layout.leftMargin: LayoutMirroring.enabled ? elisaTheme.layoutHorizontalMargin / 2 : 0 | ||
52 | } | 50 | } | ||
53 | 51 | | |||
54 | Loader { | 52 | Loader { | ||
55 | id: textDisplayLoader | 53 | id: textDisplayLoader | ||
56 | 54 | | |||
57 | active: model.type === TrackMetadataModel.TextEntry || model.type === TrackMetadataModel.IntegerEntry | 55 | active: model.type === TrackMetadataModel.TextEntry || model.type === TrackMetadataModel.IntegerEntry | ||
58 | visible: model.type === TrackMetadataModel.TextEntry || model.type === TrackMetadataModel.IntegerEntry | 56 | visible: model.type === TrackMetadataModel.TextEntry || model.type === TrackMetadataModel.IntegerEntry | ||
59 | 57 | | |||
▲ Show 20 Lines • Show All 75 Lines • Show Last 20 Lines |