Sergio Martins
4e3197388e
Add a failing TestDocks::tst_maxSizePropagates
2020-05-28 17:47:57 +01:00
Sergio Martins
d07f715ed7
updateTitleBarVisibility after deserializing
...
Fixes floating window having two title bars
2020-05-26 21:53:51 +01:00
Sergio Martins
87c7a8ad65
Add unit-test for the previous commit
2020-05-26 20:17:37 +01:00
Sergio Martins
7634438f6c
Add unit-test to previous commit
2020-05-25 23:30:31 +01:00
Sergio Martins
e08a7a6725
Fix tst_lastFloatingPositionIsRestored when there's a frame
...
Otherwise only passes on offscreen qpa which has no frame
2020-05-25 22:19:05 +01:00
Sergio Martins
63c90875aa
example: Add example of docking main window into main window
2020-05-25 21:45:21 +01:00
Sergio Martins
de09d5532f
Fix DropArea::numFrames()
...
Was counting with placeholder items too. This should fix title bars
being wrong in some cases.
2020-05-25 20:12:29 +01:00
Sergio Martins
944138273f
Tests: stabilize tst_embeddedMainWindow
...
Going 50px into the window was too short and didn't reach the embedded
window to show the indicators.
Also, it's the inner indicator we want, the other isn't visible as the
window is single frame
2020-05-25 20:11:01 +01:00
Sergio Martins
d94263fce5
Allow each dock widget and main window to support multiple affinities
2020-05-25 14:14:17 +01:00
Sergio Martins
8461f1f79e
kddockwidgets_multisplitter is now a library of its own
2020-05-25 06:45:13 +01:00
Sergio Martins
ab90da3b19
Readability: Rename Item::guest() and Item::widget()
...
Their name wasn't matching their return value
2020-05-24 20:52:23 +01:00
Sergio Martins
45f4d9f6a8
Item no longer depends on QWidget
2020-05-24 20:47:58 +01:00
Sergio Martins
ba49e1cbe2
Separator no longer inherits from QWidget
...
Only SeparatorWidget does
2020-05-24 20:29:49 +01:00
Sergio Martins
de0bcf9ce3
readability: Rename asWidget() to asQWidget()
2020-05-24 20:03:02 +01:00
Sergio Martins
c31edd0cd8
Remove a stray qDebug
2020-05-24 18:30:56 +01:00
Sergio Martins
16aac70510
Make MultiSplitter inherit from Layouting::Widget too
...
Since it's the host widget.
Fixes the Widget wrapper leaking. And no need for so much boiler-plate
2020-05-24 18:25:19 +01:00
Sergio Martins
e28f82dcad
Make Item::hostWidget be a Layouting::Widget instead of QWidget
...
Just an abstraction preparing for QQuickItem support
2020-05-24 17:31:37 +01:00
Sergio Martins
9ad6eefa7a
Add Layouting::Config
...
To host many of the scatered static member variables which
held some settings that rarely change
2020-05-23 18:40:20 +01:00
Sergio Martins
2527b39368
Moved the multisplitter wrapper outside of multisplitter/
...
As it depends on kddw framework, while multisplitter/ is the
agnostic layouting engine
2020-05-23 17:01:20 +01:00
Sergio Martins
71c7a7c9a9
Move more ItemContainer members to private
2020-05-23 16:46:43 +01:00
Sergio Martins
6d44362991
DockWidget::setFloating(true): restore to previous floating position
...
When floating a dock widget we restore it to the last known floating
position now
2020-05-22 11:12:12 +01:00
Sergio Martins
ce7c913f8c
Move the last floating geometry 1 level up
...
So it's not overwritten.
Added a unit-test for testing that floating geometry doesn't break
2020-05-21 19:32:18 +01:00
Sergio Martins
b4526b007c
Make LastPositions::lastPosition private
...
Need to control how the setters are messing with it, to add more
of them
2020-05-21 18:56:44 +01:00
Sergio Martins
9779b8edc3
Deal in terms of LastPositions instead of the individual position
...
Just a refactoring to add more encapsulation
2020-05-21 17:43:51 +01:00
Sergio Martins
50934ae56d
Use a shared_ptr for Position, so we can pass LastPositions by value
2020-05-21 17:19:54 +01:00
Sergio Martins
f260a76f8b
Rename LastPosition to Position
...
so we can have a list of them, the dock widget might have been
in several main windows
2020-05-21 14:49:49 +01:00
Sergio Martins
6de5860e9a
Don't allow to drop to itself when having mainwindow inside dock widget
2020-05-20 16:33:48 +01:00
Sergio Martins
af22e3e12d
Fix tst_raise on XCB
2020-05-19 13:44:01 +01:00
Sergio Martins
9e198917f0
Try to recover from loading an invalid layout
2020-05-19 12:35:33 +01:00
Sergio Martins
4647814aae
Fix tests with Qt 5.9
...
QTabWidget is a bit flaky and changes min width at unexpected times.
Which is fine but we can't compare against the expected min size
since it changes. So just check sanity of the restored layout
2020-05-17 17:12:31 +01:00
Sergio Martins
d0b36cf932
add ctest to tst_multisplitter too
...
moved up otherwise the multisplitter one was being generated in
a different folder
2020-05-14 22:29:19 +01:00
Sergio Martins
d44a6f78b8
Fix build with older Qt
2020-05-14 21:10:46 +01:00
Sergio Martins
be1a2a3878
Fix build on Windows
2020-05-13 20:04:48 +01:00
Sergio Martins
b7cb6afa49
Item: Also position the opposite position, not just the length
...
Fixes fuzzer test 20.json
2020-05-13 19:39:30 +01:00
Sergio Martins
0db40953ac
fuzzer: don't dump invalid operations to the JSON
2020-05-13 19:37:47 +01:00
Sergio Martins
137cf017c4
fuzzer: add a nice place to set a breakpoint
2020-05-13 19:37:47 +01:00
Sergio Martins
68acdaeb9a
Fix Items not being connected to their parent after a restore
...
Missing connectToParent() calls.
2020-05-13 12:24:46 +01:00
Sergio Martins
4dea453e7c
fuzzer: Trim failling test
2020-05-11 00:25:09 +01:00
Sergio Martins
ca52d6f760
fuzzer: Add a failing test
2020-05-11 00:05:00 +01:00
Sergio Martins
5eff4f8df8
fuzzer: fix dumping to JSON skipping some operations
...
Operations that don't have any parameters werent being saved
2020-05-11 00:04:26 +01:00
Sergio Martins
cc2aa13eb7
fuzzer: Fix dockByName() returning nullptr
...
dockStr() is just for printing purposes
2020-05-10 23:44:48 +01:00
Sergio Martins
550d84ab11
Rename for readability
2020-05-10 22:26:40 +01:00
Sergio Martins
f6f70f26e4
Item: Also pass the neighbour shrink strategy all along
...
So we can choose another one when restoring a child
2020-05-10 22:17:59 +01:00
Sergio Martins
c4df3600af
tst_docks|fuzzer: Use offscreen QPA by default too
2020-05-10 21:26:52 +01:00
Sergio Martins
7c85c1eb0f
Resize the layout after restoring
...
After restoring, we need to put the layout at the same size
as its widget. Most of the times this happens since we also restore
the widget's geometry. But really make sure, as something might happen
to the window geometry, like for example using RestoreOption_RelativeToMainWindow
which doesn't restore the main window geometries
2020-05-09 00:46:30 +01:00
Sergio Martins
addf436fd0
LayoutSaver: Don't load old serialization versions
2020-05-08 19:30:41 +01:00
Sergio Martins
ff6260a4dc
tests: Add a failling test tst_invalidLayoutAfterRestore
...
And a JSON file that makes it fail
2020-05-08 18:40:23 +01:00
Sergio Martins
3c1ab0126d
Item: Clear and honour a bunch of TODOs
2020-05-07 18:49:00 +01:00
Sergio Martins
0df9943aa5
Fix fuzzer test 11.json and other tests that worked by luck
...
mapFrom/toRoot were wrong
2020-05-07 16:30:45 +01:00
Sergio Martins
535a0c943c
Remove some cruft, bunch of unused methods from old layouting engine
2020-05-04 23:37:04 +01:00