Fix tool buttons in details widget on Mac with raster engine.

Task-number: QTBUG-15170
This commit is contained in:
con
2010-11-16 12:30:50 +01:00
parent ac51d53587
commit 98077818fc
3 changed files with 120 additions and 111 deletions

View File

@@ -54,6 +54,11 @@ FadingPanel::FadingPanel(QWidget *parent) :
setPalette(pal);
}
void FadingPanel::setOpacity(qreal value)
{
m_opacityEffect->setOpacity(value);
}
void FadingPanel::fadeTo(float value)
{
QPropertyAnimation *animation = new QPropertyAnimation(m_opacityEffect, "opacity");

View File

@@ -43,6 +43,7 @@ class QTCREATOR_UTILS_EXPORT FadingPanel : public QWidget
{
public:
FadingPanel(QWidget *parent = 0);
void setOpacity(qreal value);
void fadeTo(float value);
protected:
QGraphicsOpacityEffect *m_opacityEffect;

View File

@@ -224,6 +224,9 @@ namespace Utils {
d->m_toolWidget->adjustSize();
d->m_grid->addWidget(d->m_toolWidget, 0, 1, 1, 1, Qt::AlignRight);
#ifdef Q_WS_MAC
d->m_toolWidget->setOpacity(1.0);
#endif
changeHoverState(d->m_hovered);
}