Bug 310450

Summary: JJ: Form labels next to input fields should be right-aligned as stated in the HIG
Product: [I don't know] kde Reporter: Thomas Fischer <fischer>
Component: generalAssignee: Unassigned bugs mailing-list <unassigned-bugs>
Status: RESOLVED FIXED    
Severity: wishlist CC: dousek.petr, nate
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: All   
URL: http://techbase.kde.org/Projects/Usability/HIG/Form_Label_Alignment#Dialog_Alignment
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Thomas Fischer 2012-11-21 15:39:02 UTC
The KDE HIG on form label alignment [1] recommends to right-align labels next to their "buddy" input fields. Historically, a QGridLayout was chosen in such cases, which makes the label left-aligned. An example is the composer window of KMail, where labels for "To" or "Subject" are aligned left along the left window border and thus have a varying spacing to their line edits on the right.
The modern approach is to use a QFormLayout, which depending on the platform (KDE, Gnome, Windows, Mac) chooses the right label alignment.
In cases where a QFormLayout is not a viable option and a QGridLayout has to be kept in use, labels can be aligned using a call like
label->setAlignment((Qt::Alignment)label->style()->styleHint(QStyle::SH_FormLayoutLabelAlignment));

This bug report makes a fine Junior Job, as the necessary changes are local and can be done by new programmers without application-specific knowledge (in most cases). I would assume that this bug report will stay "work in progress" indefinitely as there will be always applications which do not follow the HIG.

Furthermore, it may be argued that this specific label alignment problem is only a minor UX issue, but it is still a problem and if we want to take our own HIG serious, we should do something about this.

[1] http://techbase.kde.org/Projects/Usability/HIG/Form_Label_Alignment#Dialog_Alignment

Reproducible: Always
Comment 1 Nate Graham 2020-09-29 20:58:58 UTC
They are now! :)