Files
z-bar-qt/Modules/Updates/UpdatesWidget.qml
T
zach ef8811724f
C++ / fmt (pull_request) Successful in 3s
JS/TS / fmt (pull_request) Successful in 14s
JS/TS / lint (pull_request) Successful in 19s
Python / lint (pull_request) Successful in 30s
Python / fmt (pull_request) Successful in 34s
Python / test (pull_request) Successful in 1m0s
Python / typecheck (pull_request) Failing after 1m18s
C++ / build (pull_request) Successful in 1m49s
Rust / fmt (pull_request) Successful in 33s
Rust / build (pull_request) Successful in 1m33s
Rust / clippy (pull_request) Successful in 1m17s
Python / buildcheck (pull_request) Successful in 2m40s
C++ / clang-tidy (pull_request) Successful in 3m25s
better height/width for bar
2026-08-14 18:03:56 +02:00

41 lines
1.1 KiB
QML

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
color: DynamicColors.tPalette.m3surfaceContainer
implicitHeight: horizontal ? Config.bar.height : 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
}
}
}