mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2025-01-24 13:32:06 +08:00
Fixed some small bugs in drop indicator painting
This commit is contained in:
parent
7ba3c1f244
commit
549646d113
@ -168,6 +168,13 @@ protected:
|
|||||||
*/
|
*/
|
||||||
virtual void mouseDoubleClickEvent(QMouseEvent *event) override
|
virtual void mouseDoubleClickEvent(QMouseEvent *event) override
|
||||||
{
|
{
|
||||||
|
// If this is the last dock area in a dock container it does not make
|
||||||
|
// sense to move it to a new floating widget and leave this one
|
||||||
|
// empty
|
||||||
|
if (m_DockArea->dockContainer()->isFloating() && m_DockArea->dockContainer()->dockAreaCount() == 1)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
startFloating(event->pos());
|
startFloating(event->pos());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -91,9 +91,11 @@ static QPixmap createDropIndicatorPixmap(const QPalette& pal, const QSizeF& size
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CDockOverlay::ModeContainerOverlay == Mode)
|
QSizeF baseSize = baseRect.size();
|
||||||
|
if (CDockOverlay::ModeContainerOverlay == Mode && DockWidgetArea != CenterDockWidgetArea)
|
||||||
{
|
{
|
||||||
baseRect = areaRect;
|
baseRect = areaRect;
|
||||||
|
areaRect = QRectF();
|
||||||
}
|
}
|
||||||
|
|
||||||
p.fillRect(baseRect, backgroundColor);
|
p.fillRect(baseRect, backgroundColor);
|
||||||
@ -126,11 +128,12 @@ static QPixmap createDropIndicatorPixmap(const QPalette& pal, const QSizeF& size
|
|||||||
|
|
||||||
// draw window title bar
|
// draw window title bar
|
||||||
p.setBrush(borderColor);
|
p.setBrush(borderColor);
|
||||||
QRectF FrameRect(baseRect.topLeft(), QSizeF(baseRect.width(), baseRect.height() / 10));
|
QRectF FrameRect(baseRect.topLeft(), QSizeF(baseRect.width(), baseSize.height() / 10));
|
||||||
p.drawRect(FrameRect);
|
p.drawRect(FrameRect);
|
||||||
p.restore();
|
p.restore();
|
||||||
|
|
||||||
if (CDockOverlay::ModeContainerOverlay == Mode)
|
// Draw arrow for outer container drop indicators
|
||||||
|
if (CDockOverlay::ModeContainerOverlay == Mode && DockWidgetArea != CenterDockWidgetArea)
|
||||||
{
|
{
|
||||||
QRectF ArrowRect;
|
QRectF ArrowRect;
|
||||||
ArrowRect.setSize(ShadowRect.size() * 0.7);
|
ArrowRect.setSize(ShadowRect.size() * 0.7);
|
||||||
|
Loading…
Reference in New Issue
Block a user