Skip to content

Commit fb20111

Browse files
committed
Fix splitter few pixels issue when closing to the right
1 parent 5ccdfd6 commit fb20111

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/corelib/ui/widgets/splitter/splitter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ void Splitter::setSizes(const QVector<int>& _sizes)
359359
// Геометрия, при установке в неё ширину, считает на два пикселя меньше, поэтому
360360
// тут добавляем дельту, которая будет компенсировать этот недостаток
361361
//
362-
const auto widthDelta = isRightToLeft() ? -2 : 1;
362+
const auto widthDelta = widgetSize > 0 ? (isRightToLeft() ? -2 : 1) : 0;
363363
widgetGeometry.setWidth(widgetSize + widthDelta);
364364
} else {
365365
widgetGeometry.setHeight(widgetSize);

0 commit comments

Comments
 (0)