Commit ba92d4c9 authored by Thorbjørn Lindeijer's avatar Thorbjørn Lindeijer

QmlJSDebugger: Removed the double-click feature from the color box

It was supposed to show a color dialog, but in practice it never worked
due to using show() rather than exec(). Removed it completely since it
was judged confusing and not very useful, since it is already possible
to copy the color by using the context menu.

Task-number: QTCREATORBUG-3878
Reviewed-by: Kai Koehne
parent 8defa8a7
......@@ -53,7 +53,7 @@ ToolBarColorBox::ToolBarColorBox(QWidget *parent) :
QLabel(parent)
{
m_copyHexColor = new QAction(QIcon(QLatin1String(":/qml/images/color-picker-hicontrast.png")),
tr("Copy"), this);
tr("Copy Color"), this);
connect(m_copyHexColor, SIGNAL(triggered()), SLOT(copyColorToClipboard()));
setScaledContents(false);
}
......@@ -116,12 +116,6 @@ void ToolBarColorBox::contextMenuEvent(QContextMenuEvent *ev)
contextMenu.exec(ev->globalPos());
}
void ToolBarColorBox::mouseDoubleClickEvent(QMouseEvent *)
{
QColorDialog dialog(m_color);
dialog.show();
}
void ToolBarColorBox::copyColorToClipboard()
{
QClipboard *clipboard = QApplication::clipboard();
......
......@@ -52,7 +52,6 @@ public:
protected:
void contextMenuEvent(QContextMenuEvent *ev);
void mouseDoubleClickEvent(QMouseEvent *);
void mousePressEvent(QMouseEvent *ev);
void mouseMoveEvent(QMouseEvent *ev);
private slots:
......
......@@ -124,17 +124,10 @@ void ToolBarColorBox::contextMenuEvent(QContextMenuEvent *ev)
contextMenu.exec(ev->globalPos());
}
void ToolBarColorBox::mouseDoubleClickEvent(QMouseEvent *)
{
QColorDialog dialog(m_color);
dialog.show();
}
void ToolBarColorBox::copyColorToClipboard()
{
QClipboard *clipboard = QApplication::clipboard();
clipboard->setText(m_color.name());
}
} // namespace QmlJSInspector
......@@ -53,7 +53,6 @@ public:
protected:
void contextMenuEvent(QContextMenuEvent *ev);
void mouseDoubleClickEvent(QMouseEvent *);
void mousePressEvent(QMouseEvent *ev);
void mouseMoveEvent(QMouseEvent *ev);
private slots:
......
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