Sergio Martins
392504e902
test: Add test for a bogus layout
...
The layout is creating holes when we skip restoring 1 dock widget
2023-01-05 22:34:30 +00:00
Sergio Martins
5b484a7dda
tests: Added a test for issue #326
...
Currently an XFAIL
2022-11-18 11:50:20 +00:00
Sergio Martins
4706392464
Amend last commit by using the shorter name, UseQtWindow
...
Still, one redundant flag was removed, but now, the one with
the long name.
For #314
2022-09-25 19:16:57 +01:00
Sergio Martins
3a9b583552
Remove uneeded FloatingWindowFlag::UseQtWindow
...
There's already DontUseQtToolWindowsForFloatingWindows
2022-09-25 19:05:59 +01:00
Sergio Martins
7ac6a31512
Allow to specify Qt::Tool or Qt::Window per floating window
2022-09-16 18:42:11 +01:00
Sergio Martins
ef1226187d
tests: Test DockWidgetBase::setFloatingWindowFlags()
2022-09-16 18:42:11 +01:00
Allen Winter
b61c26669b
cmake-format a bit prettier
2022-09-15 09:04:00 -04:00
Sergio Martins
f277d5efb7
Fix affinity of central frame
...
Fixes issue #245
(cherry-picked from commit f9e758d02f )
2022-09-05 22:57:02 +01:00
Sergio Martins
4691f9bfa5
Ran clang-format over the codebase
2022-07-12 11:28:05 +01:00
Allen Winter
460b898bea
cmake-lint, cmake-format CMake files
2022-07-09 09:11:45 -04:00
Sergio Martins
9f96eff663
Make numSideBySide_recursive() ignore invisible items
...
We have invisible items that just remember the position of
other items.
2022-06-02 16:30:02 +01:00
Sergio Martins
f5622732ce
Added ItemBoxContainer::tst_numSideBySide_recursive()
2022-06-02 13:59:20 +01:00
Sergio Martins
1f638d2c7a
tests|qtquick|Windows: Stabilize a test
...
The warning is benign and unrelated to anything kddw is doing
2022-04-05 17:26:38 +01:00
Sergio Martins
61cca1e5ec
Forward QCloseEvent to the MDI widgets too
...
Fixes case where docked MDI widgets were not able to block a close
2022-03-09 16:11:55 +00:00
Sergio Martins
7db9938b85
Fix MainWindow not propagating close events to docked widgets
...
Nested FloatingWindows already supported it, so make it consistent.
Personal take: In a non-docking world, users can override their
main window close event and prevent a close, to save a document
or such. However, in a docking world, the main window developer
won't know which widgets are docked, so forwarding needs to happen,
as some might have documents to save.
2022-03-09 15:47:02 +00:00
Sergio Martins
524dff9105
Don't try to restore to previous position if there isn't any
2022-03-07 16:36:38 +00:00
Sergio Martins
0099a19a82
Make redocking floating windows with tabs possible
...
TitleBar::isFloating() was returning false, while it should
have returned true.
Fixed by making isFloating() simpler and dumb. isFloating() should
only say if it belongs to a floating window or not. It shouldn't
contain any logic about whether button should be visible or not.
There's already logic elsewhere that will hide the float button
in case there's nesting.
Fixes issue #96 and #44
2022-03-07 15:56:15 +00:00
Sergio Martins
86419fd979
MDI: Fixed closing dock widget in MDI would close main window
...
We only close the window when the window is a FloatingWindow and
it's the last frame
2022-03-03 17:52:13 +00:00
Sergio Martins
412860abac
tests: Use QT_NO_KEYWORDS too
2022-02-12 14:43:37 +00:00
Sergio Martins
2eeb4aac27
Fix Item_p.h being exposed in public API
...
Forward declare Item instead
2022-02-12 14:37:19 +00:00
Sergio Martins
4824a398ab
Move DropIndicatorOverlayInterface::DropLocation enum to namespace scope
...
It's public now
2022-02-11 18:14:26 +00:00
Sergio Martins
4f8aac7df3
Fix floating windows not restoring to previous position
...
The dock widget wrapper that we deleted had that info. We need
to preserve it.
2022-02-04 16:57:44 +00:00
Sergio Martins
719803ecfa
Fix a test with offscreen QPA
...
We were pressing on pos 6,6 to start a drag but that triggered
a window resize instead.
2022-02-04 16:10:13 +00:00
Sergio Martins
f0ef24383b
Debug++
2022-02-04 16:10:13 +00:00
Sergio Martins
4f8b174a8d
Fixed Frame::isFloating() for the nested MDI case
2022-02-04 15:17:11 +00:00
Sergio Martins
481dae64c3
nested_mdi: Fix floating windows not going back to their previous location
...
When floating a mdi window that was nested in a drop area, clicking the
float button should put it back to the MDI area.
2022-01-30 02:55:02 +00:00
Sergio Martins
721795b113
Remove LastPosition struct, move its members to Position
...
It was an unneeded indirection that didn't provide added semantics
2022-01-29 19:29:03 +00:00
Sergio Martins
d0dcac6b03
Make DockWidgetBase::setMDIPosition|setMDISize support nesting
...
They now honour Option_MDINestable.
Before they would bail out assuming they weren't in a MDI area.
Now they look further up the hierarchy to find our MDIArea, if any.
2022-01-25 20:14:04 +00:00
Sergio Martins
2b1aa44eff
Fix crash when floating nested mdi
2022-01-24 19:18:55 +00:00
Sergio Martins
128645693c
nested_mdi: Fix DnD over dock widgets docked in MDI
...
Dragging was always detecting the main window's drop indicator
overlay. Make it transparent for mouse events, so that
QWidget::childAt() doesn't pick it, and we can see the inner
drop areas.
2022-01-23 23:31:50 +00:00
Sergio Martins
86bceb4c48
nested mdi: Fix detaching inner dock widgets
...
Only the outter-most MDI frame is dragged in MDI mode. The inner ones
are dragged in normal docking mode, they become real floating windows.
2022-01-23 21:46:37 +00:00
Sergio Martins
ea64aae861
tests++
2022-01-23 21:46:37 +00:00
Sergio Martins
d1645dff73
tests: Remove unneeded sleep
2022-01-23 21:46:37 +00:00
Sergio Martins
a72e018f3b
nested mdi: Also test floating a nested MDI
2022-01-23 21:46:37 +00:00
Sergio Martins
18457d80aa
nested mdi: Get rid of unneeded drop area mdi wrapper when floating
...
When floating, the FloatingWindow has its own DropArea for nesting.
We delete the redundant level of wrappers when floating.
2022-01-23 21:46:37 +00:00
Sergio Martins
9f6ec0244f
nested mdi: More tests for closing docks
2022-01-23 21:46:37 +00:00
Sergio Martins
747e987f28
test++
2022-01-23 21:46:37 +00:00
Sergio Martins
68e01c70ee
nested mdi: Delete wrappers once we close the last nested DW
2022-01-23 21:46:37 +00:00
Sergio Martins
296b2a3370
nested mdi: Fix MDI's frame title not being updated
...
Before we didn't need to update it because there was only 1
dock widget. But now, if there's more than one we need to set the
application's name instead of the dock widget's name as title.
2022-01-23 21:46:37 +00:00
Sergio Martins
65ced9604f
nested mdi: Fixed title bar visibility
...
When there's only one docked widget we only show 1 title bar.
Just like happens with a FloatingWindow
2022-01-23 21:46:37 +00:00
Sergio Martins
8c8f5a8fda
Introduce Option_MDINestable
...
Should allow MDI dock widgets to also accept drops.
Befor, each MDI "window" only had 1 dock widget, but now each
MDI "window" a layout of dock widgets.
This is implemented by nesting the actual dock widget inside
a wrapper drop area. This drop area gives the drop support.
There's still bugs and more tests to fix before merging.
2022-01-23 21:46:37 +00:00
Allen Winter
2fbe4f872e
Merge branch '1.5'
2022-01-20 08:15:23 -05:00
Allen Winter
93e60a743e
update copyright year
2022-01-20 08:05:26 -05:00
Sergio Martins
37567d3980
Introduce MDIArea, a widget that can host MDI dock widgets
...
This is a public wrapper to MDILayoutWidget. The latter is private
and has internals we don't want to expose. Instead create a public
class with a thin API.
You no longer need to create a MainWindowMDI to have MDI support.
You can now have a normal MainWindow (with normal docking) and
add some dock widget that as a MDIArea as widget.
2022-01-07 17:13:16 +00:00
Sergio Martins
6cef4cea2c
Port frameParent() to firstParentOfType()
2022-01-07 14:59:33 +00:00
Sergio Martins
aea2bf971b
Add TestDocks::tst_mdi_mixed_with_docking
...
Tests that we can dock a MDI Layout.
Meaning the main window would support both docking and MDI.
This basic test passes. But there's still a lot of bugs to fix
2022-01-07 12:50:25 +00:00
Sergio Martins
c8b22e7ea5
Fix "Unpin" button not showing up in overlayed widgets
2021-11-18 12:15:23 +00:00
Sergio Martins
8dcaaaf853
tests|Qt6: Ignore benign warning coming from QQC material style
...
Needs to be fixed in Qt
2021-11-17 17:00:16 +00:00
Sergio Martins
099c7eafc8
tests: Fix QtQuick tests
...
normal geometry isn't supported for QWindow, only QWidget.
2021-11-17 15:41:50 +00:00
Sergio Martins
f872d6fbc1
tests: Fix issue found by ASAN
...
We need to ungrab the window before deleting it.
2021-11-17 15:12:06 +00:00