[PATCH] Fix cell height calc in resize handle
authorNate Graham <nate@kde.org>
Thu, 22 May 2025 14:25:05 +0000 (08:25 -0600)
committerAurélien COUDERC <coucouf@debian.org>
Tue, 20 May 2025 06:31:26 +0000 (08:31 +0200)
Correct typo using cellWidth() instead of cellHeight() for
minimum height calculation during vertical resizing. Ensures
proper cell-aligned sizing behavior.

(cherry picked from commit 4b1dfd560433ef89f80b5916d2ac15739c5f91fb)

Co-authored-by: Wang Yu <wangyu@uniontech.com>
Gbp-Pq: Name upstream_2c855c2f_Fix-cell-height-calc-in-resize-handle.patch

components/containmentlayoutmanager/resizehandle.cpp

index b3b1f673ef03915d5f50051f9d64cbcdb27a56b1..f840717ecf690eda6fdda4e26323cf396ae924cf 100644 (file)
@@ -156,7 +156,7 @@ void ResizeHandle::mouseMoveEvent(QMouseEvent *event)
 
     // Now make minimumSize an integer number of cells
     minimumSize.setWidth(ceil(minimumSize.width() / layout->cellWidth()) * layout->cellWidth());
-    minimumSize.setHeight(ceil(minimumSize.height() / layout->cellWidth()) * layout->cellHeight());
+    minimumSize.setHeight(ceil(minimumSize.height() / layout->cellHeight()) * layout->cellHeight());
 
     // Horizontal resize
     if (resizeLeft()) {