Q_ASSERT(m_animation->state() == QAbstractAnimation::Stopped);
+ if (!isVisible())
+ show();
+
// Hide previous buttons (if any)
if (m_contextButtons)
m_contextButtons->setParent(0);
m_newContextButtons = 0;
m_contextButtons->setParent(this);
m_contextButtons->show();
- setFixedSize(m_contextButtons->size());
+ setFixedWidth(m_contextButtons->width());
// center this widget horizontally to middle of the panel contents area and set outside of
// the view
QPainter painter(this);
- painter.drawPixmap(0, 0, *m_backgroundLeft);
- painter.drawTiledPixmap(24, 0, width() - 2 * 24, 78, *m_backgroundMiddle);
- painter.drawPixmap(width() - 24, 0, *m_backgroundRight);
+ const int TOP = 0;
+ const int LEFT = 0;
+ painter.drawPixmap(TOP, LEFT, *m_backgroundLeft);
+ painter.drawTiledPixmap(m_backgroundLeft->width(), TOP,
+ width() - m_backgroundLeft->width() - m_backgroundRight->width(),
+ height(),
+ *m_backgroundMiddle);
+ painter.drawPixmap(width() - m_backgroundRight->width(), TOP, *m_backgroundRight);
}
void ListItemContextButtonBar::setContextButtons(QWidget *contextButtons)