equal
deleted
inserted
replaced
1057 } |
1057 } |
1058 } |
1058 } |
1059 } |
1059 } |
1060 } |
1060 } |
1061 |
1061 |
|
1062 bool qt_mac_buttonIsRenderedFlat(const QPushButton *pushButton, const QStyleOptionButton *option) |
|
1063 { |
|
1064 QMacStyle *macStyle = qobject_cast<QMacStyle *>(pushButton->style()); |
|
1065 if (!macStyle) |
|
1066 return false; |
|
1067 HIThemeButtonDrawInfo bdi; |
|
1068 macStyle->d->initHIThemePushButton(option, pushButton, kThemeStateActive, &bdi); |
|
1069 return bdi.kind == kThemeBevelButton; |
|
1070 } |
|
1071 |
1062 /** |
1072 /** |
1063 Creates a HIThemeButtonDrawInfo structure that specifies the correct button |
1073 Creates a HIThemeButtonDrawInfo structure that specifies the correct button |
1064 kind and other details to use for drawing the given combobox. Which button |
1074 kind and other details to use for drawing the given combobox. Which button |
1065 kind depends on the size of the combo, wether or not it is editable, |
1075 kind depends on the size of the combo, wether or not it is editable, |
1066 explicit user style settings, etc. |
1076 explicit user style settings, etc. |
1428 |
1438 |
1429 } |
1439 } |
1430 |
1440 |
1431 bool QMacStylePrivate::animatable(QMacStylePrivate::Animates as, const QWidget *w) const |
1441 bool QMacStylePrivate::animatable(QMacStylePrivate::Animates as, const QWidget *w) const |
1432 { |
1442 { |
|
1443 if (!w) |
|
1444 return false; |
|
1445 |
1433 if (as == AquaPushButton) { |
1446 if (as == AquaPushButton) { |
1434 QPushButton *pb = const_cast<QPushButton *>(static_cast<const QPushButton *>(w)); |
1447 QPushButton *pb = const_cast<QPushButton *>(static_cast<const QPushButton *>(w)); |
1435 if (w->window()->isActiveWindow() && pb && !mouseDown) { |
1448 if (w->window()->isActiveWindow() && pb && !mouseDown) { |
1436 if (static_cast<const QPushButton *>(w) != defaultButton) { |
1449 if (static_cast<const QPushButton *>(w) != defaultButton) { |
1437 // Changed on its own, update the value. |
1450 // Changed on its own, update the value. |