Sergio Martins
3f2f515553
Comment tests that are still failing
2019-08-01 16:56:30 +01:00
Sergio Martins
9acfa2b9bf
Add a failing test
2019-08-01 15:06:42 +01:00
Sergio Martins
1ac027c201
Don't show the DockWidget that's about to be restored
2019-08-01 10:58:37 +01:00
Sergio Martins
9fd4df484d
Add test for DockWidgetFactoryFunc
2019-08-01 10:50:40 +01:00
Sergio Martins
990a98d7d9
Fix tests
...
Some QToolButtons are deleted later
2019-07-30 22:52:57 +01:00
Sergio Martins
cdff9b3eaa
Some renaming
2019-07-30 16:59:29 +01:00
Sergio Martins
9979696567
Fix being able to drag a FloatingWindow when dragging its body
...
We should only be able to drag via title bars, not widget
background.
This separates the concept of Draggable and Window, previously
they were mixed a bit. The draggable is something you drag,
usually a TitleBar, a Tab, or if using native window decorations
then FloatingWindow is also a draggable. Then, for each draggable
there's the actual window being dragged, that's always a FloatingWindow.
We should grab the mouse of the draggable.
2019-07-30 12:50:42 +01:00
Sergio Martins
77a61aed23
Preserve Anchor position percentage after restore
2019-07-29 21:18:29 +01:00
Sergio Martins
7bcafb6ee3
Preserve anchor position percentage when restoring a maximized window
2019-07-29 20:31:51 +01:00
Sergio Martins
90cbd9731a
Fix anchors being out of bounds when consoming another multi splitter
...
dropping a multi splitter into another one wasn't honouring the bounds
of the donor's inner anchors
2019-07-29 18:54:09 +01:00
Sergio Martins
158c6157b5
Don't resize horizontal anchors when resizing window width
...
Similar for height
2019-07-29 18:53:29 +01:00
Sergio Martins
fd0b594331
Save the geometry of the actual top-level window
...
In case we have a main window embedded in another widget
2019-07-27 18:56:29 +01:00
Sergio Martins
1a8a409f6f
Fix some out of bounds positionings
...
When calculating the cumulative min length some anchor thicknesses
were being accounted for because we had cleared the placeholders
2019-07-26 14:21:57 +01:00
Sergio Martins
d0be94e2dd
Also update Item's minSize before restoring placeholder
2019-07-26 11:52:21 +01:00
Sergio Martins
4d9424e330
tests++
2019-07-26 10:50:49 +01:00
Sergio Martins
d7c5052e8f
Disable fuzzer for now, we'll re-enable it when it can do N runs
2019-07-26 10:50:13 +01:00
Sergio Martins
f5e72e7bed
Fix available space calculation when there's placeholders
...
When layout is empty we don't need to account for the space
occupied by the new anchor. But neither when all the items
are placeholders
2019-07-25 23:15:12 +01:00
Sergio Martins
e4d1c92b8a
Simplify test, this is enough to repro
2019-07-25 21:23:27 +01:00
Sergio Martins
d13ae5f03a
Add a failing test
2019-07-25 19:32:07 +01:00
Sergio Martins
e58cab181a
Don't crash when restoring after a resize
2019-07-25 18:20:05 +01:00
Sergio Martins
6ca50aecc7
Update the frame geometry when restoring the item
2019-07-25 17:17:27 +01:00
Sergio Martins
c645b8d9fa
Fix test that was failing on XCB and Windows but not on offscreen
...
Not sure why it didn't fail
2019-07-25 14:41:54 +01:00
Sergio Martins
5befd7a3d5
restore: Also restore the ITem's min-size
2019-07-25 10:02:14 +01:00
Sergio Martins
a5ee3cec27
Before closing really close all the dock widgets
...
The user app was able to ignore the QCloseEvent and the widget
wouldn't close, which would then mean it was deleted by it's parent
Frame during restore
2019-07-24 23:10:55 +01:00
Sergio Martins
c9b596238c
Add a failing test
2019-07-24 22:41:51 +01:00
Sergio Martins
dc7d5a925c
tests++
2019-07-24 17:39:55 +01:00
Sergio Martins
fd795d9925
Only restore placeholders after the items are created
2019-07-24 17:30:03 +01:00
Sergio Martins
edd0443055
Fix Anchor::m_initialized not being true after a restore
...
Was causing Anchor::updateItemSizes() to be skipped
2019-07-23 22:55:18 +01:00
Sergio Martins
976a846f14
Emit widgetCountChanged only at the end when restoring
...
Otherwise it triggers code that shouldn't run while restore
is in progress
2019-07-23 22:18:45 +01:00
Sergio Martins
c5842eb34d
Dont' reparent FloatingWindow when restoring it
...
Instead pass the correct parent from the beginning.
Otherwise causes a bug in X11 where the FloatingWindow would
disappear sometimes, even if isVisible() and geometry were correct.
The test doesn't really catch it, as the properties are correct,
but visually it can be seen. Commiting the test anyway.
2019-07-23 18:46:09 +01:00
Sergio Martins
edf1d74044
Reenable tst_restoreCrash, it passes
2019-07-23 18:04:56 +01:00
Sergio Martins
7c4a7caa40
Fix restored Frame not calling updateTitleBarVisibility()
...
It's called when parent changes. We could just call it after restoring
but I rather have the paths normalized, so now it uses the same path
when restoring as when adding
2019-07-23 17:42:46 +01:00
Sergio Martins
10c2b0fa77
Reenable layout storing
2019-07-23 17:08:54 +01:00
Sergio Martins
0243dd4ed4
Add a more complex test
2019-07-23 16:59:36 +01:00
Sergio Martins
f585f06422
Restore geometry of closed dock widgets too
2019-07-23 15:08:14 +01:00
Sergio Martins
6e550c05c5
When restoring FloatingWindow set the correct window flags
...
It wasn't being created as a window
2019-07-23 13:52:52 +01:00
Sergio Martins
a9a9e3b828
Be sure to have the static anchors set before calling addItems_internal()
2019-07-23 13:33:59 +01:00
Sergio Martins
d4ba1f3c8c
Don't keep stale static anchors around
2019-07-23 12:07:27 +01:00
Sergio Martins
0e1b473db7
Also restore item's anchors
2019-07-23 11:35:00 +01:00
Sergio Martins
574b9fbfa3
Set frame visible when restoring it
2019-07-22 23:05:53 +01:00
Sergio Martins
8cca303e1b
Delete Frame immediately instead of deleteLater when possible
...
Otherwise a LayoutSaver::saveLayout() will count with those frames
that aren't deleted yet and are keeping Items alive.
Also easier for tests, not so many waitForDeleted() needed
2019-07-22 18:40:01 +01:00
Sergio Martins
7e02d2d953
Fix tests broken due to non-unique MainWindow/DockWidget names
2019-07-22 17:50:22 +01:00
Sergio Martins
947969438d
LayoutSaver: Make the deserializer match the serializer
...
They must be simmetric
2019-07-22 17:32:24 +01:00
Sergio Martins
ddb772d54f
Fix clazy build
2019-07-22 09:34:15 +01:00
Sergio Martins
5274c8a9fd
Rename method
2019-07-21 23:27:58 +01:00
Sergio Martins
ed2bd24f46
Fix crash while restoring empty layout
2019-07-21 20:29:42 +01:00
Sergio Martins
2b5ce7a197
Merge pull request #12 from KDAB/cmake_cleanup
...
Clean up cmake files
2019-07-20 22:46:16 +01:00
Sergio Martins
bb1a933137
Transform floating dock widgets into FloatingWindow
...
instead of waiting for the user to drag a window over it.
This makes it have better z-order, as the FloatingWindow is parented.
2019-07-20 22:15:24 +01:00
Sergio Martins
108cd96afe
Save floating geometry before hidding
...
So it shows at the correct position when shown
2019-07-20 17:19:20 +01:00
Mike Krus
1824eb6892
Clean up cmake files
...
Use modern syntax in most places.
2019-07-19 22:45:22 +01:00