Bug 391910 - New kcm to configure cursor theme has excessive and/or variable side padding
Summary: New kcm to configure cursor theme has excessive and/or variable side padding
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-16 03:23 UTC by Patrick Silva
Modified: 2018-04-16 14:57 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
screenshot (104.10 KB, image/png)
2018-03-16 03:23 UTC, Patrick Silva
Details
unmaximized system settings > cursor kcm (531.41 KB, image/png)
2018-03-21 23:44 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2018-03-16 03:23:38 UTC
Created attachment 111430 [details]
screenshot

Red lines in my screenshot taken on neon dev unstable indicate the large spaces.
Comment 1 Patrick Silva 2018-03-21 23:44:32 UTC
Created attachment 111545 [details]
unmaximized system settings > cursor kcm

Situation is worst when the window is unmaximized.
Comment 2 Kai Uwe Broulik 2018-03-22 08:38:41 UTC
That's by design and all new settings modules using a grid-style selection will have that
Comment 3 Patrick Silva 2018-03-22 12:18:56 UTC
horrible
Comment 4 David Edmundson 2018-03-22 12:34:00 UTC
Kai are you sure? https://phabricator.kde.org/M112/415/
Comment 5 Nate Graham 2018-03-22 13:06:53 UTC
Re-opening since this seems like a visual regression, even if it was intentional. Also, it's not clear that it was a part of the intended design, judging by the mockup. Those were intentionally "low-fidelity" mockups, to avoid getting people hung up on the details. These huge side borders might have been a case of taking the low-fi mockups too literally...
Comment 6 Kai Uwe Broulik 2018-03-22 14:05:08 UTC
The Grid View is intentionally designed in a way that it will always be a whole number of delegates wide without leaving a gap inside the view or having to resize the delegate to fit.

implicitWidth: Math.max(view.cellWidth * 2 + internal.scrollBarSpace
                , Math.floor(internal.availableWidth / view.cellWidth) * view.cellWidth + internal.scrollBarSpace + 4)

It's not like you would gain anything from making the view wider as no more items would fit inside anyway. I'd rather have uniform padding on both sides than random padding inside the grid on the right side of it.
Comment 7 David Edmundson 2018-03-22 14:29:25 UTC
That's a sensible implicitWidth, but you can make widgets bigger than their size hint. 

I would expect this to fill the available width, without that we'd always show only 2 delegates even if you resize it to fill an screen.
Comment 8 Kai Uwe Broulik 2018-03-22 14:30:05 UTC
It always grows to accomodate however many delegates would fit its width: Math.floor(internal.availableWidth / view.cellWidth) ← the number of cells that fit
Comment 9 Nate Graham 2018-03-22 14:33:07 UTC
That means that the frame around the delegates jumps around in size and constantly changes its side padding as the window is resized. I'm not a big fan, to be honest. Give it a try; it feels really awkward and jarring.
Comment 10 Kai Uwe Broulik 2018-03-22 14:34:47 UTC
Because you can resize OpenGL windows smoothly on X to begin with ;)))

But do whatever with that. I just stated my opinion.
Comment 11 Andres Betts 2018-04-02 19:11:25 UTC
I agree with this, can we, at least, make it aligned with the title of the KCM? It looks like the title is about 5-10 PX margin. Something similar for the theme area would be good too. However, keep in mind that the more you stretch the window, the margin will become wider because the elements in the window are centered.
Comment 12 Marco Martin 2018-04-16 14:57:57 UTC
Git commit ed25dc5389415d3b03604f042cb70312aaec4225 by Marco Martin.
Committed on 16/04/2018 at 14:57.
Pushed by mart into branch 'master'.

new resize policy

Summary:
the grid view always takes the full kcm
the extra space is added as space between icons columns

Test Plan: tested on various sizes

Reviewers: #vdg, #plasma

Subscribers: broulik, #frameworks

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D12244

M  +7    -7    src/qmlcontrols/kcmcontrols/qml/GridDelegate.qml
M  +8    -9    src/qmlcontrols/kcmcontrols/qml/GridView.qml
M  +8    -5    src/qmlcontrols/kcmcontrols/qml/GridViewKCM.qml

https://commits.kde.org/kdeclarative/ed25dc5389415d3b03604f042cb70312aaec4225