Resize Edit Profile dialog only when possible
ClosedPublic

Authored by mglb on Feb 27 2019, 10:06 PM.

Details

Summary

Initial window width is set to be wider than (default) minimum possible
size. This adds some whitespace and increases width of text inputs
on "tabs" page.

This was made unconditionally, which could increase the width past
screen's right edge on small screens.

It is changed to be at most 2/3 of the screen's width now. Note that
minimum window size is still in effect; the limit affects only
additional width.

Test Plan

(Instructions for X11)

  • Run Xephyr -dpi 96 -screen 800x600 :1
  • Run DISPLAY=:1 kwin_x11
  • Run DISPLAY=:1 ./konsole
  • Open edit profile dialog, resize it to minimum allowable size.
  • Measure the window size.
  • Close Xephyr.
  • Run Xephyr -dpi 96 -screen WxH :1, where W is the measured window width + 20, and H is anything larger than measured height.
  • Run DISPLAY=:1 kwin_x11
  • Run DISPLAY=:1 ./konsole
  • Open edit profile dialog

Expected result:
Edit Profile dialog's width should be a bit smaller than Xephyr's
screen

Diff Detail

Repository
R319 Konsole
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
mglb requested review of this revision.Feb 27 2019, 10:06 PM
mglb created this revision.
mglb updated this revision to Diff 52778.Feb 27 2019, 10:08 PM

Restore normal value

hindenburg accepted this revision.Feb 28 2019, 1:35 AM
hindenburg added a subscriber: hindenburg.

Nice thanks - my version of Xephyr it is -screen not -size

This revision is now accepted and ready to land.Feb 28 2019, 1:35 AM
hindenburg edited the test plan for this revision. (Show Details)Feb 28 2019, 2:00 AM
This revision was automatically updated to reflect the committed changes.