[Applet Configuration] Only scroll down if item is barely visible
ClosedPublic

Authored by broulik on Aug 26 2016, 9:05 AM.

Details

Summary

The logic for scrolling a focus item into view was mostly meant for keyboard-navigating through a list of CheckBoxes.
However, an inner ScrollView - like plasma-pa has in its config dialog - can also gain activeFocus. This had us try to scroll the ScrollView into view, usually scrolling away other view contents.
With the added logic we only try to scroll if the control is barely visible at the bottom but not if significant portions of it are already visible.

Test Plan

I can still tab through task manager settings and have the view scroll properly.
Switching tabs in plasma-pa applet config dialog no longer scrolls the tabs out of view.

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.
broulik updated this revision to Diff 6287.Aug 26 2016, 9:05 AM
broulik retitled this revision from to [Applet Configuration] Only scroll down if item is barely visible.
broulik updated this object.
broulik edited the test plan for this revision. (Show Details)
broulik added a reviewer: Plasma.
broulik set the repository for this revision to R119 Plasma Desktop.
Restricted Application added a project: Plasma. · View Herald TranscriptAug 26 2016, 9:05 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
mart accepted this revision.Aug 26 2016, 1:40 PM
mart added a reviewer: mart.
This revision is now accepted and ready to land.Aug 26 2016, 1:40 PM
This revision was automatically updated to reflect the committed changes.