Changed initial position of floating widgets

This commit is contained in:
Uwe Kindler 2019-11-28 13:35:58 +01:00
parent a1de28c969
commit 3332f6050e
3 changed files with 10 additions and 3 deletions

View File

@ -234,6 +234,7 @@ void MainWindowPrivate::createContent()
auto FloatingWidget = DockManager->addDockWidgetFloating(DockWidget);
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);

View File

@ -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