better height/width for bar
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

This commit is contained in:
2026-08-14 18:03:56 +02:00
parent 4517e5ecd0
commit ef8811724f
13 changed files with 22 additions and 47 deletions
-1
View File
@@ -169,7 +169,6 @@ Item {
Dashboard.Wrapper { Dashboard.Wrapper {
id: dashboard id: dashboard
anchors.right: parent.right
horizontal: root.geometry.horizontal horizontal: root.geometry.horizontal
offsetScale: dashboardWrapper.offsetScale offsetScale: dashboardWrapper.offsetScale
visibilities: root.visibilities visibilities: root.visibilities
+2 -20
View File
@@ -92,8 +92,6 @@ GridLayout {
roleValue: "hyprsunset" roleValue: "hyprsunset"
delegate: EntryWrapper { delegate: EntryWrapper {
Layout.fillWidth: !root.horizontal
HyprsunsetWidget { HyprsunsetWidget {
horizontal: root.horizontal horizontal: root.horizontal
visible: !root.fullscreen visible: !root.fullscreen
@@ -126,8 +124,6 @@ GridLayout {
roleValue: "tray" roleValue: "tray"
delegate: EntryWrapper { delegate: EntryWrapper {
Layout.fillWidth: !root.horizontal
TrayIcons { TrayIcons {
horizontal: root.horizontal horizontal: root.horizontal
loader: root loader: root
@@ -141,8 +137,6 @@ GridLayout {
roleValue: "statusIcons" roleValue: "statusIcons"
delegate: EntryWrapper { delegate: EntryWrapper {
Layout.fillWidth: !root.horizontal
StatusIcons { StatusIcons {
horizontal: root.horizontal horizontal: root.horizontal
} }
@@ -153,8 +147,6 @@ GridLayout {
roleValue: "resources" roleValue: "resources"
delegate: EntryWrapper { delegate: EntryWrapper {
Layout.fillWidth: !root.horizontal
Resources { Resources {
horizontal: root.horizontal horizontal: root.horizontal
visibilities: root.visibilities visibilities: root.visibilities
@@ -167,8 +159,6 @@ GridLayout {
roleValue: "updates" roleValue: "updates"
delegate: EntryWrapper { delegate: EntryWrapper {
Layout.fillWidth: !root.horizontal
UpdatesWidget { UpdatesWidget {
horizontal: root.horizontal horizontal: root.horizontal
visible: !root.fullscreen visible: !root.fullscreen
@@ -180,8 +170,6 @@ GridLayout {
roleValue: "notifBell" roleValue: "notifBell"
delegate: EntryWrapper { delegate: EntryWrapper {
Layout.fillWidth: !root.horizontal
NotifBell { NotifBell {
horizontal: root.horizontal horizontal: root.horizontal
popouts: root.popouts popouts: root.popouts
@@ -195,8 +183,6 @@ GridLayout {
roleValue: "clock" roleValue: "clock"
delegate: EntryWrapper { delegate: EntryWrapper {
Layout.fillWidth: !root.horizontal
Clock { Clock {
horizontal: root.horizontal horizontal: root.horizontal
loader: root loader: root
@@ -211,8 +197,6 @@ GridLayout {
roleValue: "activeWindow" roleValue: "activeWindow"
delegate: EntryWrapper { delegate: EntryWrapper {
Layout.fillWidth: !root.horizontal
WindowTitle { WindowTitle {
bar: root bar: root
horizontal: root.horizontal horizontal: root.horizontal
@@ -234,8 +218,6 @@ GridLayout {
roleValue: "media" roleValue: "media"
delegate: EntryWrapper { delegate: EntryWrapper {
Layout.fillWidth: !root.horizontal
MediaWidget { MediaWidget {
horizontal: root.horizontal horizontal: root.horizontal
visible: !root.fullscreen visible: !root.fullscreen
@@ -253,8 +235,8 @@ GridLayout {
Layout.alignment: root.horizontal ? Qt.AlignVCenter : Qt.AlignHCenter Layout.alignment: root.horizontal ? Qt.AlignVCenter : Qt.AlignHCenter
Layout.bottomMargin: !root.horizontal && index === repeater.count - 1 ? root.vPadding : 0 Layout.bottomMargin: !root.horizontal && index === repeater.count - 1 ? root.vPadding : 0
Layout.leftMargin: root.horizontal && index === 0 ? root.vPadding : (entryId === "statusIcons" && root.horizontal) ? -root.rowSpacing + Appearance.spacing.extraSmall : root.horizontal ? 0 : Appearance.padding.smaller Layout.leftMargin: root.horizontal && index === 0 ? root.vPadding : (entryId === "statusIcons" && root.horizontal) ? -root.rowSpacing + Appearance.spacing.extraSmall : 0
Layout.rightMargin: root.horizontal && index === repeater.count - 1 ? root.vPadding : root.horizontal ? 0 : Appearance.padding.smaller Layout.rightMargin: root.horizontal && index === repeater.count - 1 ? root.vPadding : 0
Layout.topMargin: !root.horizontal && index === 0 ? root.vPadding : (entryId === "statusIcons" && !root.horizontal) ? -root.columnSpacing + Appearance.spacing.extraSmall : 0 Layout.topMargin: !root.horizontal && index === 0 ? root.vPadding : (entryId === "statusIcons" && !root.horizontal) ? -root.columnSpacing + Appearance.spacing.extraSmall : 0
children: item children: item
implicitHeight: item?.implicitHeight ?? 0 implicitHeight: item?.implicitHeight ?? 0
+2 -2
View File
@@ -10,13 +10,13 @@ Item {
id: root id: root
readonly property int clampedExtent: Math.max(Config.bar.border, extent) readonly property int clampedExtent: Math.max(Config.bar.border, extent)
readonly property int contentThickness: Math.max(Config.bar.height, (horizontal ? 24 : 30)) + padding * 2 readonly property int contentThickness: Math.max(Config.bar.height, 30) + padding * 2
readonly property int exclusiveZone: Config.bar.autoHide ? Config.bar.border : contentThickness readonly property int exclusiveZone: Config.bar.autoHide ? Config.bar.border : contentThickness
property real extent: fullscreen ? 0 : Config.bar.border property real extent: fullscreen ? 0 : Config.bar.border
required property bool fullscreen required property bool fullscreen
readonly property bool horizontal: position !== "left" readonly property bool horizontal: position !== "left"
property bool isHovered property bool isHovered
readonly property int padding: horizontal ? Math.max(Appearance.padding.smaller, Config.bar.border) : Math.max(Appearance.padding.larger, Config.bar.border) readonly property int padding: Appearance.padding.smaller
required property Wrapper popouts required property Wrapper popouts
required property ClipWrapper popoutsWrapper required property ClipWrapper popoutsWrapper
required property string position required property string position
+1 -2
View File
@@ -12,11 +12,10 @@ CustomRect {
required property bool horizontal required property bool horizontal
required property GridLayout loader required property GridLayout loader
required property Wrapper popouts required property Wrapper popouts
readonly property real shortSize: Config.bar.height + Appearance.padding.smallest * 2 readonly property real shortSize: Config.bar.height
readonly property real size: timeText.contentWidth + (horizontal ? Appearance.padding.normal : Appearance.padding.larger) * 2 readonly property real size: timeText.contentWidth + (horizontal ? Appearance.padding.normal : Appearance.padding.larger) * 2
required property PersistentProperties visibilities required property PersistentProperties visibilities
anchors.fill: parent
color: visibilities.dashboard ? DynamicColors.palette.m3primary : DynamicColors.tPalette.m3surfaceContainer color: visibilities.dashboard ? DynamicColors.palette.m3primary : DynamicColors.tPalette.m3surfaceContainer
implicitHeight: horizontal ? shortSize : size implicitHeight: horizontal ? shortSize : size
implicitWidth: horizontal ? size : shortSize implicitWidth: horizontal ? size : shortSize
+4 -2
View File
@@ -33,8 +33,10 @@ Item {
id: content id: content
active: root.shouldBeActive || root.visible active: root.shouldBeActive || root.visible
anchors.bottom: parent.bottom anchors.bottom: root.horizontal ? parent.bottom : undefined
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: root.horizontal ? parent.horizontalCenter : undefined
anchors.right: root.horizontal ? undefined : parent.right
anchors.verticalCenter: root.horizontal ? undefined : parent.verticalCenter
sourceComponent: Content { sourceComponent: Content {
dashState: root.dashState dashState: root.dashState
+2 -3
View File
@@ -9,10 +9,9 @@ CustomRect {
required property bool horizontal required property bool horizontal
property bool tempEnabled: Hyprsunset.enabled property bool tempEnabled: Hyprsunset.enabled
anchors.fill: parent
color: root.tempEnabled ? DynamicColors.palette.m3primary : DynamicColors.tPalette.m3surfaceContainer color: root.tempEnabled ? DynamicColors.palette.m3primary : DynamicColors.tPalette.m3surfaceContainer
implicitHeight: horizontal ? Config.bar.height + Appearance.padding.smallest * 2 : width implicitHeight: horizontal ? Config.bar.height : width
implicitWidth: horizontal ? height : Config.bar.height + Appearance.padding.smallest * 2 implicitWidth: horizontal ? height : Config.bar.height
radius: Appearance.rounding.full radius: Appearance.rounding.full
StateLayer { StateLayer {
+2 -3
View File
@@ -12,10 +12,9 @@ CustomRect {
required property bool horizontal required property bool horizontal
readonly property int textWidth: Math.min(metrics.width, 200) readonly property int textWidth: Math.min(metrics.width, 200)
anchors.fill: parent
color: DynamicColors.tPalette.m3surfaceContainer color: DynamicColors.tPalette.m3surfaceContainer
implicitHeight: horizontal ? Config.bar.height + Appearance.padding.smallest * 2 : layout.implicitHeight + Appearance.padding.normal * 2 implicitHeight: horizontal ? Config.bar.height : layout.implicitHeight + Appearance.padding.normal * 2
implicitWidth: horizontal ? layout.implicitWidth + Appearance.padding.normal * 2 : Config.bar.height + Appearance.padding.smallest implicitWidth: horizontal ? layout.implicitWidth + Appearance.padding.normal * 2 : Config.bar.height
radius: Appearance.rounding.full radius: Appearance.rounding.full
Behavior on implicitWidth { Behavior on implicitWidth {
+2 -3
View File
@@ -11,10 +11,9 @@ CustomRect {
required property Wrapper popouts required property Wrapper popouts
required property PersistentProperties visibilities required property PersistentProperties visibilities
anchors.fill: parent
color: visibilities.sidebar ? DynamicColors.palette.m3primary : DynamicColors.tPalette.m3surfaceContainer color: visibilities.sidebar ? DynamicColors.palette.m3primary : DynamicColors.tPalette.m3surfaceContainer
implicitHeight: horizontal ? Config.bar.height + Appearance.padding.smallest * 2 : width implicitHeight: horizontal ? Config.bar.height : width
implicitWidth: horizontal ? height : Config.bar.height + Appearance.padding.smallest * 2 implicitWidth: horizontal ? height : Config.bar.height
radius: Appearance.rounding.full radius: Appearance.rounding.full
MaterialIcon { MaterialIcon {
+1 -2
View File
@@ -15,10 +15,9 @@ CustomRect {
required property bool horizontal required property bool horizontal
required property PersistentProperties visibilities required property PersistentProperties visibilities
anchors.fill: parent
clip: true clip: true
color: visibilities.resources ? DynamicColors.palette.m3primary : DynamicColors.tPalette.m3surfaceContainer color: visibilities.resources ? DynamicColors.palette.m3primary : DynamicColors.tPalette.m3surfaceContainer
implicitHeight: horizontal ? Config.bar.height + Appearance.padding.smallest * 2 : gridLayout.implicitHeight + Appearance.padding.normal * 2 implicitHeight: horizontal ? Math.max(Config.bar.height, 24) : gridLayout.implicitHeight + Appearance.padding.normal * 2
implicitWidth: horizontal ? gridLayout.implicitWidth + Appearance.padding.larger * 2 : Config.bar.height implicitWidth: horizontal ? gridLayout.implicitWidth + Appearance.padding.larger * 2 : Config.bar.height
radius: Appearance.rounding.full radius: Appearance.rounding.full
+1 -2
View File
@@ -29,7 +29,7 @@ CustomClippingRect {
return i; return i;
return -1; return -1;
} }
readonly property real shortSize: Config.bar.height + Appearance.padding.smallest * 2 readonly property real shortSize: Config.bar.height
readonly property real size: horizontal ? grid.implicitWidth + Appearance.padding.small * 2 : grid.implicitHeight + Appearance.padding.small * 2 readonly property real size: horizontal ? grid.implicitWidth + Appearance.padding.small * 2 : grid.implicitHeight + Appearance.padding.small * 2
readonly property int spacing: Appearance.spacing.normal / 2 readonly property int spacing: Appearance.spacing.normal / 2
@@ -40,7 +40,6 @@ CustomClippingRect {
return false; return false;
} }
anchors.fill: parent
bottomLeftRadius: horizontal ? Appearance.rounding.smallest / 2 : Appearance.rounding.full bottomLeftRadius: horizontal ? Appearance.rounding.smallest / 2 : Appearance.rounding.full
color: DynamicColors.tPalette.m3surfaceContainer color: DynamicColors.tPalette.m3surfaceContainer
implicitHeight: horizontal ? shortSize : size implicitHeight: horizontal ? shortSize : size
+1 -2
View File
@@ -17,10 +17,9 @@ CustomClippingRect {
required property GridLayout loader required property GridLayout loader
readonly property int padding: Appearance.padding.small readonly property int padding: Appearance.padding.small
required property Wrapper popouts required property Wrapper popouts
readonly property real shortSize: Config.bar.height + Appearance.padding.smallest * 2 readonly property real shortSize: Config.bar.height
readonly property real size: horizontal ? sysGrid.implicitWidth + Appearance.padding.small : sysGrid.implicitHeight + Appearance.padding.small readonly property real size: horizontal ? sysGrid.implicitWidth + Appearance.padding.small : sysGrid.implicitHeight + Appearance.padding.small
anchors.fill: parent
bottomLeftRadius: horizontal ? Appearance.rounding.full : Appearance.rounding.smallest / 2 bottomLeftRadius: horizontal ? Appearance.rounding.full : Appearance.rounding.smallest / 2
bottomRightRadius: Appearance.rounding.smallest / 2 bottomRightRadius: Appearance.rounding.smallest / 2
color: DynamicColors.tPalette.m3surfaceContainer color: DynamicColors.tPalette.m3surfaceContainer
+1 -2
View File
@@ -12,9 +12,8 @@ CustomRect {
required property bool horizontal required property bool horizontal
property color textColor: DynamicColors.palette.m3onSurface property color textColor: DynamicColors.palette.m3onSurface
anchors.fill: parent
color: DynamicColors.tPalette.m3surfaceContainer color: DynamicColors.tPalette.m3surfaceContainer
implicitHeight: horizontal ? Config.bar.height + Appearance.padding.smallest * 2 : content.implicitHeight + Appearance.spacing.small * 2 implicitHeight: horizontal ? Config.bar.height : content.implicitHeight + Appearance.spacing.small * 2
implicitWidth: horizontal ? content.implicitWidth + Appearance.spacing.small * 2 : Config.bar.height implicitWidth: horizontal ? content.implicitWidth + Appearance.spacing.small * 2 : Config.bar.height
radius: Appearance.rounding.full radius: Appearance.rounding.full
+3 -3
View File
@@ -16,7 +16,7 @@ Item {
required property bool horizontal required property bool horizontal
readonly property HyprlandMonitor monitor: Hyprland.monitorFor(root.screen) readonly property HyprlandMonitor monitor: Hyprland.monitorFor(root.screen)
required property ShellScreen screen required property ShellScreen screen
readonly property real shortSize: Config.bar.height + Appearance.padding.smaller * 2 readonly property real shortSize: Math.max(Config.bar.height, 24)
readonly property real size: (workspaceButtonWidth * workspacesShown) + activeWorkspaceMargin * 2 readonly property real size: (workspaceButtonWidth * workspacesShown) + activeWorkspaceMargin * 2
property int workspaceButtonWidth: (horizontal ? bgRect.implicitHeight : bgRect.implicitWidth) - root.activeWorkspaceMargin * 2 property int workspaceButtonWidth: (horizontal ? bgRect.implicitHeight : bgRect.implicitWidth) - root.activeWorkspaceMargin * 2
property int workspaceIndexInGroup: (effectiveActiveWorkspaceId - 1) % root.workspacesShown property int workspaceIndexInGroup: (effectiveActiveWorkspaceId - 1) % root.workspacesShown
@@ -50,8 +50,8 @@ Item {
anchors.top: root.horizontal ? undefined : parent.top anchors.top: root.horizontal ? undefined : parent.top
anchors.verticalCenter: root.horizontal ? parent.verticalCenter : undefined anchors.verticalCenter: root.horizontal ? parent.verticalCenter : undefined
color: DynamicColors.tPalette.m3surfaceContainer color: DynamicColors.tPalette.m3surfaceContainer
implicitHeight: root.horizontal ? root.implicitHeight - ((Appearance.padding.small - 1) * 2) : 0 implicitHeight: root.horizontal ? root.implicitHeight : 0
implicitWidth: root.horizontal ? 0 : root.implicitWidth - ((Appearance.padding.small - 1) * 2) implicitWidth: root.horizontal ? 0 : root.implicitWidth
radius: height / 2 radius: height / 2
// qmllint enable Quick.anchor-combinations // qmllint enable Quick.anchor-combinations