From 5b3a0a28df57ef3e1af1ce6863e0c0ace653d597 Mon Sep 17 00:00:00 2001 From: Uwe Kindler Date: Fri, 13 Dec 2019 13:19:24 +0100 Subject: [PATCH] Fixed vertical alignment of label in FloatingWidgetTitleBar Added call to FloatingWidget->finishDragging() --- src/linux/FloatingWidgetTitleBar.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/linux/FloatingWidgetTitleBar.cpp b/src/linux/FloatingWidgetTitleBar.cpp index c4c1c7c..babcaaa 100644 --- a/src/linux/FloatingWidgetTitleBar.cpp +++ b/src/linux/FloatingWidgetTitleBar.cpp @@ -77,7 +77,7 @@ void FloatingWidgetTitleBarPrivate::createLayout() TitleLabel->setElideMode(Qt::ElideRight); TitleLabel->setText("DockWidget->windowTitle()"); TitleLabel->setObjectName("floatingTitleLabel"); - TitleLabel->setAlignment(Qt::AlignLeft); + TitleLabel->setAlignment(Qt::AlignLeft | Qt::AlignVCenter); CloseButton = new tCloseButton(); CloseButton->setObjectName("floatingTitleCloseButton"); @@ -145,6 +145,10 @@ void CFloatingWidgetTitleBar::mousePressEvent(QMouseEvent *ev) void CFloatingWidgetTitleBar::mouseReleaseEvent(QMouseEvent *ev) { d->DragState = DraggingInactive; + if (d->FloatingWidget) + { + d->FloatingWidget->finishDragging(); + } Super::mouseReleaseEvent(ev); }