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

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

Details

Reviewers
None
Group Reviewers
Plasma
Summary

BUG: 377653
FIXED-IN: 5.18.0

Test Plan

Before:


After:

Diff Detail

Repository
R119 Plasma Desktop
Branch
standardshortcuts-minimum-size (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 21456
Build 21474: arc lint + arc unit
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()