Commit 71069394 authored by Nate Graham's avatar Nate Graham 🔩
Browse files

Adopt Kirigami Headings throughout

parent e8d8e312
......@@ -40,7 +40,6 @@ FocusScope {
id: elisaTheme
property int layoutHorizontalMargin: 8
property int layoutVerticalMargin: 6
property int defaultFontPointSize: 12
property int filterClearButtonMargin: layoutVerticalMargin
property int ratingStarSize: 15
property int navigationBarHeight: 100
......
......@@ -44,29 +44,26 @@ Item {
property int delegateHeight: 28
// FIXME: don't hardcode these; derive them from the layouts they're used in
FontMetrics {
id: playListAuthorTextHeight
font.weight: Font.Light
}
FontMetrics {
id: playListAlbumTextHeight
font.weight: Font.Bold
font.pointSize: Math.round(elisaTheme.defaultFontPointSize * 1.4)
font.pointSize: Math.round(fontSize.font.pointSize * 1.4)
}
FontMetrics {
id: playListTrackTextHeight
font.weight: Font.Bold
}
property int playListDelegateHeight: (playListTrackTextHeight.height > 28) ? playListTrackTextHeight.height : 28
property int playListHeaderHeight: elisaTheme.layoutVerticalMargin * 5 +
playListAuthorTextHeight.height +
playListAlbumTextHeight.height
property int trackDelegateHeight: elisaTheme.layoutVerticalMargin + fontSize.height * 2
// END FIXME
property int coverImageSize: 180
property int contextCoverImageSize: 100
......@@ -101,10 +98,6 @@ Item {
property int filterClearButtonMargin: layoutVerticalMargin
property alias defaultFontPointSize: fontSize.font.pointSize
property int headerTitleFontSize: defaultFontPointSize * 2
property int headerToolbarHeight: 48
property int footerToolbarHeight: 30
......
......@@ -90,8 +90,8 @@ RowLayout {
text: album
level: 2
font.weight: Font.Bold
font.pointSize: Math.round(elisaTheme.defaultFontPointSize * 1.4)
horizontalAlignment: Text.AlignLeft
......
......@@ -82,7 +82,7 @@ FocusScope {
text: i18nc("Title of the context view related to the currently playing track", "Now Playing")
font.pointSize: elisaTheme.headerTitleFontSize
level: 1
}
]
}
......@@ -131,8 +131,7 @@ FocusScope {
LabelWithToolTip {
id: titleLabel
font.pointSize: elisaTheme.headerTitleFontSize
font.weight: Font.Bold
level: 1
horizontalAlignment: Label.AlignHCenter
......@@ -155,7 +154,9 @@ FocusScope {
}
}
font.pointSize: Math.round(elisaTheme.defaultFontPointSize * 1.4)
level: 3
opacity: 0.6
horizontalAlignment: Label.AlignHCenter
visible: artistName !== '' && albumName !== ''
......
......@@ -308,6 +308,8 @@ FocusScope {
LabelWithToolTip {
id: mainLabel
level: 4
color: myPalette.text
// FIXME: Center-aligned text looks better overall, but
......
......@@ -225,7 +225,7 @@ FocusScope {
// background, so we don't want to use a color scheme color that
// might also be dark
color: "white"
font.pointSize: Math.round(elisaTheme.defaultFontPointSize * 2.5)
level: 1
font.bold: true
Layout.bottomMargin: albumLabel.height * 0.5
......@@ -250,7 +250,7 @@ FocusScope {
// background, so we don't want to use a color scheme color that
// might also be dark
color: "white"
font.pointSize: Math.round(elisaTheme.defaultFontPointSize * 1.5)
level: 3
MouseArea {
id: authorMouseArea
......@@ -272,8 +272,7 @@ FocusScope {
// background, so we don't want to use a color scheme color that
// might also be dark
color: "white"
font.weight: Font.Light
font.pointSize: elisaTheme.defaultFontPointSize
level: 3
MouseArea {
id: albumMouseArea
......
......@@ -19,10 +19,13 @@ import QtQuick 2.7
import QtQuick.Controls 2.2
import QtGraphicalEffects 1.0
import QtQuick.Window 2.2
import org.kde.kirigami 2.5 as Kirigami
Label {
Kirigami.Heading {
id: theLabel
level: 5
horizontalAlignment: Text.AlignLeft
elide: Text.ElideRight
......
......@@ -202,6 +202,8 @@ FocusScope {
LabelWithToolTip {
id: mainLabelDetailed
level: 4
text: {
if (trackNumber >= 0) {
return i18nc("%1: track number. %2: track title", "%1 - %2",
......
......@@ -183,7 +183,7 @@ FocusScope {
text: i18nc("Title of the view of the playlist", "Playlist")
font.pointSize: elisaTheme.headerTitleFontSize
level: 1
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
},
......@@ -246,7 +246,7 @@ FocusScope {
}
}
Label {
LabelWithToolTip {
id: emptyLabel0
visible: emptyVisible.visible
Layout.fillWidth: true
......@@ -254,7 +254,7 @@ FocusScope {
Layout.rightMargin: elisaTheme.layoutHorizontalMargin
Layout.leftMargin: elisaTheme.layoutHorizontalMargin
font.pointSize: elisaTheme.headerTitleFontSize
level: 1
wrapMode: Text.WordWrap
horizontalAlignment: Text.AlignHCenter
......
......@@ -151,9 +151,7 @@ ColumnLayout {
Layout.fillWidth: true
text: mainTitle
font.pointSize: authorLabel.visible ?
Math.round(elisaTheme.defaultFontPointSize * 1.2) :
elisaTheme.headerTitleFontSize
level: authorLabel.visible ? 4 : 1
font.weight: authorLabel.visible ? Font.Bold : Font.Normal
elide: Text.ElideRight
}
......@@ -164,7 +162,6 @@ ColumnLayout {
Layout.fillWidth: true
text: secondaryTitle
font.pointSize: elisaTheme.defaultFontPointSize
elide: Text.ElideRight
visible: secondaryTitle !== ""
......
......@@ -320,7 +320,6 @@ FocusScope {
text: title
font.weight: Font.Normal
color: simpleMode ? myPalette.highlightedText : myPalette.text
Layout.fillWidth: true
......
......@@ -127,8 +127,6 @@ FocusScope {
anchors.rightMargin: elisaTheme.layoutHorizontalMargin
verticalAlignment: "AlignVCenter"
font.pointSize: Math.round(elisaTheme.defaultFontPointSize * 1.1)
text: model.display
elide: Text.ElideRight
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment