From db901429181f6317d4e72ba481592e1a15702e88 Mon Sep 17 00:00:00 2001 From: Akseli Lahtinen Date: Mon, 13 Apr 2026 12:11:24 +0300 Subject: KItemListRoleEditor: Remove document adjustSize This method would adjust the document to "reasonable size" but such size is set nowhere, nor there is any indication what is a reasonable size. This leads to the rename field being a lot wider than the actual item size, making it look broken. Removing this just keeps the document size same width as the widget itself, making it more sensible and less broken looking. --- src/kitemviews/private/kitemlistroleeditor.cpp | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/kitemviews/private/kitemlistroleeditor.cpp b/src/kitemviews/private/kitemlistroleeditor.cpp index 9cb44a829..cec9bb98b 100644 --- a/src/kitemviews/private/kitemlistroleeditor.cpp +++ b/src/kitemviews/private/kitemlistroleeditor.cpp @@ -146,17 +146,6 @@ void KItemListRoleEditor::autoAdjustSize() const auto originalSize = size(); auto newSize = originalSize; - document()->adjustSize(); - const qreal requiredWidth = document()->size().width(); - const qreal availableWidth = size().width() - frameBorder; - if (requiredWidth > availableWidth) { - qreal newWidth = requiredWidth + frameBorder; - if (parentWidget() && pos().x() + newWidth > parentWidget()->width()) { - newWidth = parentWidget()->width() - pos().x(); - } - newSize.setWidth(newWidth); - } - const qreal requiredHeight = document()->size().height(); const qreal availableHeight = size().height() - frameBorder; if (requiredHeight > availableHeight) { -- cgit v1.3