Make status 'popup' button more appopriate size on OSX
ClosedPublic

Authored by amccann on Dec 15 2015, 6:45 AM.

Details

Summary

Due to small size, button Requires 'Qt::WA_MacMiniSize' attribute.
In addition, 'm_pButton->setMaximumHeight( maximumHeight );' caused problems.

Test Plan

Test on varity of platforms, verify popup button is as expected

Diff Detail

Repository
R33 KDevPlatform
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
amccann updated this revision to Diff 1520.Dec 15 2015, 6:45 AM
amccann retitled this revision from to Make status 'popup' button more appopriate size on OSX.
amccann updated this object.
amccann edited the test plan for this revision. (Show Details)
Restricted Application added a subscriber: kdevelop-devel. · View Herald TranscriptDec 15 2015, 6:45 AM
kfunk accepted this revision.Dec 15 2015, 7:57 AM
kfunk added a reviewer: kfunk.
kfunk added a subscriber: kfunk.

Can you also post before/after screenshots? Just for the reference.

This revision is now accepted and ready to land.Dec 15 2015, 7:57 AM
BeforeAfter (with D656)
OSX
shell/progresswidget/statusbarprogresswidget.cpp
73–89

This caused the button to be 'cut off' vertically.

Given that setting the maximumHeight did nothing on OSX, and on Linux the button appeared about the same size, I thought this was not required.

However, upon testing, without this, the button is much larger on Linux.

Will need to work on this a bit more.

amccann planned changes to this revision.Dec 15 2015, 8:17 AM

@kfunk: unfortunately this diff doesn't work entirely as I expected.

I'm trying to avoid #ifdef OSX type solutions.

amccann updated this revision to Diff 1524.Dec 15 2015, 7:04 PM
amccann edited the test plan for this revision. (Show Details)
amccann edited edge metadata.
  • Make status 'popup' button more appopriate size on OSX
  • Just special case OSX, no good workaround
This revision is now accepted and ready to land.Dec 15 2015, 7:04 PM
amccann marked an inline comment as done.Dec 15 2015, 7:13 PM

This is the final result. with the #ifdef it only applies to OSX:

The root issue seems to be that QPushButton (and QToolButton) both return rather 'large' minimumSizeHint on Linux, which prompted the setMaximumHeight call. Unfortunately, on OSX this causes the button to be rendered with the bottom edge clipped. Luckily, on OSX the minumSizeHint is much smaller and the standard layout works fine.

This revision was automatically updated to reflect the committed changes.