forked from qt-creator/qt-creator
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
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user