Introduce "Maximize/restore" title bar button support
As happens with other docking frameworks: - Maximized/restore button only visible when window is floating - floating button is never visible Available by setting Flag_TitleBarHasMaximizeButton. Added example too. Fixes: #37
This commit is contained in:
@@ -79,6 +79,9 @@ int main(int argc, char **argv)
|
||||
QCommandLineOption nonDockable("d", QCoreApplication::translate("main", "DockWidget #9 will be non-dockable"));
|
||||
parser.addOption(nonDockable);
|
||||
|
||||
QCommandLineOption maximizeButton("b", QCoreApplication::translate("main", "DockWidgets have maximize/restore buttons instead of float/dock button"));
|
||||
parser.addOption(maximizeButton);
|
||||
|
||||
#if defined(DOCKS_DEVELOPER_MODE)
|
||||
QCommandLineOption noCentralFrame("c", QCoreApplication::translate("main", "No central frame"));
|
||||
parser.addOption(noCentralFrame);
|
||||
@@ -106,6 +109,9 @@ int main(int argc, char **argv)
|
||||
if (parser.isSet(reorderTabsOption))
|
||||
flags |= KDDockWidgets::Config::Flag_AllowReorderTabs;
|
||||
|
||||
if (parser.isSet(maximizeButton))
|
||||
flags |= KDDockWidgets::Config::Flag_TitleBarHasMaximizeButton;
|
||||
|
||||
if (parser.isSet(lazyResizeOption))
|
||||
flags |= KDDockWidgets::Config::Flag_LazyResize;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user