|
24 | 24 | - [`FloatingContainerHasWidgetIcon`](#floatingcontainerhaswidgeticon)
|
25 | 25 | - [`HideSingleCentralWidgetTitleBar`](#hidesinglecentralwidgettitlebar)
|
26 | 26 | - [`FocusHighlighting`](#focushighlighting)
|
| 27 | + - [`EqualSplitOnInsertion`](#equalsplitoninsertion) |
| 28 | + - [`FloatingContainerForceNativeTitleBar` (Linux only)](#floatingcontainerforcenativetitlebar-linux-only) |
| 29 | + - [`FloatingContainerForceQWidgetTitleBar` (Linux only)](#floatingcontainerforceqwidgettitlebar-linux-only) |
| 30 | +- [Central Widget](#central-widget) |
27 | 31 | - [Styling](#styling)
|
28 | 32 | - [Disabling the Internal Style Sheet](#disabling-the-internal-style-sheet)
|
29 | 33 |
|
@@ -409,6 +413,81 @@ bool CMainWindow::eventFilter(QObject *watched, QEvent *event)
|
409 | 413 | }
|
410 | 414 | ```
|
411 | 415 |
|
| 416 | +### `EqualSplitOnInsertion` |
| 417 | + |
| 418 | +This flag configures how the space is distributed if a new dock widget is |
| 419 | +inserted into an existing dock area. The flag is disabled by default. If 3 |
| 420 | +dock widgets are inserted with the following code |
| 421 | + |
| 422 | +```c++ |
| 423 | +d->DockManager->addDockWidget(ads::RightDockWidgetArea, DockWidget, EditorArea); |
| 424 | +``` |
| 425 | +
|
| 426 | +then this is the result, if the flag is disabled: |
| 427 | +
|
| 428 | + |
| 429 | +
|
| 430 | +If the flag is enabled, then the space is equally distributed to all widgets |
| 431 | +in a splitter: |
| 432 | +
|
| 433 | + |
| 434 | +
|
| 435 | +
|
| 436 | +### `FloatingContainerForceNativeTitleBar` (Linux only) |
| 437 | +
|
| 438 | +Since release 3.6 the library supports native titlebars and window decorations |
| 439 | +for floating widgets on Linux (thanks to a user contribution). |
| 440 | +Native titlebars and window decorations are supported by most Linux window |
| 441 | +managers, such as Compiz or Xfwm. Some window managers like KWin do not properly |
| 442 | +support this feature. Native floating widgets look better because of the native |
| 443 | +styling and the support all window manager features like snapping to window |
| 444 | +borders or maximizing. The library tries to detect the window manager and |
| 445 | +activates native window decorations if possible: |
| 446 | +
|
| 447 | + |
| 448 | +
|
| 449 | +If you would like to overwrite this autodetection, then you can activate this |
| 450 | +flag to force native window titlebars. You can overwrite autodetection and this |
| 451 | +flag, if you set the environment variable `ADS_UseNativeTitle` to 0 or 1. |
| 452 | +
|
| 453 | +### `FloatingContainerForceQWidgetTitleBar` (Linux only) |
| 454 | +
|
| 455 | +If your window manager (i.e. KWin) does not properly support native floating |
| 456 | +windows, the docking library falls back to QWidget based titlebars for |
| 457 | +floating widgets. |
| 458 | +
|
| 459 | + |
| 460 | +
|
| 461 | +If you would like to overwrite autodetection, thne you can activate this flag |
| 462 | +to force QWidget based titlebars. You can overwrite autodetection and this |
| 463 | +flag, if you set the environment variable `ADS_UseNativeTitle` to 0 or 1. |
| 464 | +
|
| 465 | +## Central Widget |
| 466 | +
|
| 467 | +The Advanced Docking System has been developed to overcome the limitations of |
| 468 | +the native Qt docking system with its central widget concept. This was the |
| 469 | +reason that until version 3.6 of the library, there was no support for such |
| 470 | +thing like a central widget. Thanks to the contribution of a user the library |
| 471 | +now supports a central widget. |
| 472 | +
|
| 473 | +In the Advanced Docking System a central widget is a docking widget that is |
| 474 | +neither closable nor movable or floatable. A central widget has no title bar |
| 475 | +and so it is not possible for the user to hide, close or drag the central |
| 476 | +widget. Tf there is a central widget, then also the distribution of the sizes |
| 477 | +for the dock widgets around the central widget is different. If there is no |
| 478 | +central widget and the main windo is resized, then the available space is |
| 479 | +distributed to all dock widgets. If a central widget exists, then only the |
| 480 | +central widget is resized when resizing the main window. The dock widgets around |
| 481 | +the central widget keep their sizes. The following animation shows this: |
| 482 | +
|
| 483 | + |
| 484 | +
|
| 485 | +To set a centra widget, you just need to call the |
| 486 | +
|
| 487 | +```c++ |
| 488 | +auto* CentralDockArea = DockManager->setCentralWidget(CentralDockWidget); |
| 489 | +``` |
| 490 | + |
412 | 491 | ## Styling
|
413 | 492 |
|
414 | 493 | The Advanced Docking System supports styling via [Qt Style Sheets](https://doc.qt.io/qt-5/stylesheet.html). All components like splitters, tabs, buttons, titlebar and
|
|
0 commit comments