qs: use implicit size

This commit is contained in:
outfoxxed 2026-01-28 16:24:13 -08:00
parent 12a5cd9d65
commit 7ba61a7de4
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E
2 changed files with 4 additions and 4 deletions

View file

@ -18,7 +18,7 @@ PanelWindow {
property real baseWidth: 55 property real baseWidth: 55
property real leftMargin: root.compactState * 10 property real leftMargin: root.compactState * 10
width: baseWidth + 15 implicitWidth: baseWidth + 15
exclusiveZone: baseWidth + (isFullscreenWorkspace ? 0 : 15) - margins.left exclusiveZone: baseWidth + (isFullscreenWorkspace ? 0 : 15) - margins.left
mask: Region { mask: Region {
@ -42,7 +42,7 @@ PanelWindow {
return Math.max(barRect.anchors.topMargin + height, Math.min(barRect.height + barRect.anchors.topMargin - height, targetY)) return Math.max(barRect.anchors.topMargin + height, Math.min(barRect.height + barRect.anchors.topMargin - height, targetY))
} }
readonly property bool isFullscreenWorkspace: Hyprland.monitorFor(screen).activeWorkspace.hasFullscreen readonly property bool isFullscreenWorkspace: Hyprland.monitorFor(screen).activeWorkspace?.hasFullscreen ?? false
property real compactState: isFullscreenWorkspace ? 0 : 1 property real compactState: isFullscreenWorkspace ? 0 : 1
Behavior on compactState { Behavior on compactState {
NumberAnimation { NumberAnimation {

View file

@ -101,8 +101,8 @@ Scope {
} }
//height: bar.height //height: bar.height
width: Math.max(700, tooltipItem.largestAnimWidth) // max due to qtwayland glitches implicitWidth: Math.max(700, tooltipItem.largestAnimWidth) // max due to qtwayland glitches
height: { implicitHeight: {
const h = tooltipItem.lowestAnimY - tooltipItem.highestAnimY const h = tooltipItem.lowestAnimY - tooltipItem.highestAnimY
//console.log(`seth ${h} ${tooltipItem.highestAnimY} ${tooltipItem.lowestAnimY}; ${tooltipItem.y1} ${tooltipItem.y2}`) //console.log(`seth ${h} ${tooltipItem.highestAnimY} ${tooltipItem.lowestAnimY}; ${tooltipItem.y1} ${tooltipItem.y2}`)
return h return h