import QtQuick import QtQuick.Layouts import qs.Components import qs.Modules import qs.Helpers import qs.Config CustomRect { id: root property int countUpdates: Updates.availableUpdates required property bool horizontal property color textColor: DynamicColors.palette.m3onSurface anchors.fill: parent color: DynamicColors.tPalette.m3surfaceContainer implicitHeight: horizontal ? Config.bar.height + Appearance.padding.smallest * 2 : content.implicitHeight + Appearance.spacing.small * 2 implicitWidth: horizontal ? content.implicitWidth + Appearance.spacing.small * 2 : Config.bar.height radius: Appearance.rounding.full GridLayout { id: content anchors.centerIn: parent columnSpacing: Appearance.spacing.small columns: root.horizontal ? -1 : 1 MaterialIcon { Layout.alignment: root.horizontal ? Qt.AlignVCenter : Qt.AlignHCenter font.pointSize: root.horizontal ? Appearance.font.size.larger : Appearance.font.size.large text: "package_2" } CustomText { Layout.alignment: root.horizontal ? Qt.AlignVCenter : Qt.AlignHCenter color: root.textColor font.pointSize: root.horizontal ? Appearance.font.size.normal : Appearance.font.size.larger text: root.countUpdates } } }