QToolButton * tb = new QToolButton;
tb->setAutoRaise(true);
tb->setDefaultAction(action);
- QToolButton * pb = qobject_cast<QToolButton *>(parentWidget());
- tb->setIconSize(pb->iconSize());
// trigger tooltip (children of popups do not receive mousemove events)
tb->setMouseTracking(true);
QToolBar * toolbar = qobject_cast<QToolBar *>(parentWidget()->parentWidget());
connect(toolbar, SIGNAL(iconSizeChanged(const QSize &)),
tb, SLOT(setIconSize(const QSize &)));
+ tb->setIconSize(toolbar->iconSize());
int const i = actions_.size();
int const ncols = qMin(6, i);
if (fw && !tornoff_) {
QPainter p(this);
QRegion borderReg;
- borderReg += QRect(0, 0, fw, height()); //left
- borderReg += QRect(width() - fw, 0, fw, height()); //right
- borderReg += QRect(0, 0, width(), fw); //top
- borderReg += QRect(0, height() - fw, width(), fw); //bottom
+ borderReg += QRegion(QRect(0, 0, fw, height())); //left
+ borderReg += QRegion(QRect(width() - fw, 0, fw, height())); //right
+ borderReg += QRegion(QRect(0, 0, width(), fw)); //top
+ borderReg += QRegion(QRect(0, height() - fw, width(), fw)); //bottom
p.setClipRegion(borderReg);
QStyleOptionFrame frame;
frame.rect = rect();
} // namespace frontend
} // namespace lyx
-#include "IconPalette_moc.cpp"
+#include "moc_IconPalette.cpp"