mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 19:25:39 +00:00
Amend ce8b4e3a21
This commit is contained in:
parent
76ac4d8f8d
commit
b9a9234cf6
@ -565,28 +565,32 @@ GuiSearch::GuiSearch(GuiView & parent, Qt::DockWidgetArea area, Qt::WindowFlags
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GuiSearch::mousePressEvent(QMouseEvent *event)
|
void GuiSearch::mousePressEvent(QMouseEvent * event)
|
||||||
{
|
{
|
||||||
if (isFloating() && event->button() == Qt::LeftButton) {
|
if (isFloating() && event->button() == Qt::LeftButton) {
|
||||||
dragPosition = event->globalPos() - frameGeometry().topLeft();
|
dragPosition = event->globalPos() - frameGeometry().topLeft();
|
||||||
event->accept();
|
event->accept();
|
||||||
}
|
} else
|
||||||
|
DockView::mousePressEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GuiSearch::mouseMoveEvent(QMouseEvent *event)
|
void GuiSearch::mouseMoveEvent(QMouseEvent * event)
|
||||||
{
|
{
|
||||||
if (isFloating() && event->buttons() & Qt::LeftButton) {
|
if (isFloating() && event->buttons() & Qt::LeftButton) {
|
||||||
move(event->globalPos() - dragPosition);
|
move(event->globalPos() - dragPosition);
|
||||||
event->accept();
|
event->accept();
|
||||||
}
|
} else
|
||||||
|
DockView::mouseMoveEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GuiSearch::mouseDoubleClickEvent(QMouseEvent *event)
|
void GuiSearch::mouseDoubleClickEvent(QMouseEvent * event)
|
||||||
{
|
{
|
||||||
if (event->button() == Qt::LeftButton)
|
if (event->button() == Qt::LeftButton)
|
||||||
setFloating(!isFloating());
|
setFloating(!isFloating());
|
||||||
|
else
|
||||||
|
DockView::mouseDoubleClickEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user