Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 21 additions & 15 deletions src/DockOverlay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,27 +190,32 @@ struct DockOverlayCrossPrivate
}

l->setPixmap(createHighDpiDropIndicatorPixmap(size, DockWidgetArea, Mode));
#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)
l->setWindowFlags(Qt::ToolTip);
#else
l->setWindowFlags(Qt::Tool | Qt::FramelessWindowHint);
l->setAttribute(Qt::WA_TranslucentBackground);
l->setProperty("dockWidgetArea", DockWidgetArea);
return l;
}
#endif
l->setAttribute(Qt::WA_TranslucentBackground);
l->setProperty("dockWidgetArea", DockWidgetArea);
return l;
}

//============================================================================
void updateDropIndicatorIcon(QWidget* DropIndicatorWidget)
{
QLabel* l = qobject_cast<QLabel*>(DropIndicatorWidget);
//============================================================================
void updateDropIndicatorIcon(QWidget* DropIndicatorWidget)
{
QLabel* l = qobject_cast<QLabel*>(DropIndicatorWidget);
const qreal metric = dropIndicatiorWidth(l);
const QSizeF size(metric, metric);

int Area = l->property("dockWidgetArea").toInt();
l->setPixmap(createHighDpiDropIndicatorPixmap(size, (DockWidgetArea)Area, Mode));
}
}

//============================================================================
QPixmap createHighDpiDropIndicatorPixmap(const QSizeF& size, DockWidgetArea DockWidgetArea,
CDockOverlay::eMode Mode)
{
//============================================================================
QPixmap createHighDpiDropIndicatorPixmap(const QSizeF& size,
DockWidgetArea DockWidgetArea,
CDockOverlay::eMode Mode)
{
QColor borderColor = iconColor(CDockOverlayCross::FrameColor);
QColor backgroundColor = iconColor(CDockOverlayCross::WindowBackgroundColor);
QColor overlayColor = iconColor(CDockOverlayCross::OverlayColor);
Expand Down Expand Up @@ -404,7 +409,7 @@ CDockOverlay::CDockOverlay(QWidget* parent, eMode Mode) :
d->Mode = Mode;
d->Cross = new CDockOverlayCross(this);
#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)
setWindowFlags(Qt::Tool | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::X11BypassWindowManagerHint);
setWindowFlags(Qt::ToolTip | Qt::X11BypassWindowManagerHint);
#else
setWindowFlags(Qt::Tool | Qt::FramelessWindowHint);
#endif
Expand Down Expand Up @@ -739,7 +744,8 @@ CDockOverlayCross::CDockOverlayCross(CDockOverlay* overlay) :
{
d->DockOverlay = overlay;
#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)
setWindowFlags(Qt::Tool | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::X11BypassWindowManagerHint);
setWindowFlags(Qt::ToolTip | Qt::WindowStaysOnTopHint
| Qt::X11BypassWindowManagerHint);
#else
setWindowFlags(Qt::Tool | Qt::FramelessWindowHint);
#endif
Expand Down
10 changes: 7 additions & 3 deletions src/FloatingDragPreview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,13 @@ CFloatingDragPreview::CFloatingDragPreview(QWidget* Content, QWidget* parent) :
}
else
{
setWindowFlags(Qt::Tool | Qt::FramelessWindowHint);
setAttribute(Qt::WA_NoSystemBackground);
setAttribute(Qt::WA_TranslucentBackground);
#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)
setWindowFlags(Qt::ToolTip);
#else
setWindowFlags(Qt::Tool | Qt::FramelessWindowHint);
#endif
setAttribute(Qt::WA_NoSystemBackground);
setAttribute(Qt::WA_TranslucentBackground);
}

#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)
Expand Down