[KCMs/Standard Actions] Give KCMShell window a sane default size
ClosedPublic

Authored by ngraham on Jan 15 2020, 7:46 PM.

Details

Summary

BUG: 377653
FIXED-IN: 5.18.5

Test Plan

Before:


After:

Diff Detail

Repository
R119 Plasma Desktop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
ngraham created this revision.Jan 15 2020, 7:46 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJan 15 2020, 7:46 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
ngraham requested review of this revision.Jan 15 2020, 7:46 PM

Ok, but why minimum?
We still have a few reports of people on weird tiny netbooks.

I don't know of any netbooks shorter with screens shorter than 600px, which is why I chose 600. Also, the window is resizable to be smaller.

Is there a better way?

Is there a better way?

Depends what the goal is. To set a minimum size or to change the default size.

Commit title says one thing, comment says another.

The goal is to have a sane default size.

This patch in its current state seems to do that, since setting a minimum width and height on m_editor doesn't actually prevent it from being resized to be smaller due to its sizePolicy.

cfeck added a subscriber: cfeck.Jan 21 2020, 11:16 PM

Note that a window's minimum size does not include decorations or the panel. I suggest to subtract 60 pixels from the minimum height, otherwise on a 800x600 screen the buttons are likely hidden behind the panel.

cfeck added inline comments.Jan 21 2020, 11:18 PM
kcms/standard_actions/standard_actions_module.cpp
73

setMinimumSize()

ngraham updated this revision to Diff 74052.Jan 21 2020, 11:29 PM
ngraham marked an inline comment as done.

Use setMinimumSize()

ngraham edited the summary of this revision. (Show Details)Mar 13 2020, 12:12 PM
ngraham updated this revision to Diff 80595.Apr 19 2020, 10:42 PM

700 -> 600 to accommodate people who still have netbooks or run Plasma in a VM with a
tiny window because guest tools aren't installed

ngraham edited the summary of this revision. (Show Details)Apr 19 2020, 10:43 PM
This revision was not accepted when it landed; it landed in state Needs Review.Apr 19 2020, 10:43 PM
This revision was automatically updated to reflect the committed changes.