Sergio Martins
d1a3e39f17
tests: Improve debug message
2020-09-18 19:27:17 +01:00
Sergio Martins
3d5c081333
tests: Debugging a macOS failure
2020-09-18 19:24:49 +01:00
Sergio Martins
d76b27863f
Don't center floating window if user moved it
...
Fixes #75
2020-09-16 16:51:05 +01:00
Sergio Martins
74adb5f021
Fix floating window's title bar not being correct
...
FloatingWindow::hasSingleFrame() was true, but FloatingWindow::frames()
returned 2 of them, since frames() is based on child count and it hadn't
been reparented yet
Not commiting to 1.0 since it touches the layouting engine.
All tests pass and testing showed no side effects though, so should be fine for
1.0 too
Fixes #74
2020-09-15 19:52:48 +01:00
Sergio Martins
85cb289bc4
Also focus when clicking on the current tab
...
Fixes issue #71
2020-09-14 21:08:48 +01:00
Sergio Martins
ee4d720c51
Added test for issue #71
2020-09-14 20:54:35 +01:00
Sergio Martins
869cacc568
Use mouse events for tst_titleBarFocusedWhenTabsChange
...
So we can test clicking on a current tab too.
Also since changing tabs programatically shouldn't change focus,
which I'll fix soon
2020-09-12 00:39:10 +01:00
Sergio Martins
98225ac9a3
Fix DockWidget::isInMainWindow()
...
FloatingWindows are parented to the main window, so we need to stop
the loop once isWindow().
The tests didn't catch this because the floating window in the test
was created before the main window, so it truly didn't have a parent
Fixes #69
2020-09-11 22:33:25 +01:00
Sergio Martins
4bdfc35c8c
Changing tabs should also activate our focus scope
...
Fixes #70
2020-09-09 21:03:00 +01:00
Sergio Martins
b510c2fd5f
Added DockWidget::isInMainWindow()
...
For task #69 .
A signal would be nice too, though.
2020-09-07 15:27:54 +01:00
Sergio Martins
92843b4972
Merge branch '1.0' into master
2020-08-30 14:46:28 +01:00
Sergio Martins
ae000e75bc
Allow DockWidget::setWidget() to be called multiple times
...
Fixes #66
2020-08-30 14:43:12 +01:00
Sergio Martins
a06fec51c8
Merge branch '1.0' into master
2020-08-25 21:54:32 +01:00
Sergio Martins
4b4d839074
Expose more private API so users can use the full power
...
Installed more private headers.
TabWidget_p.h was moved into widgets/ as the QtQuick impl won't
use that abstraction. Could even be folded into TabWidgetWidget.
Fixes #65
2020-08-25 21:46:46 +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
caa2ece751
qml: Move the 1st test from tst_docks to tst_common
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
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
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
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
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
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
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
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