Commit 9fc37807 authored by Alexander Stippich's avatar Alexander Stippich
Browse files

Derive layout margins based on kirigami values

parent 635de465
......@@ -46,7 +46,6 @@ FocusScope {
id: elisaTheme
property int delegateToolButtonSize: 34
property int layoutVerticalMargin: 6
}
}
......
......@@ -39,7 +39,6 @@ FocusScope {
Item {
id: elisaTheme
property int layoutHorizontalMargin: 8
property int layoutVerticalMargin: 6
property int ratingStarSize: 16
}
......
......@@ -16,7 +16,6 @@
*/
import QtQuick 2.7
import QtQuick.Controls 2.2
Item {
property string defaultAlbumImage: 'image://icon/media-optical-audio'
......@@ -39,9 +38,6 @@ Item {
property string errorIcon: 'image://icon/error'
property string folderIcon: 'image://icon/document-open-folder'
property int layoutHorizontalMargin: 8
property int layoutVerticalMargin: 6
property int playListAlbumArtSize: 60
property int coverImageSize: 180
......@@ -67,8 +63,4 @@ Item {
property int footerToolbarHeight: 30
property int viewSelectorSmallSizeThreshold: 800
Label {
id: fontSize
}
}
......@@ -18,6 +18,7 @@
import QtQuick 2.7
import QtQuick.Layouts 1.2
import QtQuick.Controls 2.3
import org.kde.kirigami 2.5 as Kirigami
import org.kde.elisa 1.0
......@@ -44,12 +45,12 @@ Rectangle {
anchors.top: parent.top
// No bottom anchor so it can grow vertically
spacing: elisaTheme.layoutHorizontalMargin / 4
spacing: Kirigami.Units.smallSpacing
ImageWithFallback {
Layout.preferredWidth: elisaTheme.playListAlbumArtSize
Layout.preferredHeight: elisaTheme.playListAlbumArtSize
Layout.margins: elisaTheme.layoutHorizontalMargin
Layout.margins: Kirigami.Units.largeSpacing
source: imageUrl
fallback: elisaTheme.defaultAlbumImage
......@@ -66,12 +67,12 @@ Rectangle {
Layout.fillWidth: true
Layout.fillHeight: true
Layout.leftMargin: !LayoutMirroring.enabled ? - elisaTheme.layoutHorizontalMargin / 4 : 0
Layout.rightMargin: LayoutMirroring.enabled ? - elisaTheme.layoutHorizontalMargin / 4 : 0
Layout.topMargin: elisaTheme.layoutVerticalMargin
Layout.bottomMargin: elisaTheme.layoutVerticalMargin
Layout.leftMargin: !LayoutMirroring.enabled ? - Kirigami.Units.smallSpacing : 0
Layout.rightMargin: LayoutMirroring.enabled ? - Kirigami.Units.smallSpacing : 0
Layout.topMargin: Kirigami.Units.smallSpacing
Layout.bottomMargin: Kirigami.Units.smallSpacing
spacing: elisaTheme.layoutVerticalMargin
spacing: Kirigami.Units.smallSpacing
LabelWithToolTip {
id: mainLabel
......
......@@ -22,7 +22,7 @@ import QtQuick.Controls 2.2
import QtQml.Models 2.2
import QtQuick.Layouts 1.2
import QtGraphicalEffects 1.0
import org.kde.kirigami 2.5 as Kirigami
import org.kde.elisa 1.0
FocusScope {
......@@ -74,7 +74,7 @@ FocusScope {
},
Item {
id: spacer
width: elisaTheme.layoutHorizontalMargin
width: Kirigami.Units.largeSpacing
},
LabelWithToolTip {
id: viewTitle
......@@ -174,10 +174,10 @@ FocusScope {
// Horizontal line separating title and subtitle from metadata
Rectangle {
Layout.fillWidth: true
Layout.leftMargin: elisaTheme.layoutHorizontalMargin * 5
Layout.rightMargin: elisaTheme.layoutHorizontalMargin * 5
Layout.topMargin: elisaTheme.layoutVerticalMargin * 2
Layout.bottomMargin: elisaTheme.layoutVerticalMargin * 2
Layout.leftMargin: Kirigami.Units.largeSpacing* 5
Layout.rightMargin: Kirigami.Units.largeSpacing * 5
Layout.topMargin: Kirigami.Units.largeSpacing
Layout.bottomMargin: Kirigami.Units.largeSpacing
height: 1
......@@ -205,10 +205,10 @@ FocusScope {
// Horizontal line separating metadata from lyrics
Rectangle {
Layout.fillWidth: true
Layout.leftMargin: elisaTheme.layoutHorizontalMargin * 5
Layout.rightMargin: elisaTheme.layoutHorizontalMargin * 5
Layout.topMargin: elisaTheme.layoutVerticalMargin * 2
Layout.bottomMargin: elisaTheme.layoutVerticalMargin * 2
Layout.leftMargin: Kirigami.Units.largeSpacing * 5
Layout.rightMargin: Kirigami.Units.largeSpacing * 5
Layout.topMargin: Kirigami.Units.largeSpacing
Layout.bottomMargin: Kirigami.Units.largeSpacing
height: 1
......@@ -226,8 +226,7 @@ FocusScope {
horizontalAlignment: Label.AlignHCenter
Layout.fillWidth: true
Layout.bottomMargin: elisaTheme.layoutVerticalMargin
Layout.bottomMargin: Kirigami.Units.smallSpacing
visible: metaDataModel.lyrics !== ""
}
......@@ -238,7 +237,7 @@ FocusScope {
// Footer with file path label
HeaderFooterToolbar {
type: "footer"
contentLayoutSpacing: elisaTheme.layoutHorizontalMargin
contentLayoutSpacing: Kirigami.Units.largeSpacing
contentItems: [
Image {
sourceSize.width: fileNameLabel.height
......
......@@ -18,7 +18,7 @@
import QtQuick 2.10
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.2
import org.kde.kirigami 2.5 as Kirigami
import org.kde.elisa 1.0
RowLayout {
......@@ -47,8 +47,8 @@ RowLayout {
Layout.alignment: Qt.AlignCenter
Layout.preferredWidth: 0.8 * elisaTheme.coverImageSize
Layout.rightMargin: !LayoutMirroring.enabled ? elisaTheme.layoutHorizontalMargin / 2 : 0
Layout.leftMargin: LayoutMirroring.enabled ? elisaTheme.layoutHorizontalMargin / 2 : 0
Layout.rightMargin: !LayoutMirroring.enabled ? Kirigami.Units.smallSpacing : 0
Layout.leftMargin: LayoutMirroring.enabled ? Kirigami.Units.smallSpacing : 0
}
Loader {
......
......@@ -19,6 +19,7 @@ import QtQuick 2.7
import QtQuick.Controls 2.3
import QtQuick.Layouts 1.1
import QtQuick.Window 2.2
import org.kde.kirigami 2.5 as Kirigami
import org.kde.elisa 1.0
import Qt.labs.settings 1.0
......@@ -230,8 +231,8 @@ ApplicationWindow {
{
right: headerBar.right
top: headerBar.top
rightMargin: elisaTheme.layoutHorizontalMargin * 1.75
topMargin: elisaTheme.layoutHorizontalMargin * 3
rightMargin: Kirigami.Units.largeSpacing * 2
topMargin: Kirigami.Units.largeSpacing * 3
}
}
......
......@@ -20,7 +20,7 @@ import QtQuick 2.7
import QtQuick.Controls 2.2
import QtQml.Models 2.2
import QtQuick.Layouts 1.2
import org.kde.kirigami 2.5 as Kirigami
import org.kde.elisa 1.0
FocusScope {
......@@ -141,7 +141,7 @@ FocusScope {
}
cellWidth: Math.floor(availableWidth / Math.max(Math.floor(availableWidth / elisaTheme.gridDelegateSize), 2))
cellHeight: elisaTheme.gridDelegateSize + secondaryLabelSize.boundingRect.height * 2 + elisaTheme.layoutVerticalMargin * 2
cellHeight: elisaTheme.gridDelegateSize + secondaryLabelSize.boundingRect.height * 2 + Kirigami.Units.largeSpacing
delegate: GridBrowserDelegate {
width: elisaTheme.gridDelegateSize
......
......@@ -38,8 +38,8 @@ Button {
icon.width: Kirigami.Units.iconSizes.smallMedium
icon.height: Kirigami.Units.iconSizes.smallMedium
implicitWidth: icon.width + 16
implicitHeight: icon.height + 16
implicitWidth: icon.width + Kirigami.Units.largeSpacing * 2
implicitHeight: icon.height + Kirigami.Units.largeSpacing * 2
ToolTip.visible: hovered
ToolTip.delay: Qt.styleHints.mousePressAndHoldInterval
......
......@@ -117,9 +117,9 @@ FocusScope {
Item {
Layout.margins: 2 * elisaTheme.layoutVerticalMargin
Layout.preferredHeight: gridEntry.width - 4 * elisaTheme.layoutVerticalMargin
Layout.preferredWidth: gridEntry.width - 4 * elisaTheme.layoutVerticalMargin
Layout.margins: Kirigami.Units.largeSpacing
Layout.preferredHeight: gridEntry.width - 2 * Kirigami.Units.largeSpacing
Layout.preferredWidth: gridEntry.width - 2 * Kirigami.Units.largeSpacing
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
......@@ -296,7 +296,7 @@ FocusScope {
? (mainLabelSize.boundingRect.height - mainLabelSize.boundingRect.y)
: (mainLabelSize.boundingRect.height - mainLabelSize.boundingRect.y) * 2
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
Layout.bottomMargin: delegateDisplaySecondaryText ? 0 : elisaTheme.layoutVerticalMargin
Layout.bottomMargin: delegateDisplaySecondaryText ? 0 : Kirigami.Units.smallSpacing
wrapMode: delegateDisplaySecondaryText ? Label.NoWrap : Label.Wrap
maximumLineCount: 2
......@@ -314,7 +314,7 @@ FocusScope {
// See https://bugreports.qt.io/browse/QTBUG-49646
horizontalAlignment: Text.AlignHCenter
Layout.bottomMargin: elisaTheme.layoutVerticalMargin
Layout.bottomMargin: Kirigami.Units.smallSpacing
Layout.maximumWidth: gridEntry.width * 0.9
Layout.minimumWidth: Layout.maximumWidth
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
......
......@@ -21,7 +21,7 @@ import QtQuick.Window 2.2
import QtQml.Models 2.1
import QtQuick.Layouts 1.2
import QtGraphicalEffects 1.0
import org.kde.kirigami 2.5 as Kirigami
import org.kde.elisa 1.0
FocusScope {
......@@ -102,7 +102,7 @@ FocusScope {
keyNavigationEnabled: true
anchors.fill: parent
anchors.margins: elisaTheme.layoutHorizontalMargin
anchors.margins: Kirigami.Units.largeSpacing
ScrollBar.vertical: ScrollBar {
id: scrollBar
......@@ -126,7 +126,7 @@ FocusScope {
}
cellWidth: Math.floor(availableWidth / Math.max(Math.floor(availableWidth / elisaTheme.gridDelegateSize), 2))
cellHeight: elisaTheme.gridDelegateSize + secondaryLabelSize.boundingRect.height * 2 + elisaTheme.layoutVerticalMargin * 2
cellHeight: elisaTheme.gridDelegateSize + secondaryLabelSize.boundingRect.height * 2 + Kirigami.Units.largeSpacing
delegate: GridBrowserDelegate {
width: elisaTheme.gridDelegateSize
......
......@@ -20,6 +20,7 @@ import QtQuick.Layouts 1.2
import QtQuick.Controls 2.2
import QtQuick.Window 2.2
import QtGraphicalEffects 1.0
import org.kde.kirigami 2.5 as Kirigami
FocusScope {
id: headerBar
......@@ -213,8 +214,8 @@ FocusScope {
ColumnLayout {
spacing: 0
Layout.leftMargin: !LayoutMirroring.enabled ? elisaTheme.layoutHorizontalMargin : 0
Layout.rightMargin: LayoutMirroring.enabled ? elisaTheme.layoutHorizontalMargin : 0
Layout.leftMargin: !LayoutMirroring.enabled ? Kirigami.Units.largeSpacing : 0
Layout.rightMargin: LayoutMirroring.enabled ? Kirigami.Units.largeSpacing : 0
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
Layout.preferredHeight: contentZone.height * 0.9
Layout.minimumHeight: contentZone.height * 0.9
......@@ -315,10 +316,10 @@ FocusScope {
Layout.fillHeight: true
Layout.alignment: Qt.AlignRight | Qt.AlignTop
Layout.topMargin: elisaTheme.layoutHorizontalMargin * 6
Layout.bottomMargin: elisaTheme.layoutHorizontalMargin * 2
Layout.leftMargin: elisaTheme.layoutHorizontalMargin * 7
Layout.rightMargin: elisaTheme.layoutHorizontalMargin * 2
Layout.topMargin: Kirigami.Units.largeSpacing * 6
Layout.bottomMargin: Kirigami.Units.largeSpacing * 2
Layout.leftMargin: Kirigami.Units.largeSpacing * 7
Layout.rightMargin: Kirigami.Units.largeSpacing * 2
}
}
}
......@@ -338,8 +339,8 @@ FocusScope {
anchors.right: contentZone.right
anchors.bottom: contentZone.bottom
anchors.rightMargin: elisaTheme.layoutHorizontalMargin * 2
anchors.bottomMargin: elisaTheme.layoutHorizontalMargin * 2
anchors.rightMargin: Kirigami.Units.largeSpacing * 2
anchors.bottomMargin: Kirigami.Units.largeSpacing * 2
}
SequentialAnimation {
......
......@@ -19,7 +19,7 @@
import QtQuick 2.10
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.2
import org.kde.kirigami 2.5 as Kirigami
import org.kde.elisa 1.0
ColumnLayout {
......@@ -66,9 +66,9 @@ ColumnLayout {
anchors {
left: parent.left
leftMargin: elisaTheme.layoutHorizontalMargin
leftMargin: Kirigami.Units.largeSpacing
right: parent.right
rightMargin: elisaTheme.layoutHorizontalMargin
rightMargin: Kirigami.Units.largeSpacing
verticalCenter: parent.verticalCenter
}
spacing: 0
......
......@@ -21,6 +21,7 @@ import QtQuick.Layouts 1.2
import QtQuick.Controls 2.3
import QtQuick.Window 2.2
import QtGraphicalEffects 1.0
import org.kde.kirigami 2.5 as Kirigami
import org.kde.elisa 1.0
FocusScope {
......@@ -60,7 +61,7 @@ FocusScope {
text: mainLabel.text
}
property int singleLineHeight: elisaTheme.layoutVerticalMargin * 2 + mainLabelSize.height
property int singleLineHeight: 3 * Kirigami.Units.smallSpacing + mainLabelSize.height
height: singleLineHeight + (detailedView ? mainLabelSize.height : 0)
Rectangle {
......@@ -129,13 +130,13 @@ FocusScope {
Layout.fillWidth: true
Layout.leftMargin: {
if (!LayoutMirroring.enabled)
return (!hideDiscNumber ? elisaTheme.layoutHorizontalMargin * 4 : elisaTheme.layoutHorizontalMargin)
return (!hideDiscNumber ? Kirigami.Units.largeSpacing * 4 : Kirigami.Units.largeSpacing)
else
return 0
}
Layout.rightMargin: {
if (LayoutMirroring.enabled)
return (!hideDiscNumber ? elisaTheme.layoutHorizontalMargin * 4 : elisaTheme.layoutHorizontalMargin)
return (!hideDiscNumber ? Kirigami.Units.largeSpacing * 4 : Kirigami.Units.largeSpacing)
else
return 0
}
......@@ -144,17 +145,17 @@ FocusScope {
ImageWithFallback {
id: coverImageElement
Layout.preferredHeight: mediaTrack.height - elisaTheme.layoutVerticalMargin
Layout.preferredWidth: mediaTrack.height - elisaTheme.layoutVerticalMargin
Layout.leftMargin: !LayoutMirroring.enabled ? elisaTheme.layoutVerticalMargin : 0
Layout.rightMargin: LayoutMirroring.enabled ? elisaTheme.layoutVerticalMargin : 0
Layout.preferredHeight: mediaTrack.height - Kirigami.Units.smallSpacing
Layout.preferredWidth: mediaTrack.height - Kirigami.Units.smallSpacing
Layout.leftMargin: !LayoutMirroring.enabled ? Kirigami.Units.smallSpacing : 0
Layout.rightMargin: LayoutMirroring.enabled ? Kirigami.Units.smallSpacing : 0
Layout.alignment: Qt.AlignCenter
visible: detailedView
sourceSize.width: mediaTrack.height - elisaTheme.layoutVerticalMargin
sourceSize.height: mediaTrack.height - elisaTheme.layoutVerticalMargin
sourceSize.width: mediaTrack.height - Kirigami.Units.smallSpacing
sourceSize.height: mediaTrack.height - Kirigami.Units.smallSpacing
fillMode: Image.PreserveAspectFit
smooth: true
......@@ -204,10 +205,10 @@ FocusScope {
color: myPalette.text
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
Layout.leftMargin: !LayoutMirroring.enabled ? elisaTheme.layoutHorizontalMargin : 0
Layout.rightMargin: LayoutMirroring.enabled ? elisaTheme.layoutHorizontalMargin : 0
Layout.leftMargin: !LayoutMirroring.enabled ? Kirigami.Units.largeSpacing : 0
Layout.rightMargin: LayoutMirroring.enabled ? Kirigami.Units.largeSpacing : 0
Layout.fillWidth: true
Layout.topMargin: elisaTheme.layoutVerticalMargin / 2
Layout.topMargin: Kirigami.Units.smallSpacing / 2
elide: Text.ElideRight
}
......@@ -238,10 +239,10 @@ FocusScope {
color: myPalette.text
Layout.alignment: Qt.AlignLeft | Qt.AlignBottom
Layout.leftMargin: !LayoutMirroring.enabled ? elisaTheme.layoutHorizontalMargin : 0
Layout.rightMargin: LayoutMirroring.enabled ? elisaTheme.layoutHorizontalMargin : 0
Layout.leftMargin: !LayoutMirroring.enabled ? Kirigami.Units.largeSpacing : 0
Layout.rightMargin: LayoutMirroring.enabled ? Kirigami.Units.largeSpacing : 0
Layout.fillWidth: true
Layout.bottomMargin: elisaTheme.layoutVerticalMargin / 2
Layout.bottomMargin: Kirigami.Units.smallSpacing / 2
elide: Text.ElideRight
}
......@@ -299,8 +300,8 @@ FocusScope {
starRating: rating
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
Layout.leftMargin: elisaTheme.layoutHorizontalMargin
Layout.rightMargin: elisaTheme.layoutHorizontalMargin
Layout.leftMargin: Kirigami.Units.largeSpacing
Layout.rightMargin: Kirigami.Units.largeSpacing
}
LabelWithToolTip {
......@@ -314,8 +315,8 @@ FocusScope {
horizontalAlignment: Text.AlignRight
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
Layout.rightMargin: !LayoutMirroring.enabled ? elisaTheme.layoutHorizontalMargin : 0
Layout.leftMargin: LayoutMirroring.enabled ? elisaTheme.layoutHorizontalMargin : 0
Layout.rightMargin: !LayoutMirroring.enabled ? Kirigami.Units.largeSpacing : 0
Layout.leftMargin: LayoutMirroring.enabled ? Kirigami.Units.largeSpacing : 0
}
}
}
......
......@@ -219,8 +219,8 @@ FocusScope {
visible: emptyVisible.visible
Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter
Layout.rightMargin: elisaTheme.layoutHorizontalMargin
Layout.leftMargin: elisaTheme.layoutHorizontalMargin
Layout.rightMargin: Kirigami.Units.largeSpacing
Layout.leftMargin: Kirigami.Units.largeSpacing
level: 1
wrapMode: Text.WordWrap
......@@ -232,11 +232,11 @@ FocusScope {
Label {
id: emptyLabel1
visible: emptyVisible.visible
Layout.topMargin: 5
Layout.topMargin: Kirigami.Units.largeSpacing
Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter
Layout.rightMargin: elisaTheme.layoutHorizontalMargin
Layout.leftMargin: elisaTheme.layoutHorizontalMargin
Layout.rightMargin: Kirigami.Units.largeSpacing
Layout.leftMargin: Kirigami.Units.largeSpacing
wrapMode: Text.WordWrap
......@@ -283,10 +283,10 @@ FocusScope {
type: Kirigami.MessageType.Information
showCloseButton: true
Layout.topMargin: 5
Layout.topMargin: Kirigami.Units.largeSpacing
Layout.fillWidth: true
Layout.rightMargin: elisaTheme.layoutHorizontalMargin
Layout.leftMargin: elisaTheme.layoutHorizontalMargin
Layout.rightMargin: Kirigami.Units.largeSpacing
Layout.leftMargin: Kirigami.Units.largeSpacing
onVisibleChanged:
{
......
......@@ -19,6 +19,7 @@ import QtQuick 2.7
import QtQuick.Layouts 1.2
import QtGraphicalEffects 1.0
import QtQuick.Controls 2.3
import org.kde.kirigami 2.5 as Kirigami
import org.kde.elisa 1.0
FocusScope {
......@@ -113,8 +114,8 @@ FocusScope {
Layout.alignment: Qt.AlignVCenter
Layout.fillHeight: true
Layout.rightMargin: !LayoutMirroring.enabled ? elisaTheme.layoutHorizontalMargin : elisaTheme.layoutHorizontalMargin * 2
Layout.leftMargin: LayoutMirroring.enabled ? elisaTheme.layoutHorizontalMargin : elisaTheme.layoutHorizontalMargin * 2
Layout.rightMargin: !LayoutMirroring.enabled ? Kirigami.Units.largeSpacing : Kirigami.Units.largeSpacing * 2
Layout.leftMargin: LayoutMirroring.enabled ? Kirigami.Units.largeSpacing : Kirigami.Units.largeSpacing * 2
Layout.preferredWidth: (durationTextMetrics.boundingRect.width - durationTextMetrics.boundingRect.x) + 5
verticalAlignment: Text.AlignVCenter
......@@ -131,8 +132,8 @@ FocusScope {
Layout.alignment: Qt.AlignVCenter
Layout.fillHeight: true
Layout.fillWidth: true
Layout.rightMargin: !LayoutMirroring.enabled ? elisaTheme.layoutHorizontalMargin : 0
Layout.leftMargin: LayoutMirroring.enabled ? elisaTheme.layoutHorizontalMargin : 0
Layout.rightMargin: !LayoutMirroring.enabled ? Kirigami.Units.largeSpacing : 0
Layout.leftMargin: LayoutMirroring.enabled ? Kirigami.Units.largeSpacing : 0
acceptedButtons: Qt.NoButton
onWheel: {
......@@ -230,8 +231,8 @@ FocusScope {
Layout.alignment: Qt.AlignVCenter
Layout.fillHeight: true
Layout.rightMargin: !LayoutMirroring.enabled ? (elisaTheme.layoutHorizontalMargin * 2) : 0
Layout.leftMargin: LayoutMirroring.enabled ? (elisaTheme.layoutHorizontalMargin * 2) : 0
Layout.rightMargin: !LayoutMirroring.enabled ? (Kirigami.Units.largeSpacing* 2) : 0
Layout.leftMargin: LayoutMirroring.enabled ? (Kirigami.Units.largeSpacing* 2) : 0
Layout.preferredWidth: (durationTextMetrics.boundingRect.width - durationTextMetrics.boundingRect.x)
verticalAlignment: Text.AlignVCenter
......
......@@ -63,9 +63,9 @@ Window {
ColumnLayout {
anchors.fill: parent
anchors.margins: elisaTheme.layoutVerticalMargin
anchors.margins: Kirigami.Units.smallSpacing
spacing: elisaTheme.layoutVerticalMargin
spacing: Kirigami.Units.smallSpacing
RowLayout {
id: metadataView
......@@ -100,7 +100,7 @@ Window {
Layout.fillWidth: true
Layout.fillHeight: true
Layout.leftMargin: 2 * elisaTheme.layoutHorizontalMargin
Layout.leftMargin: 2 * Kirigami.Units.largeSpacing
focus: true
......@@ -141,10 +141,10 @@ Window {
id: fileNameRow
Layout.alignment: Qt.AlignLeft | Qt.AlignBottom
Layout.topMargin: elisaTheme.layoutVerticalMargin
Layout.bottomMargin: elisaTheme.layoutVerticalMargin
Layout.topMargin: Kirigami.Units.smallSpacing
Layout.bottomMargin: Kirigami.Units.smallSpacing
spacing: elisaTheme.layoutHorizontalMargin
spacing: Kirigami.Units.largeSpacing
Image {
Layout.preferredWidth: fileNameLabel.height
......@@ -177,12 +177,12 @@ Window {
Layout.topMargin: 5
Layout.fillWidth: true
Layout.rightMargin: elisaTheme.layoutHorizontalMargin
Layout.leftMargin: elisaTheme.layoutHorizontalMargin
Layout.rightMargin: Kirigami.Units.largeSpacing
Layout.leftMargin: Kirigami.Units.largeSpacing
}
RowLayout {
spacing: elisaTheme.layoutVerticalMargin
spacing: Kirigami.Units.smallSpacing
DialogButtonBox {
id: deleteButtonBox
......
......@@ -18,14 +18,14 @@
import QtQuick 2.10
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.2
import org.kde.kirigami 2.5 as Kirigami
import org.kde.elisa 1.0
RowLayout {
id: delegateRow
spacing: 0
height: (model.type === EditableTrackMetadataModel.LongTextEntry ? longTextDisplayLoader.height : (metaDataLabelMetric.boundingRect.height + elisaTheme.layoutVerticalMargin / 2))
height: (model.type === EditableTrackMetadataModel.LongTextEntry ? longTextDisplayLoader.height : (metaDataLabelMetric.boundingRect.height + Kirigami.Units.smallSpacing / 2))
TextMetrics {