Sergio Martins
c87f5ba6eb
Move utility function into tests
...
used by the tests only
2020-07-27 21:32:58 +01:00
Sergio Martins
7d01b7649a
qml: Move MultiSplitter out of widgets/
...
Will make it shared to both stacks
2020-07-26 21:46:09 +01:00
Sergio Martins
a21abef6bd
Make MultiSplitter::rectForDrop() take a FloatingWindow directly
...
Which is the only use case. Also since FloatingWindow inherits
from Layouting::Widget that will be nice to make this code work
with QtQuick version too. Otherwise it's complicated as QQuickItem
doesn't have min/max/sizePolicy
2020-07-26 20:05:41 +01:00
Allen Winter
b4f49895c2
clarify: licensing is GPL2 or GPL3 or commercial licensed
...
follow the REUSE specs
2020-07-24 18:16:13 -04:00
Sergio Martins
709728e456
Revert "Add support for Qt6"
...
This reverts commit e1bf1cd786 .
This breaks the build with older CMake (3.9 for example), which
doesn't support alias to imported targets.
2020-07-19 15:42:59 +01:00
Sergio Martins
e1bf1cd786
Add support for Qt6
...
Build with -DOPTION_QT6=ON
2020-07-18 21:56:18 +01:00
Sérgio Martins
8474f246ae
Fix Qt6 build
...
Didn't include the cmake changes, as those are hacks for now.
Only included fixes to cpp code.
2020-07-18 18:51:47 +01:00
Sergio Martins
2559b29b30
Fix separators not moving in some situations
...
We were mixing heights with widths... root->length() can be a width()
(if vertical), while we're calculating available width to grow
on a nested horizontal container
2020-07-06 23:54:42 +01:00
Sergio Martins
563d569ec4
tests: When removing a dock widget, check if max-size is honoured
2020-07-06 19:20:08 +01:00
Sergio Martins
21ef8017e8
Honour max-size when dropping a widget that can grow
...
We already honoured max-size in the case of dropping a widget with
some max-size. Now we also honour it when an existing docked widget
has max-size and we're dropping a widget that can grow. Now the
dropped widget will occupy more space in this case
2020-07-06 11:01:29 +01:00
Allen Winter
9630f0f48a
tst_docks.cpp - fix link. remove unneeded method declaration
...
tst_maxSizeHonouredWhenAnotherDropped didn't have an
implementation so I removed its declaration.
2020-07-04 12:10:36 -04:00
Sergio Martins
0f71b30096
Allow to drag separators when they are past their max-pos
...
As long they are moving in Side1 direction. i.e: left/up, i.e:
reducing their distance to the max-pos.
2020-07-04 13:02:46 +01:00
Sergio Martins
2ec226c432
Dragging separators now honours max-size recursively too
...
Previously only min-size propagated.
Now, when dragging a separator, let's say to the right, and the left
widget can't grow more, we start to move the previous separator to
the right
2020-07-04 12:32:10 +01:00
Sergio Martins
fa2cd1bc74
Also honour max-size when resizing nested container via separator
2020-07-04 11:38:33 +01:00
Sergio Martins
730af05aa1
Add a failing unit-test
2020-07-04 00:39:55 +01:00
Sergio Martins
4788f41593
tests: don't fail when window is out of bounds on mac
...
Should be benign. My screen it too small.
2020-07-03 19:36:39 +01:00
Allen Winter
2462f991be
buildsystem - consistent formatting
2020-06-25 13:32:59 -04:00
Sergio Martins
d373585e0c
get rid of some unneeded qobject_cast<FloatingWindow*> casts
2020-06-25 17:56:21 +01:00
Sergio Martins
bcfb57f89d
Fix aerosnap|alwaysTabs|noTitleBar
...
DragController would ignore the non-client mouse press
2020-06-24 16:18:58 +01:00
Sergio Martins
d3aee0dabb
Add a unit-test
2020-06-24 16:06:35 +01:00
Sergio Martins
ba2fdfc46c
Fix tests with 5.9
...
There was just 1 failing, which needed higher margins
2020-06-23 22:11:50 +01:00
Sergio Martins
a8bd46155c
Fix typo in test
2020-06-23 19:24:00 +01:00
Sergio Martins
da4b90e373
tests: Use different json filenames
...
So tests can run in parallel
2020-06-23 19:01:13 +01:00
Sergio Martins
19d5467f4d
fuzzer: Also generate max-size constraints
2020-06-21 23:28:35 +01:00
Sergio Martins
91b291a1a9
tests: Tests now run 10x faster, with ctest -j10 or so
...
Introduced an indirection, tests_launcher, which can run a subset
of the 140 tests, this way it's paralelizable by ctest
2020-06-20 15:27:58 +01:00
Sergio Martins
be4a71685a
Fix a fuzzer test
...
When restoring a layout it can happen that the widget has
different size constraints when being restored, so this warning
was benign. There's a chekcSanity() later, so that's what's matters
2020-06-20 14:00:33 +01:00
Sergio Martins
744f351c4e
Fix highlight when widget has QSizePolicy::Maximum
...
Multisplitter::rectForDrop() was only using QWidget::maximumSize(),
which doesn't need to be set. Also fix the case where the dropped widget
be a complete multisplitter
2020-06-17 18:04:59 +01:00
Sergio Martins
84989745b4
Use target_compile_options instead of the hammer
...
Doing per target ensures that the python stuff won't get -Werror.
We can now build the python bindings and still use the developer build
2020-06-17 14:37:42 +01:00
Sergio Martins
e5c0316ebb
Fix the highlight/rubber-band size not matching the size the item gets
...
Not all code-paths were using FairButFloor. Dropping a single item
used FairButFloor, but not when dropping another multi-splitter (
Layout with nested items)
2020-06-16 22:34:18 +01:00
Sergio Martins
25dd149475
Add Widget::mapToGlobal()
2020-06-13 19:09:44 +01:00
Sergio Martins
163b194398
Fix clang build, mostly shadowing warnings
2020-06-11 17:00:54 +01:00
Sergio Martins
86e58dd8a7
Merge MultiSplitterLayout into MultiSplitter
...
No need to have two. It's a leftover from the old layouting engine
2020-06-11 16:34:28 +01:00
Sergio Martins
7f9d160658
Also honour QSizePolicy::Maximum
...
It's yet another way to say you want a max size
2020-06-07 20:14:50 +01:00
Sergio Martins
daa220d513
tests: let the widget receive a size hint
2020-06-07 20:01:37 +01:00
Sergio Martins
d5797a3aea
Honour QSizePolicy::Fixed too
...
Some widgets, for example QPushButton, instead of having an explicit max size,
they communicate the need for a max size through their size policy
2020-06-07 19:53:06 +01:00
Sergio Martins
dabfeeaf3b
Honour max-size when floating a window
2020-06-05 15:35:55 +01:00
Sergio Martins
296889cace
Move TabWidget usage to FrameWidget
...
Frame is abstract and doesn't care about such implementation details.
QQuick will role out their own QTabWidget equivalent. No need to
abstract tab widget too, it's overkill.
2020-06-04 09:57:59 +01:00
Sergio Martins
ecfa43f801
Decouple TabWidget from Frame
...
TabWidget is now an implementation detail of FrameWidget.
QQuick will roll their own stuff with similar api, but no need to
abstract QTabWidget and QTabBar
2020-06-03 22:18:44 +01:00
Sergio Martins
0a75d89848
Add Frame::detachTab()
...
The tab widget will be an implementation detail of FrameWidget and
not accessed by anyone
2020-06-03 21:18:38 +01:00
Sergio Martins
4e88b3742d
Honour max-size when docking
...
Layout will choose a suitable size for the dock widget when
addDockWidget() is called
2020-05-29 09:53:51 +01:00
Sergio Martins
a086713bb6
Implement FrameWidget::maxSizeHint()
2020-05-29 08:11:42 +01:00
Sergio Martins
6797d291b6
Propagate max-size from the guest widget to DockWidget
...
Next step is propagating from DockWidget->Frame
2020-05-28 18:40:55 +01:00
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