Add and use a base class for mappanel sliders.

This reduces the amount of copied code and reuses the methods from the
base class.