[Workspace KCM] Expose setting to choose what left-clicking in the scrollbar track does
ClosedPublic

Authored by ngraham on Nov 17 2019, 11:49 PM.

Details

Summary

This patch exposes a UI for choosing what happens when you left-click in the scrollbar
track in a Qt or KDE app. The default behavior is unchanged (left-click to page up/page
down) but now you can choose to warp the scroll handle straight to the clicked position.

Having this setting in the Workspace KCM opens the door to later making it also change
the behavior for GTK apps as well, allowing us to remove one more setting from the GTK
KCM and bringing us one step closer to finishing T10611: Set options for GTK apps in the respective KCMs.

BUG: 379498
FIXED-IN: 5.18.0

Depends on D25360

Test Plan

  • Apply D25360
  • Click on "Scrolls to the clicked location" in the KCM
  • Click in the scrollbar track in a Qt/KDE app
  • See that the scroll handle position jumps right there
  • Click on "Scrolls one page up or down" in the KCM
  • Click in the scrollbar track in a Qt/KDE app
  • See that the scroll handle moves up or down by one page height

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.Nov 17 2019, 11:49 PM
Restricted Application added a project: Plasma. · View Herald TranscriptNov 17 2019, 11:49 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
ngraham requested review of this revision.Nov 17 2019, 11:49 PM
ndavis added a subscriber: ndavis.EditedNov 18 2019, 12:36 AM

+1 for exposing this option

kcms/workspaceoptions/package/contents/ui/main.qml
138

I feel like it's too easy to mistake the word trough for though or through. I think it would be better to use "scrollbar groove" instead of "scroll trough"

ngraham added inline comments.Nov 18 2019, 12:55 AM
kcms/workspaceoptions/package/contents/ui/main.qml
138

How about "Scrollbar track?"

ndavis added inline comments.Nov 18 2019, 1:01 AM
kcms/workspaceoptions/package/contents/ui/main.qml
138

That would work too. I said groove because that's the term that the Breeze QStyle uses in the code, but I don't think it matters too much whether we use groove or track as long as we do it consistently. I slightly prefer groove.

ngraham updated this revision to Diff 69900.Nov 18 2019, 1:10 AM

Update terminology

ngraham edited the test plan for this revision. (Show Details)Nov 18 2019, 1:10 AM
ndavis accepted this revision.Nov 18 2019, 1:14 AM
This revision is now accepted and ready to land.Nov 18 2019, 1:14 AM
ngraham marked 3 inline comments as done.Nov 18 2019, 1:21 AM
ngraham retitled this revision from [Workspace KCM] Expose setting to choose what left-clicking in the scroll trough does to [Workspace KCM] Expose setting to choose what left-clicking in the scrollbar track does.Nov 18 2019, 3:55 AM
ngraham edited the summary of this revision. (Show Details)
ngraham edited the test plan for this revision. (Show Details)

We have all other scrollbar settings in:

breeze -> settings -> scrollbars

Which has the added advantage that it won't be shown if it's not supported, for example if you use Fusion.

ngraham added a comment.EditedNov 18 2019, 3:37 PM

We have all other scrollbar settings in:

breeze -> settings -> scrollbars

Which has the added advantage that it won't be shown if it's not supported, for example if you use Fusion.

This isn't only a Breeze setting. Per the discussion in https://bugs.kde.org/show_bug.cgi?id=379498, it should affect all widget themes, and per https://bugs.kde.org/show_bug.cgi?id=384889 and https://bugs.kde.org/show_bug.cgi?id=412685 and T10611, we'd like it to affect scrollbars in Plasma and QML-based desktop apps and GTK apps as well. So IMO it makes sense to have it in a central location rather than hidden away in the settings for one particular widget theme.

Of those links, only the first discusses which kcm to put it in and the suggestion there is the style kcm...

ngraham updated this revision to Diff 69933.Nov 18 2019, 4:04 PM

Improve config file entry namewq

Of those links, only the first discusses which kcm to put it in and the suggestion there is the style kcm...

Maybe I misunderstood the discussion, sorry.

The Application Style KCM no longer has a "Fine Tuning" tab so the original suggestion regarding putting it there no longer seems to apply. I guess we could stick it in the pop-up that appears when you click on the "Configure Icons and Toolbars" button (which would then need to be renamed).

But the Application Style KCM isn't really an accurate place for it because this is a behavioral setting, not an appearance setting. In addition, I want it to affect Plasma scrollbars as well and Plasma isn't an application.

Does the above make sense to you, @davidedmundson?

My primary concern is that it's a really super niche tweak thing. It's valid but certainly as niche as whether you show the up/down arrows or whatever, yet we're presenting it on the very first level of "Workspace Behaviour".

I also fear workspace behaviour becoming a dumping ground. Literally everything in systemsettings falls under that umbrella". There's definitely a need for careful thinking.

In terms of addressing the initial points. Whether something is QWidgets or QtQuick or GTK (via QtQucickControls) is not a reason to show something different as we have goals to sync them.
It being form vs function and the function affecting the plasma theme is a valid argument.

Would be good for some others to chime in.

Personally I don't see this setting as a super niche thing. The bug report has four duplicates, so there is clearly quite a bit of demand from users. On macOS, this is literally the first thing I change on a new install, and it's displayed very prominently in the "General" page of their System Settings app.

I share you concern about this KCM becoming a dumping ground. But I don't see a better place for this setting right now. And I think it does make some sense for it to hold general behavioral settings that affect both apps and Plasma.

GB_2 added a subscriber: GB_2.Nov 29 2019, 4:01 PM

I share you concern about this KCM becoming a dumping ground. But I don't see a better place for this setting right now. And I think it does make some sense for it to hold general behavioral settings that affect both apps and Plasma.

Sounds plausible to me.

ngraham updated this revision to Diff 70579.Nov 29 2019, 4:06 PM

Rebase; soooooooooo much easier now with D25586!

ngraham updated this revision to Diff 70580.Nov 29 2019, 4:07 PM

Clean up more

This revision was automatically updated to reflect the committed changes.