mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2025-01-12 16:20:25 +08:00
Changed initial position of floating widgets
This commit is contained in:
parent
a1de28c969
commit
3332f6050e
@ -232,8 +232,9 @@ void MainWindowPrivate::createContent()
|
||||
// Test creation of floating dock widgets
|
||||
DockWidget = createFileSystemTreeDockWidget(ViewMenu);
|
||||
auto FloatingWidget = DockManager->addDockWidgetFloating(DockWidget);
|
||||
FloatingWidget->move(QPoint(0,0));
|
||||
FloatingWidget->move(QPoint(0, 0));
|
||||
FloatingWidget = DockManager->addDockWidgetFloating(createLongTextLabelDockWidget(ViewMenu));
|
||||
FloatingWidget->move(QPoint(100, 100));
|
||||
|
||||
auto Action = ui.menuView->addAction(QString("Set %1 floating").arg(DockWidget->windowTitle()));
|
||||
DockWidget->connect(Action, SIGNAL(triggered()), SLOT(setFloating()));
|
||||
@ -326,7 +327,7 @@ CMainWindow::CMainWindow(QWidget *parent) :
|
||||
|
||||
// uncomment the follwing line if you want to use non opaque undocking and splitter
|
||||
// moevements
|
||||
//CDockManager::setConfigFlags(CDockManager::DefaultNonOpaqueConfig);
|
||||
CDockManager::setConfigFlags(CDockManager::DefaultNonOpaqueConfig);
|
||||
|
||||
// Now create the dock manager and its content
|
||||
d->DockManager = new CDockManager(this);
|
||||
|
@ -509,7 +509,7 @@ void CFloatingDockContainer::startFloating(const QPoint &DragStartMousePos,
|
||||
#ifdef Q_OS_LINUX
|
||||
if (DraggingFloatingWidget == DragState)
|
||||
{
|
||||
setAttribute(Qt::WA_X11NetWmWindowTypeDock, true);
|
||||
setAttribute(Qt::WA_X11NetWmWindowTypeDock, true);
|
||||
d->MouseEventHandler = MouseEventHandler;
|
||||
if (d->MouseEventHandler)
|
||||
{
|
||||
|
@ -177,6 +177,12 @@ CFloatingOverlay::CFloatingOverlay(QWidget* Content, QWidget* parent) :
|
||||
setAttribute(Qt::WA_TranslucentBackground);
|
||||
}
|
||||
|
||||
#ifdef Q_OS_LINUX
|
||||
auto Flags = windowFlags();
|
||||
Flags |= Qt::WindowStaysOnTopHint | Qt::X11BypassWindowManagerHint;
|
||||
setWindowFlags(Flags);
|
||||
#endif
|
||||
|
||||
setWindowOpacity(0.6);
|
||||
// We install an event filter to detect mouse release events because we
|
||||
// do not receive mouse release event if the floating widget is behind
|
||||
|
Loading…
Reference in New Issue
Block a user