mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-28 20:25:34 +08:00
Ref T592, allow to reset floating widget position by pressing SHIFT
SHIT mouseclick resets
This commit is contained in:
committed by
Mat Sutcliffe
parent
461e24f293
commit
89c5d87c1c
@@ -250,8 +250,14 @@ namespace BlackGui
|
|||||||
{
|
{
|
||||||
const bool floating = !this->isFloating();
|
const bool floating = !this->isFloating();
|
||||||
if (!floating) { this->setFrameless(false); } // remove frameless if not floating
|
if (!floating) { this->setFrameless(false); } // remove frameless if not floating
|
||||||
|
|
||||||
|
const Qt::KeyboardModifiers km = QGuiApplication::queryKeyboardModifiers();
|
||||||
|
const bool shift = km.testFlag(Qt::ShiftModifier);
|
||||||
|
|
||||||
this->setFloating(floating);
|
this->setFloating(floating);
|
||||||
this->setAlwaysOnTop(m_alwaysOnTop);
|
this->setAlwaysOnTop(m_alwaysOnTop && floating);
|
||||||
|
|
||||||
|
if (shift && floating) { this->resetPosition(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
void CDockWidget::toggleVisibility()
|
void CDockWidget::toggleVisibility()
|
||||||
|
|||||||
Reference in New Issue
Block a user