mirror of
https://github.com/hyprwm/hyprland-plugins.git
synced 2026-05-08 03:38:01 +02:00
hyprscrolling: Fix issue with std:clamp and window size
https://github.com/hyprwm/hyprland-plugins/issues/567
This commit is contained in:
parent
fef398ed5e
commit
0919501bb8
1 changed files with 3 additions and 1 deletions
|
|
@ -237,7 +237,9 @@ void SWorkspaceData::fitCol(SP<SColumnData> c) {
|
|||
if (COL != c)
|
||||
currentLeft += ITEM_WIDTH;
|
||||
else {
|
||||
leftOffset = std::clamp((double)leftOffset, currentLeft - USABLE.w + ITEM_WIDTH, currentLeft);
|
||||
const double minOffset = currentLeft - USABLE.w + ITEM_WIDTH;
|
||||
const double maxOffset = currentLeft;
|
||||
leftOffset = std::clamp((double)leftOffset, std::min(minOffset, maxOffset), std::max(minOffset, maxOffset));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue