Sergio Martins
3f73a99a71
Update followers whenever the followee anchor is deleted
2019-07-10 16:10:30 +01:00
Sergio Martins
fa23d954b1
Add a failing unit-test
2019-07-10 15:34:13 +01:00
Sergio Martins
b8d5fefbf1
Allow to add a dock widget directly as a placeholder
...
So it's not visible at startup if not needed
2019-07-10 12:24:36 +01:00
Sergio Martins
9052d93794
Fix adding a widget to a layout that already contains it
...
It should work, since we can be moving a widget to another
location
2019-07-10 11:20:20 +01:00
Sergio Martins
2c989ad5e8
Validate the parameters before creating the Frame
...
otherwise we're left with a dummy frame
2019-07-09 22:43:55 +01:00
Sergio Martins
c682a6966e
Add tests for several stealing scenarios
2019-07-09 21:33:49 +01:00
Sergio Martins
66995c1ff9
Warn when there's dock widgets with duplicate name
2019-07-09 11:01:55 +01:00
Sergio Martins
30feb6c221
Fix unit-tests when the debug window is visible
...
the unit-tests make sure that no window survives after each test
2019-07-09 10:54:43 +01:00
Sergio Martins
4818b22575
Fix typo
2019-07-09 09:56:18 +01:00
Sergio Martins
11f6fc53f9
Fix resize propagation when dragging separators
...
Never call setPosition() directly in an Anchor that's following
another, instead do it in its folowee
2019-07-08 18:09:57 +01:00
Sergio Martins
feed814d7c
Fix crash
2019-07-08 15:49:00 +01:00
Sergio Martins
efea35a948
Add a failing test
2019-07-08 15:41:04 +01:00
Sergio Martins
1ac2a52ba6
Fix redistributing space after a window resize when there's placeholders
...
It was using the anchor->minPosition() of anchors that only had placeholders
on Side1, which is bogus. Instead, we should use the last valid minPosition
2019-07-08 15:03:14 +01:00
Sergio Martins
1324427453
Fix size calculations when restoring a placeholder
2019-07-08 12:20:17 +01:00
Sergio Martins
82e9b8ec9e
Don't count thickness of hidden/placeholder anchor
2019-07-07 22:29:44 +01:00
Sergio Martins
24d132e3a1
Add a failing unit-test
2019-07-06 11:22:54 +01:00
Sergio Martins
b6c4cd6f2e
Set the SeparatorWidgets that are following, invisible
...
Users shouldn't interact with them.
Fixes mouse not working propertly and also ilegal resizes
if people do use them
2019-07-05 19:02:46 +01:00
Sergio Martins
81b8922ec8
Fix creation of the placeholders for more complex scenarios
...
We were changing the position for anchors that weren't good
candidates, has they had non-placeholder items
2019-07-05 17:39:34 +01:00
Sergio Martins
bc9a7dcc83
tests: Add a failing test
2019-07-05 16:16:43 +01:00
Sergio Martins
279532782b
Fix unintended fallthrough, missing return
2019-07-05 15:50:59 +01:00
Sergio Martins
84e467a28d
tests: Move the _data() method next to the respective test
2019-07-05 14:58:41 +01:00
Sergio Martins
52596c11d6
Refactor AnchorGroup::turnIntoPlaceholder a bit
...
Now honours chains of folowees
2019-07-05 14:40:56 +01:00
Sergio Martins
9dc74fd8cb
Add failing test
2019-07-05 09:23:01 +01:00
Sergio Martins
8c4d373849
Add Anchor::isStaticOrFollowsStatic()
2019-07-04 22:59:03 +01:00
Sergio Martins
35e82b4e86
Fix anchoring "following" when creating placeholders
...
Sometimes, there's already some other anchor that's following
an anchor outside of the group, like when we have two adjacent
placeholders
2019-07-04 18:45:13 +01:00
Sergio Martins
49c4b5de18
Fix crash due to holding a reference to a QVector element
...
When the QVector reallocates it invalidates the references
2019-07-04 18:04:52 +01:00
Sergio Martins
8c402f780d
Add a failing test
2019-07-04 17:00:54 +01:00
Sergio Martins
b5e932258e
Fix position calculation when restoring placeholders
...
It was going out of bounds. We need to respect the bounds
of each anchor
2019-07-04 14:58:31 +01:00
Sergio Martins
434bf5b1e0
Fix two anchors following each other
2019-07-04 10:36:15 +01:00
Sergio Martins
3059965bbe
Remove unused variable
2019-07-03 22:33:44 +01:00
Sergio Martins
d29eaee49a
Remove unused variable
2019-07-03 22:32:15 +01:00
Sergio Martins
d5a05c4f38
Tests++
2019-07-03 22:29:53 +01:00
Sergio Martins
185d7edeb8
Fix build due to unused function
2019-07-03 19:08:56 +01:00
Sergio Martins
9c4a729a09
Remove unused variable
2019-07-03 19:05:17 +01:00
Sergio Martins
332860b763
tests++
2019-07-03 18:58:39 +01:00
Sergio Martins
d76e2380b3
Fix unit-test on Windows
...
We were resizing the window to a smaller size than it supports.
2019-07-03 18:06:24 +01:00
Sergio Martins
a311d44d67
Fix build
2019-07-03 15:25:40 +01:00
Sergio Martins
5341e7353e
add unit-test for using an embedded MainWindow
2019-07-02 15:57:55 +01:00
Sergio Martins
d4fba8e0f8
Fix cases where docked dock widgets wouldn't have the right placeholder
...
Previously dock widgets only cared about placeholders to mainwindow and
ignored FloatingWindow placeholders, but a placeholders can be transfered
from FloatingWindow to mainwindow, becoming interesting, and shouldn't
be ignored anymore
2019-07-02 14:31:44 +01:00
Sergio Martins
728322b965
Remove old placeholders before reattaching an item to a different location
...
As the item will get a new placeholder, so the old one is useless
and can even make the calculations harder
2019-07-02 09:50:40 +01:00
Sergio Martins
efe8389512
Add missing logging rule
2019-06-29 19:00:55 +01:00
Sergio Martins
2ebe772040
Fix placeholder support when the layout is empty
...
Didn't see it before as I was using MainWindow with a persistent
central frame. when there's no item there's no separator do adjust,
as the top,bottom,left,right are actually the window border.
2019-06-29 14:41:35 +01:00
Sergio Martins
064e0ecf77
Never close the MainWindow when closing a Frame.
...
We only close FloatingWindow
2019-06-28 20:02:26 +01:00
Sergio Martins
32e0af2f53
Ignore a warning when running under offscreen qpa
2019-06-28 19:09:50 +01:00
Sergio Martins
3bba8acddb
Introduce DockWidget::setCurrentTab() and isCurrentTab()
2019-06-28 14:23:03 +01:00
Sergio Martins
c18e21fffa
tst_placeholderCount: Do proper cleanup at the end
...
So the next test doesn't start with open windows.
Fixes the unit-tests
2019-06-26 14:07:59 +01:00
Sergio Martins
b7b8c7688e
Fix unneeded placeholder not being destroyed
2019-06-26 13:49:49 +01:00
Sergio Martins
6a44ccc2f3
tests: Add a reproducible bug
2019-06-26 10:11:25 +01:00
Sergio Martins
bb6862bdd4
unbreak tests
...
Forgot to use the default value when added the optional argument
2019-06-25 23:13:32 +01:00
Sergio Martins
576da0f530
tests: Ensure tst_addAndReadd doesn't leave garbage behind
2019-06-25 20:01:45 +01:00