Add preferredAutoHideSideBarLocation property to CDockWidget that allows
applications to specify where a widget should be pinned, overriding
geometry-based detection. When unpinning, widgets with the same preferred
location merge as tabs instead of creating new splits.
Default is SideBarNone (existing geometry-based behavior preserved).
* Initial plan
* Fix drawing artifacts when content widgets call winId()
When a content widget (e.g. VTK/OpenGL) calls winId() to get a native
window handle, Qt propagates native-window creation up the ancestor chain.
This makes CDockWidget, CDockAreaWidget, and CDockContainerWidget all
become native OS windows unexpectedly. Reparenting these native dock
widgets during floating or resizing then causes drawing artifacts.
Fix: set Qt::WA_DontCreateNativeAncestors on the content widget in
CDockWidget::setWidget() to stop native-window creation from propagating
up into the dock hierarchy.
Co-authored-by: RubendeBruin <34062862+RubendeBruin@users.noreply.github.com>
* Fix docking system to handle mix of native and alien Qt widgets
Three targeted fixes for the native/alien widget mixing problem:
1. Revert WA_DontCreateNativeAncestors from CDockWidget::setWidget().
Setting it on the content widget created a broken native-inside-alien
hierarchy: the QScrollArea (alien) could not clip its native child, so
content escaped the scrollbox bounds; and alien CAutoHideDockContainer
could not appear above the native content widget.
Allowing natural propagation means QScrollArea also goes native, and OS
parent/child window clipping works correctly.
2. Fix CDockContainerWidget::removeDockArea to use internalWinId() instead
of testAttribute(WA_NativeWindow). WA_NativeWindow is only set when a
widget is explicitly made native; widgets that became native through
upward propagation from a descendant calling winId() have a real native
window handle (internalWinId() != 0) but WA_NativeWindow may be unset.
Setting their parent to nullptr would create a free-floating invisible
OS window and cause drawing artifacts.
3. Fix CAutoHideDockContainer::collapseView: when the parent dock container
is native but the auto-hide panel is still alien, promote the panel to a
native window (winId()) before raise(). The OS always renders native
child windows above a parent window's painted alien content, so an alien
auto-hide panel can never appear above native sibling dock areas. Once
the panel has its own OS-level window, raise() operates on OS Z-order
and correctly places it above native content siblings.
Co-authored-by: RubendeBruin <34062862+RubendeBruin@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
* Fix ADS_VERSION support for builds without git dependency
- Move CMAKE_MODULE_PATH outside if(NOT ADS_VERSION) block so it's always available
- Parse ADS_VERSION to set PROJECT_VERSION_* variables for Versioning.cmake
- Update Versioning.cmake to use predefined version when available, fallback to git
This allows building with -DADS_VERSION=X.Y.Z without requiring git repository.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
* Add ADS_PLATFORM_DIR option to customize output directory
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
---------
Co-authored-by: ArtemNabok <nabok.artem@yandex.ru>
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit sets the library's SOVERSION to its major version number.
Setting the soname this way establishes a clear ABI promise. This allows
users to safely upgrade to minor or patch releases without needing to
recompile their applications, as long as the major version remains the
same.