mirror-kde-plasma-desktop/kcms/keys/ui
Christoph Wolk 98f7a2d04f kcm_keys: fix layouting issues
kcm_keys has some layouting issues at very small window sizes:

- The column headers (Default/Custom shortcuts) always take up the full
  width. This works fine in most languages, but breaks for the usual
  culprits of volumnious verbiage, like German and Russian
- Somewhat similarly, the shortcuts themselves always take up their full
  single-line width. This works fine almost all the time, but can break
  if you have some four-modifier monstrosities defined (as we
  unfortunately do in e.g. emojier, for technical reasons). It's even
  worse if your language has some long key names like "Leertaste", or
  constraints from long column names.

In these cases we may end up with overlapping bits, and parts of the
text or even actual buttons that are off-screen.

In principle, we could fix this just by adding Layout.fillWidth in a
couple of strategic places and allowing things to elide/wrap as
necessary. But this doesn't always yield the best results because of the
layout structure.

kcm_keys has two columns here, one left-aligned and one right-aligned.
Visually, it does not make much sense to require that the header and the
contents have the same width, as it will yield unused space and
unnecessary elision.

So we switch from a RowLayout of ColumLayout to a ColumnLayout of
RowLayouts, and set fillWidth and elide as necessary.

This makes the contents always fit at all window sizes, and elides
things only if it's really necessary and we can't take unused space from
elsewhere. Some situations are still not the utmost of what is
potentially achievable, but we're talking absolute edge cases and
they're at most a little awkward, rather than obviously broken.

BUG: 525725
FIXED-IN: 6.8.0
2026-09-21 04:46:10 +00:00
..
main.qml kcms/keys: Position view at beginning when changing category 2026-07-09 08:48:21 +00:00
ShortcutActionDelegate.qml kcm_keys: fix layouting issues 2026-09-21 04:46:10 +00:00