mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-12-26 08:01:32 +08:00
Fixed vertical alignment of label in FloatingWidgetTitleBar
Added call to FloatingWidget->finishDragging()
This commit is contained in:
parent
02143eac71
commit
5b3a0a28df
@ -77,7 +77,7 @@ void FloatingWidgetTitleBarPrivate::createLayout()
|
|||||||
TitleLabel->setElideMode(Qt::ElideRight);
|
TitleLabel->setElideMode(Qt::ElideRight);
|
||||||
TitleLabel->setText("DockWidget->windowTitle()");
|
TitleLabel->setText("DockWidget->windowTitle()");
|
||||||
TitleLabel->setObjectName("floatingTitleLabel");
|
TitleLabel->setObjectName("floatingTitleLabel");
|
||||||
TitleLabel->setAlignment(Qt::AlignLeft);
|
TitleLabel->setAlignment(Qt::AlignLeft | Qt::AlignVCenter);
|
||||||
|
|
||||||
CloseButton = new tCloseButton();
|
CloseButton = new tCloseButton();
|
||||||
CloseButton->setObjectName("floatingTitleCloseButton");
|
CloseButton->setObjectName("floatingTitleCloseButton");
|
||||||
@ -145,6 +145,10 @@ void CFloatingWidgetTitleBar::mousePressEvent(QMouseEvent *ev)
|
|||||||
void CFloatingWidgetTitleBar::mouseReleaseEvent(QMouseEvent *ev)
|
void CFloatingWidgetTitleBar::mouseReleaseEvent(QMouseEvent *ev)
|
||||||
{
|
{
|
||||||
d->DragState = DraggingInactive;
|
d->DragState = DraggingInactive;
|
||||||
|
if (d->FloatingWidget)
|
||||||
|
{
|
||||||
|
d->FloatingWidget->finishDragging();
|
||||||
|
}
|
||||||
Super::mouseReleaseEvent(ev);
|
Super::mouseReleaseEvent(ev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user