[KCM] Make multi-screen draggability more obvious
Needs ReviewPublic

Authored by ngraham on Mon, Oct 7, 9:17 PM.

Details

Reviewers
romangg
Group Reviewers
Plasma
VDG
Summary

Add a label and use a grabby hand cursor when hovering over a screen when there are
more than one.

BUG: 412303
FIXED-IN: 5.18.0

Test Plan

Diff Detail

Repository
R104 KScreen
Branch
make-draggability-more-obvious (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 17450
Build 17468: arc lint + arc unit
ngraham created this revision.Mon, Oct 7, 9:17 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMon, Oct 7, 9:17 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
ngraham requested review of this revision.Mon, Oct 7, 9:17 PM
broulik added a subscriber: broulik.Mon, Oct 7, 9:21 PM
broulik added inline comments.
kcm/package/contents/ui/Output.qml
272

Hm, can you still make the hand "close" when you press the button, which is what is typically done for dragging things

273

That won't update when outputs are added/removed, an invokable cannot be signalled

kcm/package/contents/ui/Screen.qml
59

i18n

ngraham marked an inline comment as done.Mon, Oct 7, 9:24 PM
ngraham added inline comments.
kcm/package/contents/ui/Output.qml
272

I can do that if I accept the left button, but doing so interferes with the drag handler. I couldn;t figure out how to make these two play nicely together; assistance would be appreciated

273

Nah it totally works! :)

ngraham updated this revision to Diff 67464.Mon, Oct 7, 9:24 PM

Translate

ngraham marked 2 inline comments as done.Mon, Oct 7, 9:24 PM
broulik added inline comments.Tue, Oct 8, 7:21 AM
kcm/package/contents/ui/Output.qml
273

This is against the laws of Physics.
I suspect it just erroring out (possibly rowCount requiring a QModelIndex argument) and just always staying visible. Or the KCM re-creating the outputModel which would be weird.

davidedmundson added inline comments.
kcm/package/contents/ui/Output.qml
273

Or the KCM re-creating the outputModel which would be weird.

It would, but:

connect (m_config.get(), &ConfigHandler::outputModelChanged,
         this, &KCMKScreen::outputModelChanged);

which gets emitted in

ConfigHandler::setConfig(KScreen::ConfigPtr config)

A new screen would be a new config.

I think output model is the same object, but it would retrigger this evaluation.

GB_2 added a subscriber: GB_2.EditedTue, Oct 8, 2:26 PM

What about using a SizeAllCursor, like the screen edge button in the Plasma panel edit mode? The hand is usually used for scrolling.

ngraham updated this revision to Diff 67509.Tue, Oct 8, 2:47 PM

Use Qt.SizeAllCursor