Commit Graph

365 Commits

Author SHA1 Message Date
Sergio Martins
7080712501 Rename the tab's title if its dock widget changes 2020-09-21 16:19:35 +01:00
Sergio Martins
6a46744073 Make Flag_AutoHideSupport public
Ready to be tested by the public
2020-09-21 00:19:20 +01:00
Sergio Martins
b5973fcf8c Fix sidebar test
We're not hidding them, they just occupy 0 it seems
2020-09-20 23:50:46 +01:00
Sergio Martins
ac7d06d4fe When closing overlay, remove it from side bar too
Added test.
2020-09-20 23:46:37 +01:00
Sergio Martins
def752632f tests: fix flaky test on macOS 2020-09-19 00:08:47 +01:00
Sergio Martins
f296048063 tests: Stabilize two tests on XCB
Spacings/margins are different. Anyway, that QVERIFY isn't
very important, mostly useless.
2020-09-18 23:44:34 +01:00
Sergio Martins
1c1b816292 Fix tst_maximumSizePolicy with qpa xcb 2020-09-18 23:28:14 +01:00
Sergio Martins
fbd463e18b tests: debug++ 2020-09-18 19:42:26 +01:00
Sergio Martins
9e01363648 tests: debug++ 2020-09-18 19:40:37 +01:00
Sergio Martins
67bf7e9775 tst_raise: raise the window before starting
needed on macOS
2020-09-18 19:34:09 +01:00
Sergio Martins
d8c2100b24 tests: Set object name for debugging 2020-09-18 19:30:28 +01:00
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