make notif empty placeholder icon wrapped

This commit is contained in:
end-4
2025-10-29 11:24:20 +01:00
parent 05f3e52f55
commit 4ad001fd9e
2 changed files with 11 additions and 32 deletions
@@ -0,0 +1,58 @@
import QtQuick
import QtQuick.Layouts
import qs.modules.common
import qs.modules.common.widgets
Item {
id: root
property bool shown: true
property alias icon: shapeWidget.text
property alias title: widgetNameText.text
property alias description: widgetDescriptionText.text
property alias shape: shapeWidget.shape
property alias descriptionHorizontalAlignment: widgetDescriptionText.horizontalAlignment
opacity: shown ? 1 : 0
visible: opacity > 0
anchors {
fill: parent
topMargin: -30 * (1 - opacity)
bottomMargin: 30 * (1 - opacity)
}
Behavior on opacity {
animation: Appearance.animation.elementMoveEnter.numberAnimation.createObject(this)
}
ColumnLayout {
anchors.centerIn: parent
spacing: 5
MaterialShapeWrappedMaterialSymbol {
id: shapeWidget
Layout.alignment: Qt.AlignHCenter
padding: 12
iconSize: 56
rotation: -60 * (1 - root.opacity)
}
StyledText {
id: widgetNameText
visible: title !== ""
Layout.alignment: Qt.AlignHCenter
font.pixelSize: Appearance.font.pixelSize.larger
font.family: Appearance.font.family.title
color: Appearance.m3colors.m3outline
horizontalAlignment: Text.AlignHCenter
}
StyledText {
id: widgetDescriptionText
visible: description !== ""
Layout.fillWidth: true
font.pixelSize: Appearance.font.pixelSize.small
color: Appearance.m3colors.m3outline
horizontalAlignment: Text.AlignLeft
wrapMode: Text.Wrap
}
}
}