Commit 3d2aae07 authored by Thomas Hartmann's avatar Thomas Hartmann

QuickToolBars: fix cursor on Mac OS X

We have to set the cursor on Mac OS X
manually in enter and leave events.

Task-number: QTCREATORBUG-2622
Reviewed-by: Kai Koehne
parent 397c580d
......@@ -165,6 +165,20 @@ void DragWidget::protectedMoved()
}
void DragWidget::leaveEvent(QEvent *)
{
#ifdef Q_WS_MAC
unsetCursor();
#endif
}
void DragWidget::enterEvent(QEvent *)
{
#ifdef Q_WS_MAC
setCursor(Qt::ArrowCursor);
#endif
}
ContextPaneWidget::ContextPaneWidget(QWidget *parent) : DragWidget(parent), m_currentWidget(0)
{
QGridLayout *layout = new QGridLayout(this);
......@@ -208,6 +222,9 @@ ContextPaneWidget::ContextPaneWidget(QWidget *parent) : DragWidget(parent), m_cu
m_disableAction->setCheckable(true);
connect(m_disableAction.data(), SIGNAL(toggled(bool)), this, SLOT(onDisable(bool)));
m_pinned = false;
#ifdef Q_WS_MAC
setCursor(Qt::ArrowCursor);
#endif
}
ContextPaneWidget::~ContextPaneWidget()
......
......@@ -64,6 +64,8 @@ protected:
void mouseReleaseEvent(QMouseEvent * event);
void mouseMoveEvent(QMouseEvent * event);
void virtual protectedMoved();
void leaveEvent(QEvent *);
void enterEvent(QEvent *);
private:
QGraphicsDropShadowEffect *m_dropShadowEffect;
......
......@@ -177,4 +177,19 @@ void CustomColorDialog::setupWidgets()
m_blockUpdate = false;
}
void CustomColorDialog::leaveEvent(QEvent *)
{
#ifdef Q_WS_MAC
unsetCursor();
#endif
}
void CustomColorDialog::enterEvent(QEvent *)
{
#ifdef Q_WS_MAC
setCursor(Qt::ArrowCursor);
#endif
}
} //QmlEditorWidgets
......@@ -89,6 +89,8 @@ signals:
protected:
void setupWidgets();
void leaveEvent(QEvent *);
void enterEvent(QEvent *);
private:
QFrame *m_beforeColorWidget;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment