Label Alignment in KDE4

Andreas Pakulat apaku at
Fri Jul 18 19:33:15 BST 2008

On 18.07.08 18:06:06, Andreas Pakulat wrote:
> On 18.07.08 11:45:53, Maksim Orlovich wrote:
> > > Well, it looks ok here for my eyes using QtCurve style. 
> > 
> > It aligns labels to the top of lineedits, not middle (well, ideally it should 
> > be baseline, but let's not ask too much).
> > 
> > > plastique. If other styles look bad they should be fixed. 
> > 
> > It's not a problem with the styles, but with the layout (particularly since 
> > layoutLabelAlignment doesn't seem to do anything), it's more visible with 
> > Oxygen, however, because it has wider bevels.
> Indeed, that parameter of the layout doesn't change anything. Yet you
> can still change the individual labels - at least in designer - and they
> default to VCenter, not Top alignment. I'm not seeing a problem here and
> my eye's aren't that bad as not seeing a difference between top-aligned
> and center aligned labels compared to a lineedit.

Apparently I was wrong and Maksim right, its just that with Plastique
its not so obvious due to little space around the texts. When one
increases the line-edit font and leaves the label font its more obvious.
So that rules out formlayout, but luckily its anyway just a convenience
class as the same can be done with a gridlayout.
See the following (top is formlayout, bottom is boxlayout):


You recoil from the crude; you tend naturally toward the exquisite.

More information about the kde-core-devel mailing list