mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-29 14:52:12 +01:00
Add ifdef to retain default behaviour on OSX
This commit is contained in:
parent
3dd708a564
commit
3f8f2c4da1
@ -218,7 +218,8 @@ QRect ManhattanStyle::subControlRect(ComplexControl control, const QStyleOptionC
|
||||
SubControl subControl, const QWidget *widget) const
|
||||
{
|
||||
QRect rect;
|
||||
// Need to check for Mac style and use the default behaviour for that
|
||||
#ifndef Q_WS_MACX
|
||||
// Not using OSX, size combo dropdown to fit contents
|
||||
if(control == CC_ComboBox && subControl == SC_ComboBoxListBoxPopup)
|
||||
{
|
||||
const QStyleOptionComboBox *cb = qstyleoption_cast<const QStyleOptionComboBox *>(option);
|
||||
@ -241,6 +242,11 @@ QRect ManhattanStyle::subControlRect(ComplexControl control, const QStyleOptionC
|
||||
{
|
||||
rect = d->style->subControlRect(control, option, subControl, widget);
|
||||
}
|
||||
#else
|
||||
// Using OSX, use default style behaviour as this already sizes the
|
||||
// combo dropdown to fit
|
||||
rect = d->style->subControlRect(control, option, subControl, widget);
|
||||
#endif
|
||||
return rect;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user