Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 45130497 authored by Marco Martin's avatar Marco Martin

allow word wrap in intro icons

also reduce icon sizes when needed
BUG:380972
parent d69ca2e8
......@@ -18,31 +18,39 @@
import QtQuick 2.1
import QtQuick.Layouts 1.1
import QtQuick.Controls 2.0 as QQC2
import org.kde.kirigami 2.1 as Kirigami
MouseArea {
id: root
property alias icon: iconItem.source
property alias text: label.text
property string module
implicitWidth: column.implicitWidth
implicitHeight: column.implicitHeight
property int iconSize: Kirigami.Units.iconSizes.huge
Layout.minimumWidth: Kirigami.Units.iconSizes.large
Layout.minimumHeight: column.implicitHeight
cursorShape: Qt.PointingHandCursor
Layout.fillWidth: true
Layout.alignment: Qt.AlignTop
onClicked: systemsettings.loadMostUsed(index);
ColumnLayout {
id: column
anchors.centerIn: parent
width: parent.width
Kirigami.Icon {
id: iconItem
Layout.alignment: Qt.AlignHCenter
width: Kirigami.Units.iconSizes.huge
Layout.minimumWidth: root.iconSize
Layout.minimumHeight: height
height: width
}
Kirigami.Label {
Layout.alignment: Qt.AlignHCenter
QQC2.Label {
id: label
Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter
horizontalAlignment: Text.AlignHCenter
wrapMode: Text.WordWrap
}
}
Accessible.role: Accessible.Button
......
......@@ -59,6 +59,7 @@ Rectangle {
text: i18n("Frequently used:")
}
RowLayout {
id: iconsRow
Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter
spacing: Kirigami.Units.largeSpacing
......@@ -68,6 +69,8 @@ Rectangle {
delegate: IntroIcon {
icon: model.decoration
text: model.display
iconSize: (iconsRow.width - iconsRow.spacing * 4) / 5 >= Kirigami.Units.iconSizes.huge ? Kirigami.Units.iconSizes.huge : Kirigami.Units.iconSizes.large
}
}
}
......
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