Commit Graph

1157 Commits

Author SHA1 Message Date
Sergio Martins
6d5116f7cf tests++ 2019-07-17 14:55:21 +01:00
Sergio Martins
f65fdef13e tests: More tests for rectForDrop() 2019-07-17 12:03:45 +01:00
Sergio Martins
8ad6843413 debug++ 2019-07-17 11:50:19 +01:00
Sergio Martins
9fe0a191eb Remove unneeded test, in the hope of removing MultiSplitterLayout::resizeItem()
which is not the correct way to resize items
2019-07-17 11:46:51 +01:00
Sergio Martins
fc380eab72 More tests for rectForDrop() 2019-07-17 11:46:42 +01:00
Sergio Martins
d0cd0df157 Make it easier to unit-test rectForDrop()
Just pass an int instead of the Item.
Made Length public.
2019-07-17 10:50:36 +01:00
Sergio Martins
da4b840ff4 Split rectForDrop() in two, so we can unit-test the second one
It has complex math
2019-07-17 10:36:51 +01:00
Laurent Montel
c0e08dd584 Add missing update() when changing icon 2019-07-17 09:57:45 +01:00
Sergio Martins
2b45aab88d Propagate closing events
FloatingWindow now asks Frame if it should close
Frame asks its DockWidgets
DockWidget asks its widget
2019-07-16 22:36:08 +01:00
Sergio Martins
0abc315584 Share some tests code in utils.cpp 2019-07-16 22:13:22 +01:00
Sergio Martins
cff487099d Add missing override 2019-07-16 21:39:51 +01:00
Sergio Martins
3c4dba77bf Add tests/utils.h
tst_docks.cpp is becoming too big
2019-07-16 21:38:45 +01:00
Sergio Martins
094dbf1390 Add a way to use the rubber band as top-level
Seeing artifacts when embedded in MFC
2019-07-16 19:52:41 +01:00
Sergio Martins
bb01676c4f Don't show the ClassicIndicators window, it's not needed
The rubberBand can be parented directly on the DropArea
2019-07-16 19:12:49 +01:00
Sergio Martins
6dcca66455 Add a way to know if any Separator is being dragged 2019-07-16 18:38:45 +01:00
Sergio Martins
7d25b27384 Downgrade two warnings to debug, as they can happen 2019-07-16 18:28:06 +01:00
Sergio Martins
5c3814893a Release mouse if button isn't pressed and Qt doesn't know about it
Can happen if Qt isn't driving the event pump and someone else handles
the release. Observed in an MFC app.
2019-07-16 18:25:41 +01:00
Sergio Martins
fa005e7b24 Don't move the separators in case the mouse isn't pressed
It can happen that someone else ate the ReleaseEvent
2019-07-16 15:08:50 +01:00
Sergio Martins
5054fd7be3 Allow an Item to restore a full frame instead of single dock widget
For the case where we have a floating frame with multiple tabs,
instead of restoring all individual dockwidgets one by one we
can simply restore the whole frame
2019-07-16 14:47:13 +01:00
Sergio Martins
007f483069 Support re-docking a frame with multiple dock widgets 2019-07-16 14:42:43 +01:00
Laurent Montel
010958d8ca Add support for doubleclick on titlebar 2019-07-16 12:17:07 +01:00
Sergio Martins
3bb80a18ef Fix unininitialized variable valgrind warning 2019-07-16 12:10:15 +01:00
Sergio Martins
b6c0353f7b Fix anchor following not being updated when an item is removed 2019-07-16 11:54:20 +01:00
Sergio Martins
4a0bd209b8 Fix ASSERT in Anchor::setFollower() 2019-07-15 23:44:35 +01:00
Sergio Martins
b314190ad1 Fix typo in assert, we want to validate the argument 2019-07-15 23:28:47 +01:00
Sergio Martins
a848810239 Add a failing test 2019-07-15 23:19:03 +01:00
Sergio Martins
8a6758c93d Fix buggy Anchor::findNearestAnchorWithItems()
It was returning inside the loop, instead of honouring the candidate
2019-07-15 22:46:27 +01:00
Sergio Martins
0eb746ad22 Uncomment test that passes 2019-07-15 20:12:27 +01:00
Sergio Martins
1cdf9e1c9a Add unit-test for checking that widgets preserve position after restored 2019-07-15 16:57:40 +01:00
Sergio Martins
0d4ef49571 Fix a cosmetic off-by-one when restoring a dock widget
now it appears at the same place
2019-07-15 16:07:56 +01:00
Sergio Martins
5979158441 When hidding a dock widget, distribute the size equally on both sides
Instead of only stealing space from 1 anchor
2019-07-15 14:36:54 +01:00
Sergio Martins
b19319935b Add AnchorGroup::outterGroup() 2019-07-15 13:51:39 +01:00
Sergio Martins
bacca2bc49 Minor refactor 2019-07-15 13:25:06 +01:00
Sergio Martins
9c0baea108 Add the fuzzer to .gitignore 2019-07-15 13:10:49 +01:00
Sergio Martins
8d31bb85fa Fix clazy warnings 2019-07-15 13:10:17 +01:00
Sergio Martins
3852fc2eb5 Don't show the floating button on FloatingWindow with nesting
Because we don't know where to put them back
2019-07-15 13:00:54 +01:00
Sergio Martins
dcbc7be0d9 Merge pull request #4 from Montel/add_icon_on_dockwidget
Add icon on DockWidget
2019-07-15 11:15:37 +01:00
Laurent Montel
9bf52e5ded Add icon on DockWidget 2019-07-15 12:10:23 +02:00
Sergio Martins
78da67264a Remove unneeded qDebug 2019-07-15 09:55:26 +01:00
Sergio Martins
c96eb88023 Fix choosing which anchors to move when restoring placeholders 2019-07-15 00:16:58 +01:00
Sergio Martins
9766fbcb3b Fix typo 2019-07-14 21:39:51 +01:00
Sergio Martins
0aac8edb0c Fix off by ones in rectForDrop()
It was accounting for the anchor thickness
2019-07-14 21:39:11 +01:00
Sergio Martins
3633007326 Add some commented out code for more sanity checks
Not all tests pass yet with these strict checks, so commented out
for now
2019-07-14 21:37:55 +01:00
Sergio Martins
1108781277 Don't resize anchors on layouts that are being destroyed
When dropping a MultiSplitter into a MultiSplitter there's an instant
where some anchors of the group are from the source MultiSplitter
as they weren't consumed yet
2019-07-14 21:14:14 +01:00
Sergio Martins
60b9007632 Add Item::minimumSize property for gammaray 2019-07-14 21:12:54 +01:00
Sergio Martins
d05c1adcd7 tests: Allow EventFilter wait for any event 2019-07-14 20:14:42 +01:00
Sergio Martins
151714d9e0 Added sanity check for static anchors positions 2019-07-14 19:27:41 +01:00
Sergio Martins
c1563b6f86 Fix bug where widget didn't have the correct size after restored
Because the anchor already had the correct position it wouldn't
update the widget size
2019-07-14 18:32:19 +01:00
Sergio Martins
fc7078bf6e Add sanity checks for item geometry
The item geometry has to be the same as the area of the enclosing
anchors
2019-07-14 17:11:27 +01:00
Sergio Martins
5fe3d72732 Clean windows at end of test 2019-07-14 17:07:57 +01:00