Allows to improve on Flag_HideTitleBarWhenTabsVisible.
Flag_HideTitleBarWhenTabsVisible will hide title bar regardless
if the window is floating or docked. By enabling Flag_AlwaysTitleBarWhenFloating
the title bar will only be hidden if docked.
Demo: ./bin/kddockwidgets_example -qt
Fixes#64
Our example was being built as part of KDDW, so that worked fine.
Now it can also be built with an installed KDDW.
Problem was the folder hiearchy in the installed include dir
didn't match the folder hiearchy in the source repo
Fixes#62
Cherry-picked from master's 037fa76fff
1.0 makes more sense
Our example was being built as part of KDDW, so that worked fine.
Now it can also be built with an installed KDDW.
Problem was the folder hiearchy in the installed include dir
didn't match the folder hiearchy in the source repo
Fixes#62
When clicking on a TitleBar the focus will be redirected to either:
- Last widget that had focus inside the scope
- To the DockWidget. Implies the user setting a guest widget that
accepts focus
Fixes: #56
Github issue #56 is not a KDDW bug, it's how Qt works. QtWidgets don't
have focus scope. But let's workaround and handroll our own FocusScope.
Now the title bar can be colored differently if the dock widget it controls
contains any focused children.
This just implements half of the story. You have to focus a child
for the title bar to change color. Clicking the title bar directly
isn't done yet. Needs to be figured out. What do we focus when clicking it?
TitleBars usually don't care about keyboard focus. Probably we
just use the user's widget as a focus proxy.
The layouting was becoming too complex to maintain and to introduce
new features. Was even buggy, the fuzzer was constantly finding
bugs, which took hours to workaround.
Problem with the old layout engine is that there was a catch 22, between
Items driving the separators, and separators driving the anchors.
The new layout is much simpler, both in implementation and conceptually.
There's simply a recursive hierarchy of Item elements. An Item can either
have a QWidget to show, or be a ItemContainer, which contains Item children,
and so forth. Each ItemContainer is either vertical or horizontal. That's enough
to represent the "nested multi-splitter" concept which KDDW uses.
After each item insertion/deletion/resize, the separators are regenerated. They
are essentially dumb now.
TODO:
- Separators are drawn, but are not interactive yet
- There's 5 tests failing
- LayoutSaver scalling functionality
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