left-bar working, bottom bar semi-broken
This commit is contained in:
@@ -9,27 +9,32 @@ 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: Config.bar.height + Appearance.padding.smallest * 2
|
||||
implicitWidth: contentRow.implicitWidth + Appearance.spacing.small * 2
|
||||
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
|
||||
|
||||
RowLayout {
|
||||
id: contentRow
|
||||
GridLayout {
|
||||
id: content
|
||||
|
||||
anchors.centerIn: parent
|
||||
spacing: Appearance.spacing.small
|
||||
columnSpacing: Appearance.spacing.small
|
||||
columns: root.horizontal ? -1 : 1
|
||||
|
||||
MaterialIcon {
|
||||
font.pointSize: Appearance.font.size.larger
|
||||
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: Appearance.font.size.normal
|
||||
font.pointSize: root.horizontal ? Appearance.font.size.normal : Appearance.font.size.larger
|
||||
text: root.countUpdates
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user