Simple control panels

Simple control panels are those where the widgets are all of the same type in terms of resizeability. A simple algorithm can be used to calculate the size and position of widgets in such control panels.

The simplest case is where all widgets are both horizontally and vertically resizeable. In this case, widget positions and sizes are multiplied by the magnification of the control panel, after taking into account the fixed border of 10 pixels around the control panel, e.g.

When the widgets are non-resizeable you can use a modified version of the same algorithm. The space available to each widget is the same as when it is resizeable, but you have to decide whereabouts in the available space you place the widget. Horizontally, the choices are left, right or centre and vertically they are top, bottom or centre.

Wherever you choose to place the widgets you will loose some alignments of different sized widgets when the control panel is resized. E.g. if you choose to place the widget in the top-left hand corner of the available space you will maintain top and left alignment of different sized widgets but will loose centre, right and bottom alignment. It was decided to place the widgets in the centre of the available space because this maintains the overall layout of the control panel.


So if you want your widgets to stay aligned, align them centrally or make them the same size (which amounts to the same thing).

Previous : Contents : Next