Allow to set a custom title for all FloatingContainer (#454)
This commit is contained in:
@@ -433,7 +433,7 @@ struct FloatingDockContainerPrivate
|
||||
}
|
||||
else
|
||||
{
|
||||
setWindowTitle(qApp->applicationDisplayName());
|
||||
setWindowTitle(floatingContainersTitle());
|
||||
}
|
||||
|
||||
// reflect CurrentWidget's icon if configured to do so, otherwise display application icon as window icon
|
||||
@@ -453,6 +453,18 @@ struct FloatingDockContainerPrivate
|
||||
* Handles escape key press when dragging around the floating widget
|
||||
*/
|
||||
void handleEscapeKey();
|
||||
|
||||
/**
|
||||
* Returns the title used by all FloatingContainer that does not
|
||||
* reflect the title of the current dock widget.
|
||||
*
|
||||
* If not title was set with CDockManager::setFloatingContainersTitle(),
|
||||
* it returns QGuiApplication::applicationDisplayName().
|
||||
*/
|
||||
static QString floatingContainersTitle()
|
||||
{
|
||||
return CDockManager::floatingContainersTitle();
|
||||
}
|
||||
};
|
||||
// struct FloatingDockContainerPrivate
|
||||
|
||||
@@ -985,7 +997,7 @@ void CFloatingDockContainer::onDockAreasAddedOrRemoved()
|
||||
SLOT(onDockAreaCurrentChanged(int)));
|
||||
d->SingleDockArea = nullptr;
|
||||
}
|
||||
d->setWindowTitle(qApp->applicationDisplayName());
|
||||
d->setWindowTitle(d->floatingContainersTitle());
|
||||
setWindowIcon(QApplication::windowIcon());
|
||||
}
|
||||
}
|
||||
@@ -1012,7 +1024,7 @@ void CFloatingDockContainer::updateWindowTitle()
|
||||
}
|
||||
else
|
||||
{
|
||||
d->setWindowTitle(qApp->applicationDisplayName());
|
||||
d->setWindowTitle(d->floatingContainersTitle());
|
||||
setWindowIcon(QApplication::windowIcon());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user