Bug 462803 - Decrease minimum window size
Summary: Decrease minimum window size
Status: RESOLVED FIXED
Alias: None
Product: plasma-systemmonitor
Classification: Applications
Component: general (show other bugs)
Version: 5.24.4
Platform: openSUSE Linux
: NOR wishlist
Target Milestone: ---
Assignee: KSysGuard Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-09 00:57 UTC by spacemant5010
Modified: 2023-01-12 06:53 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.27
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description spacemant5010 2022-12-09 00:57:31 UTC
SUMMARY
***
Need minimum size for this app to be able half of what it is now.
***


STEPS TO REPRODUCE
1.  Start plasma-systemmonitor
2. Try to resize it as small as possible
3. You can't resize it smaller than 700x550

OBSERVED RESULT
Minimum size too big.

EXPECTED RESULT
Smaller final window.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma:  OpenSUSE 15.4
(available in About System)
KDE Plasma Version: 5.24.4
KDE Frameworks Version: 5.90.0
Qt Version: 15.4

ADDITIONAL INFORMATION
If text has to be dropped or scaled so it's difficult to read if window is made smaller than currently minimum, that's fine.  Main usefulness of the tool is looking at the history graph.  Why was ksysguard killed off?  Now this migration is mandatory.
Comment 1 spacemant5010 2022-12-09 01:00:36 UTC
Summary should read, "Need minimum size for this app to be about half of what it is now."

Feature request for this bug tracking system - make comments editable.
Comment 2 David Redondo 2022-12-13 08:47:27 UTC
It's hard coded here https://invent.kde.org/plasma/plasma-systemmonitor/-/blob/master/src/main.qml#L22

On my system the minmum size of KSysguard is 201x321 which is rather small but maybe we can still decrease the one of plasma-systemmonitor
Comment 3 Nate Graham 2023-01-04 17:57:50 UTC
Boo, the numbers are hardcoded rather than being a multiple of GridUnit. I'll fix that real fast. Then we can discuss reducing the minimum window size. I;m a bit skeptical though, since at a significantly smaller size, a lot of content doesn't fit well.
Comment 4 Nate Graham 2023-01-04 18:00:58 UTC
Git commit 92376a43bd686efb200001aa71277e5d16794a59 by Nate Graham.
Committed on 04/01/2023 at 18:00.
Pushed by ngraham into branch 'master'.

Convert hardcoded minimum sizes to multiples of GridUnit

This way they at least scale with the font size, as expected.

M  +1    -1    src/faces/applicationstable/contents/ui/FullRepresentation.qml
M  +2    -2    src/main.qml

https://invent.kde.org/plasma/plasma-systemmonitor/commit/92376a43bd686efb200001aa71277e5d16794a59
Comment 5 David Edmundson 2023-01-04 18:03:44 UTC
> since at a significantly smaller size, a lot of content doesn't fit well.

A default size doesn't have to match the minimum size
Comment 6 Nate Graham 2023-01-04 18:07:20 UTC
Git commit f72d37dfb9bb22f42465cdcd3ab3934593a66fc8 by Nate Graham.
Committed on 04/01/2023 at 18:06.
Pushed by ngraham into branch 'master'.

Slightly reduce minimum window size

New minimum window width is 612x486 when using the standard font and
font size. This is still enough to make the default layouts work
tolerably well, but a bit smaller for people who prefer a smaller
minimum window size.
FIXED-IN: 5.27

M  +2    -2    src/main.qml

https://invent.kde.org/plasma/plasma-systemmonitor/commit/f72d37dfb9bb22f42465cdcd3ab3934593a66fc8
Comment 7 Nate Graham 2023-01-04 18:24:48 UTC
Right, that's fine and it already is different.

I don't think it makes sense for a window's minimum size to be so small that the content looks broken.
Comment 8 spacemant5010 2023-01-12 06:53:08 UTC
It doesn't have to "look broken" at a small size.  You could, for example just omit any text when the window is below a certain size and only show the graphs.  (I'm specifically talking about the CPU, network, disk activity history pane here.)  Think of it like adaptive websites that know whether they're on a desktop or phone, and display differently.  For tabs that have no meaningful rendering with a small window, just display "Resize window larger to see content" or something.

Also, you may want to poll users of ksysguard who have had to move to plasma-systemmonitor, to see how they used it.  I had it minimally sized and set to one side of the screen, so I could monitor it while doing other work.  The bigger its footprint, the more cumbersome it is to use without shuffling windows.

BTW, can I override the minimum size locally, with user-specific config?  It might consider doing that if possible.