mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 15:03:09 +00:00
homescreens/halcyon: Cap grid icon size relative to app name labels
Prevents them from getting overly large in comparison to their labels
This commit is contained in:
parent
f85df674f1
commit
8dd2ac8dd6
1 changed files with 13 additions and 4 deletions
|
|
@ -127,15 +127,19 @@ MouseArea {
|
||||||
}
|
}
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
||||||
PlasmaCore.IconItem {
|
// Use Kirigami.Icon to have better icon dimension options
|
||||||
|
Kirigami.Icon {
|
||||||
id: icon
|
id: icon
|
||||||
|
|
||||||
|
Kirigami.Theme.inherit: false
|
||||||
|
Kirigami.Theme.colorSet: Kirigami.Theme.Complementary
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
|
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.minimumHeight: Math.floor(parent.height - delegate.reservedSpaceForLabel)
|
Layout.preferredHeight: Math.floor(parent.height - delegate.reservedSpaceForLabel)
|
||||||
Layout.preferredHeight: Layout.minimumHeight
|
Layout.maximumHeight: labelFontMetrics.height * 7
|
||||||
|
Layout.topMargin: Math.max(0, Layout.preferredHeight - height)
|
||||||
|
|
||||||
usesPlasmaTheme: false
|
|
||||||
source: application.icon
|
source: application.icon
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
|
@ -157,6 +161,11 @@ MouseArea {
|
||||||
color: Qt.rgba(0, 0, 0, 0.3)
|
color: Qt.rgba(0, 0, 0, 0.3)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FontMetrics {
|
||||||
|
id: labelFontMetrics
|
||||||
|
font: label.font
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PlasmaComponents.Label {
|
PlasmaComponents.Label {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue