diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2024-05-09 14:58:05 +0800 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@qt.io> | 2024-05-10 14:45:41 +0800 |
commit | e11637d28f33d5e4c4d1d09fd23ef4364151d625 (patch) | |
tree | d44280f9dc2f7df446d86ee94710f813325358bd /src/quick/scenegraph/coreapi/qsgnode.h | |
parent | a5edb49c8fe8ae72aaaf7fed3a3f27b3d78ea9cd (diff) |
The logic that handles the item to the left of the handle being resized
incorrectly used a hidden handle as the leftEdge. This would cause the
item to get more space than it should because it thought it had more
space to consume.
Before the fix, leftEdge is 10 and accumulated is 0, so:
// 390 400 0 10
const qreal rightStop = size - accumulated - pressedHandleSize;
// 110 10 110
qreal leftStop = qMax(leftEdge, pressedHandlePos);
// 110 110 110 390
const qreal newHandlePos = qBound(leftStop, pressedHandlePos, rightStop);
// 100 110 10
const qreal newItemSize = newHandlePos - leftEdge;
After the fix, leftEdge is 60 and accumulated is 0, so:
// 390 400 0 10
const qreal rightStop = size - accumulated - pressedHandleSize;
// 110 60 110
qreal leftStop = qMax(leftEdge, pressedHandlePos);
// 110 110 110 390
const qreal newHandlePos = qBound(leftStop, pressedHandlePos, rightStop);
// 50 110 60
const qreal newItemSize = newHandlePos - leftEdge;
Fixes: QTBUG-125049
Pick-to: 6.5 6.7
Change-Id: I3cdf57693c71c1f367780eda0ff6794fea02d546
Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>
Diffstat (limited to 'src/quick/scenegraph/coreapi/qsgnode.h')
0 files changed, 0 insertions, 0 deletions