popout: never round the body below its content height

fixes #3558
This commit is contained in:
bbedward
2026-09-24 12:07:40 -04:00
parent 4554c9c894
commit ace13d7c18
3 changed files with 14 additions and 3 deletions
+6
View File
@@ -2238,6 +2238,12 @@ Singleton {
return Math.round(value * s) / s;
}
// the epsilon keeps a value already on the grid from gaining a pixel through float error
function pxCeil(value, dpr) {
const s = dpr || 1;
return Math.ceil(value * s - 0.001) / s;
}
function barWidgetThickness(innerPadding, dpr) {
return snapEven(Math.max(20, 26 + innerPadding * 0.6), dpr);
}
+7 -2
View File
@@ -313,6 +313,11 @@ Singleton {
}, 0, 3000);
}
// wlr-output reports wl_fixed (1/256 steps), surfaces render at fractional-scale-v1 N/120
function fractionalScale(fixedScale) {
return Math.round(fixedScale * 120) / 120;
}
function getScreenScale(screen) {
if (!screen)
return 1;
@@ -323,12 +328,12 @@ Singleton {
const randrScale = randrScales[screen.name];
if (randrScale !== undefined && randrScale > 0)
return Math.round(randrScale * 20) / 20;
return fractionalScale(randrScale);
if (WlrOutputService.wlrOutputAvailable && screen) {
const wlrOutput = WlrOutputService.getOutput(screen.name);
if (wlrOutput?.enabled && wlrOutput.scale !== undefined && wlrOutput.scale > 0) {
return Math.round(wlrOutput.scale * 20) / 20;
return fractionalScale(wlrOutput.scale);
}
}
+1 -1
View File
@@ -794,7 +794,7 @@ Item {
readonly property real shadowMotionPadding: directionalRevealActive ? 0 : Math.max(0, animationOffset)
readonly property real shadowBuffer: Theme.snap(Math.max(popoutHandle.surfacePadding, shadowRenderPadding + shadowMotionPadding), dpr)
readonly property real alignedWidth: Theme.px(popupWidth, dpr)
readonly property real alignedHeight: Theme.px(popupHeight, dpr)
readonly property real alignedHeight: Theme.pxCeil(popupHeight, dpr)
readonly property real surfaceBodyWidth: Math.max(alignedWidth, Theme.px(Math.min(minimumSurfaceWidth, screenWidth), dpr))
readonly property real surfaceBodyX: Theme.snap(_standaloneAlignedXFor(surfaceBodyWidth), dpr)
readonly property real _surfaceOriginX: connected ? 0 : _surfaceX