Skip to content

kcms/users: fix dialog sizing

Reason for the change

The dialogs are currently sized improperly at most window sizes, the result of multiple subtle bugs. This commit fixes them all:

  • Span whole overlay in multi-column view, not just the current column
  • Give the crop sheet a minimum size compatible with PlaMo and small windows widths
  • Use actual metrics to determine the number of columns, not an incorrect approximation
  • Allow the picture chooser dialog to become larger when there's space

This code needs a broader refactor, but I wanted to keep this diff here small for backporting.

Test plan

  1. kcmshell6 kcm_users > click on avatar image in the right-most column
  2. Resize the window in various ways
  3. Click "Open" and choose an image
  4. Resize the window in various ways again

Screenshots or screen recordings

Before After
Pictures_sheet__before Pictures_sheet__after
Avatar_cropper_sheet__before Avatar_cropper_sheet__after
before after

(Any non-window-resizing-related window glitches in the videos are recording artifacts, not seen in real life)

Bugs fixed

BUG: 481316 FIXED-IN: 6.3.0

Merge request reports

Loading