Skip to content

Inherit from AbstractKCM and use consistent margins

Currently, margins, header, and footer logic is duplicated with slight differences across AbstractKCM, SimpleKCM, ScrollViewKCM, and GridViewKCM.

This causes the different QML-based KCMs to have slightly different margins in system settings and amounts to unnecessary code fragility.

This commit improves the situation by doing the following:

  1. ScrollViewKCM and GridViewKCM now inherit from AbstractKCM.
  2. AbstractKCM now uses the margin logic from GridViewKCM.
  3. Hardcoded size hacks for margins are removed because they didn't succeed in bringing about consistency with widget KCMs, and removing them in fact makes things better.
  4. SimpleKCM is switched to using the same margin calculation as AbstractKCM because it cannot inherit from AbstractKCM.

Visual changes are extremely minimal (a pixel more or less here or there) and result in all of these KCM components having consistent margins.

cc @mart @davidedmundson @iasensio

Edited by Nate Graham

Merge request reports