fix: use height scaled region for top panel detection

Same as bottom panel, doesn't take into account the 5px offset this way
This commit is contained in:
2 * r + 2 * t 2026-04-02 15:57:24 +11:00
parent 2dffd4fbfd
commit c2221a6d8e

View file

@ -42,7 +42,8 @@ CustomMouseArea {
}
function inTopPanel(panel: Item, x: real, y: real): bool {
return y < Math.max(Config.border.minThickness, Config.border.thickness + panel.height) + panel.y && withinPanelWidth(panel, x, y);
const panelHeight = panel.height * (1 - (panel.offsetScale ?? 0)); // qmllint disable missing-property
return y < Math.max(Config.border.minThickness, Config.border.thickness + panelHeight) && withinPanelWidth(panel, x, y);
}
function inBottomPanel(panel: Item, x: real, y: real, isCorner = false): bool {