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
3fc32fc4aa
Warn when adding a widget and the widget is the same as the relativeTo
2019-07-09 22:22:28 +01:00
Sergio Martins
c682a6966e
Add tests for several stealing scenarios
2019-07-09 21:33:49 +01:00
Sergio Martins
fceb7078ab
Make no side-effects if the tab widget already contains the widget
2019-07-09 21:15:23 +01:00
Sergio Martins
5af0482a7e
WIP: Allow to add a dock widget directly hidden
...
So it's not shown
2019-07-09 19:35:01 +01:00
Sergio Martins
97d7bd903b
Refactor to make less complex
2019-07-09 19:16:45 +01:00
Sergio Martins
7c1dca8a83
Remove unused variable
2019-07-09 19:11:57 +01:00
Sergio Martins
4518bf4462
Refactor more code, so it can be shared
2019-07-09 19:10:23 +01:00
Sergio Martins
c012af78d5
Minor: Move to place where it's used
...
probably we can refactor the whole block
2019-07-09 18:45:27 +01:00
Sergio Martins
60041870c3
Debug++
2019-07-09 18:40:18 +01:00
Sergio Martins
e2e234cb38
Debug++
2019-07-09 18:26:01 +01:00
Sergio Martins
2adae6b375
Debug++
2019-07-09 18:11:02 +01:00
Sergio Martins
525b279eb1
Warn when adding duplicate items to TabWidget
2019-07-09 17:50:05 +01:00
Sergio Martins
30df8d3553
Print the Frame address
2019-07-09 17:30:39 +01:00
Sergio Martins
09d8c721e5
Minor refactor to allow code reuse
2019-07-09 17:22:17 +01:00
Sergio Martins
0ad960d99f
only print the address at this point
2019-07-09 11:45:25 +01:00
Sergio Martins
fe40640711
Debug++
2019-07-09 11:38:51 +01:00
Sergio Martins
289945e3ad
Debug++
2019-07-09 11:30:55 +01:00
Sergio Martins
989af1bdb2
Debug++
2019-07-09 11:27:27 +01:00
Sergio Martins
fc3fdba6fc
Use qEnvironmentVariableIntValue instead
...
So 0 means off
2019-07-09 11:08:28 +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
2bb43a9b71
Don't consider invisible windows as drop targets
...
Fixes hidden dock widgets suddently appearing.
2019-07-09 10:06:59 +01:00
Sergio Martins
4818b22575
Fix typo
2019-07-09 09:56:18 +01:00
Sergio Martins
6d5f08fb8a
Add a debug window, for when GammaRay can't be used
2019-07-09 09:19:53 +01:00
Sergio Martins
8163e7ada4
Don't include .moc in ClassicIndicators.cpp
...
Some build systems don't support it
2019-07-08 18:25:45 +01:00
Sergio Martins
de104ad36e
Merge branch 'master' of github.com:KDAB/KDDockWidgets
2019-07-08 18:21:37 +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
a8d0f35d2d
Don't use WidgetResizeHandler for non-top level DockWidgets
...
This conflicted with the SeparatorWidget mouse handling, which
made the Separator not respond some times
2019-07-08 16:34:06 +01:00
Sergio Martins
86ea51eb79
Add some asserts
2019-07-08 16:06:53 +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
6f9910ffa9
Remove Item::anchorAtDirection()
...
It was confusing, and we have anchorAtSide() already
2019-07-08 13:33:00 +01:00
Sergio Martins
3ec6008d45
Rename for readability
2019-07-08 13:22:10 +01:00
Sergio Martins
2661162d3a
Minor re-entrancy guard
...
Not sure if needed, but I'll sleep better
2019-07-08 13:11:03 +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
5ed92a762a
debug++
2019-07-07 16:32:18 +01:00
Sergio Martins
a8fd10d003
debug++
2019-07-07 16:15:31 +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
66254f58bf
Add a Anchor::folowee property for GammaRay
2019-07-05 18:50:08 +01:00
Sergio Martins
105a7bb378
Fix typo: folowee -> followee
2019-07-05 18:47:57 +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
c0af5f1cf8
Just paint the frames
...
Easier to spot things
2019-07-05 16:37:15 +01:00
Sergio Martins
d71f98f365
Paint frames for debug
2019-07-05 16:32:24 +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