[Psi-devel] OS X toolbar button layout problem

Frank Osterfeld frank.osterfeld at gmail.com
Wed Jun 6 14:30:08 PDT 2007


Hi,

I observed a layout problem occurring on OS X with buttons smaller than
their preferred size.
The most visible case is the "Status Button" on the main toolbar. After
startup, the window is a bit too small so that the status button is not wide
enough to show the button text. In that case, the button isn't painted
round-shaped anymore but rectangular and also bigger than the layout should
usually allow. It even overlaps the menu button. Needless to say that it
looks ugly and broken. The attached screenshots show the window right after
startup and then after slightly increasing window width.

This is triggered because the button has the horizontal size policy
Expanding instead of Preferred or MinimumExpanding. Changing the size policy
to MinimumExpanding partly fixes the problem but the drawback is that the
minimum width of the main window becomes very large for long status strings
(such as "Do not Disturb").
The policy change also has the problem that after startup, the toolbar shows
a ">>" ("Extension Button"). So further fiddling with size policy/hints of
the involved widgets might be necessary to get rid of that.

Can anyone confirm this? I'm using Qt 4.3 (slightly post 4.3 qt-copy from
KDE SVN).
Not sure if that is a Qt bug or not - the QPushButton docs only mention that
the button becomes squared when getting smaller than (50, 30). Changing the
button shape when the text doesn't fit doesn't make much sense to me.

Regards,

Frank
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.affinix.com/pipermail/psi-devel-affinix.com/attachments/20070606/55a42c67/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PsiOSXButtonLayoutProblem.png
Type: image/png
Size: 13714 bytes
Desc: not available
Url : http://lists.affinix.com/pipermail/psi-devel-affinix.com/attachments/20070606/55a42c67/attachment-0002.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PsiOSXCorrected.png
Type: image/png
Size: 17291 bytes
Desc: not available
Url : http://lists.affinix.com/pipermail/psi-devel-affinix.com/attachments/20070606/55a42c67/attachment-0003.png 


More information about the psi-devel mailing list