Sergio Martins
961600fe74
qtquick: fix build
...
MainWindow.h is specific to QtWidgets
2020-08-22 19:19:59 +01:00
Sergio Martins
d9fdd20caa
Add DockWidgetBase::isFocusedChanged
...
Fixes : #60
2020-08-15 00:46:41 +01:00
Sergio Martins
9e2d001ac5
Add DockWidget::isFocused() for issue #60
...
Needs a signal now
2020-08-14 23:51:35 +01:00
Sergio Martins
750f9b6142
tests: Add strong-focus to the widget
2020-08-14 23:00:14 +01:00
Sergio Martins
caa2ece751
qml: Move the 1st test from tst_docks to tst_common
2020-08-13 00:46:55 +01:00
Sergio Martins
22f2975f3c
tests: createMainWindow() works for qml now too
2020-08-13 00:46:55 +01:00
Sergio Martins
d3323d824a
tests: Make createMainWindow return MainWindowBase
...
Instead of QMainWindow, so it works with qml too
2020-08-13 00:46:55 +01:00
Sergio Martins
1e85b1e7fb
tests: Share EnsureTopLevelsDeleted with qml too
...
So we can start to copy tests to tst_common without hacking them
2020-08-12 22:45:59 +01:00
Sergio Martins
75464708af
Remove unneeded debug
2020-08-12 22:00:23 +01:00
Sergio Martins
f007451442
Fix case where floatAction() wouldn't trigger
...
Fixes #58
2020-08-12 21:21:04 +01:00
Sergio Martins
5b9f08c754
Remove mapTo/From global from Layouting::Widget
...
Use the ones from QWidgetAdapter instead
2020-08-10 19:05:02 +01:00
Allen Winter
8a3252473f
buildsystem - support static library build
2020-08-07 12:26:27 -04:00
Sergio Martins
fd56ab7932
qml: Introduce tst_common
...
Will be moving tests that are common to both QtWidgets and QtQuick
2020-08-02 22:16:03 +01:00
Sergio Martins
fd6d9654bc
qml: Start running some tests for the QtQuick version too
...
tst_multisplitter for now.
tst_docks will have to be split into common and widgets
2020-08-02 20:16:07 +01:00
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