Diffusion KIO d5f67b07b5ce

KFileWidget: Perfectly align filename widget with icon view

Authored by rkflx on Apr 21 2018, 11:42 AM.

Description

KFileWidget: Perfectly align filename widget with icon view

Summary:
Since the redesign of the file dialog for KDE4, the left edges of the
line edits below the icon view were supposed to be aligned to the left
edge of the icon view, while in KDE3 the naming labels were aligned
instead.

However, in practice that never worked out perfectly, there was always a
small displacement. While hardly noticable in KDE4's widget styles, in
particular for Breeze in KF5 with its small splitter handle width and
larger layout spacing this became much more annoying to look at.

This can be fixed by taking the splitter handle width as well as the
grid layout spacing into account. While the patch seems straightforward,
making the patch work with all styles was actually suprisingly
difficult, not only because of the bug in the dependent patch.

Depends on D12592

Ref T8552

FIXED-IN: 5.46

Test Plan:
kdialog --getopenfilename, check alignment with KMag for
different widget styles (e.g. Breeze, Oxygen, Windows and Fusion) after
startup, and after moving the splitter, resizing the dialog and toggling
the places panel.

Before:

After:

Reviewers: Frameworks, ngraham

Reviewed By: ngraham

Subscribers: ngraham, elvisangelaccio

Tags: Frameworks

Maniphest Tasks: T8552

Differential Revision: https://phabricator.kde.org/D12594