Jump to content

Plasma/Active/Development/ActiveHIG/Scrolling

From KDE Community Wiki

Scrolling

Guidelines

Scrolling on touch UIs always has to apply these principles:

  • It has to be done by flicking
  • It has to be accelerated
  • It has to be "kinetic" (meaning that the scrolling does not immediately stop when the finger is lifted after flicking, but decelerates instead)
  • There are never scrollbars, only a scroll indicator

Code

Use this to get a scrolling area that applies the principles above. The component will automatically display a scroll indicator on Plasma Active and a scrollbar on Plasma Desktop.

import org.kde.plasma.extracomponents 0.1 as PlasmaExtras

PlasmaExtras.ScrollArea {

    //The Flickable can be a ListView or GridView as well
    Flickable {
       //contents
    }
}