forked from qt-creator/qt-creator
Fix tool buttons in details widget on Mac with raster engine.
Task-number: QTBUG-15170
This commit is contained in:
@@ -54,6 +54,11 @@ FadingPanel::FadingPanel(QWidget *parent) :
|
|||||||
setPalette(pal);
|
setPalette(pal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FadingPanel::setOpacity(qreal value)
|
||||||
|
{
|
||||||
|
m_opacityEffect->setOpacity(value);
|
||||||
|
}
|
||||||
|
|
||||||
void FadingPanel::fadeTo(float value)
|
void FadingPanel::fadeTo(float value)
|
||||||
{
|
{
|
||||||
QPropertyAnimation *animation = new QPropertyAnimation(m_opacityEffect, "opacity");
|
QPropertyAnimation *animation = new QPropertyAnimation(m_opacityEffect, "opacity");
|
||||||
|
@@ -43,6 +43,7 @@ class QTCREATOR_UTILS_EXPORT FadingPanel : public QWidget
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
FadingPanel(QWidget *parent = 0);
|
FadingPanel(QWidget *parent = 0);
|
||||||
|
void setOpacity(qreal value);
|
||||||
void fadeTo(float value);
|
void fadeTo(float value);
|
||||||
protected:
|
protected:
|
||||||
QGraphicsOpacityEffect *m_opacityEffect;
|
QGraphicsOpacityEffect *m_opacityEffect;
|
||||||
|
@@ -224,6 +224,9 @@ namespace Utils {
|
|||||||
d->m_toolWidget->adjustSize();
|
d->m_toolWidget->adjustSize();
|
||||||
d->m_grid->addWidget(d->m_toolWidget, 0, 1, 1, 1, Qt::AlignRight);
|
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);
|
changeHoverState(d->m_hovered);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user