Commit Graph

1157 Commits

Author SHA1 Message Date
Sergio Martins
9f84760541 quick: Don't build DebugWindow, that's widget specific 2019-09-04 15:54:21 +01:00
Sergio Martins
cad7486907 Introduce MainWindowBase
MainWindow is widgets only. MainWindowBase will be used by QtQuick too.
2019-09-04 15:31:55 +01:00
Sergio Martins
729a154d48 Remove unused include 2019-09-04 13:54:07 +01:00
Sergio Martins
02d5a4f334 quick: Fix linker errors in TitleBarQuick 2019-09-04 13:51:29 +01:00
Sergio Martins
48c0ea2a4d Add a cpp file for DropAreaWithCentralFrame 2019-09-04 13:48:39 +01:00
Sergio Martins
cde35f584e quick: Add a dummy Layout so it compiles with QtQuick 2019-09-04 13:43:07 +01:00
Sergio Martins
c1272c577c Update .gitignore 2019-09-04 13:41:41 +01:00
Sergio Martins
20f8d9eed5 Remove some uneeded includes" 2019-09-04 13:39:27 +01:00
Sergio Martins
5aab3251ca Make static separators have 0 thickness instead of 1
The static separators are the left,right,bottom,top ones. Since
they don't move, they don't need to be visible nor occupy space.
They only exist to make the algorithms easier
2019-09-02 11:37:05 +01:00
Sergio Martins
76640d16b3 Fix support static separators with 0 thickness 2019-09-02 11:26:57 +01:00
Sergio Martins
9f7969bfc3 Tests now pass with static anchor thickness > 2
Still need to fix with =0
2019-09-02 11:07:58 +01:00
Sergio Martins
8cb34e4d65 tests: Fix tst_rectForDrop() with variable static anchor thickness 2019-09-02 10:56:48 +01:00
Sergio Martins
5caca65843 Fix test that didn't support static anchor thickness != 1 2019-09-02 10:52:03 +01:00
Sergio Martins
1bf2cef26f Allow static anchor thickness equal to 0 in the Config 2019-09-01 19:29:26 +01:00
Sergio Martins
7797599b5d Fix unit-tests when separator thickness is even 2019-09-01 19:04:37 +01:00
Sergio Martins
30135acbd0 tests: Remove hardcoded anchor thicknesses 2019-09-01 15:03:04 +01:00
Sergio Martins
a16bc70329 Improve warning 2019-08-28 18:10:06 +01:00
Sergio Martins
46a5a580bc Add LayoutSaver::restoredDockWidgets()
Implemented as a property it's better that the LayoutSaver
doesn't carry state about this. Then we would need to remove dock
widgets from the list if they are deleted. Also not a important
enough feature to be on the DockWidget public interface.
2019-08-28 17:56:18 +01:00
Sergio Martins
f0078c3649 Fix dragging window by title bar when using document mode
When using document mode the click goes to the tab bar, not the
tab widget
2019-08-28 17:05:45 +01:00
Sergio Martins
7a9191c039 Reset the current drop location after dropping
Instead of relying it to be reset by other means or luck
2019-08-28 14:57:53 +01:00
Sergio Martins
59cdadf386 Add DockWidgetBase::titleBar() 2019-08-24 22:55:06 +01:00
Sergio Martins
3dd9d48f57 Add more stubs for QtQuick 2019-08-24 21:28:00 +01:00
Sergio Martins
d7d47be5ac Add a stub for the QtQuick counterpart of Frame: FrameQuick 2019-08-22 23:42:49 +01:00
Sergio Martins
6b12a00f2d Fix QtQuick build 2019-08-22 23:25:14 +01:00
Sergio Martins
9a1eaf8c65 Improve README 2019-08-21 16:42:30 +01:00
Allen Winter
84b61510e2 README.md - add more info
Change-Id: I80841b46c22b2a6856a799e5eec79181f818ec80
Reviewed-on: https://codereview.kdab.com/69959
Reviewed-by: Sérgio Martins <sergio@kdab.com>
2019-08-21 16:35:49 +01:00
Sergio Martins
a4b148c310 Allow IndicatorWindow y to not be bounded by KDE task bar
For some reason Qt::Tool windows can't be placed with a y too big if it would
go under the task bar.

By using Qt::BypassWindowManagerHint we can.
2019-08-21 12:14:14 +01:00
Sergio Martins
ba773ec0fd Improve a warning, print the actual missing frame
the item will be null due to not being found
2019-08-21 11:18:01 +01:00
Sergio Martins
7bf9d8cbec Don't change the Item min size if it's a placeholder
When its in process of being restored frame can be non-null
but m_isPlaceholder is still true
2019-08-21 10:56:44 +01:00
Sergio Martins
0ccc4bcb2e Add debug 2019-08-20 18:35:06 +01:00
Sergio Martins
4282e7b596 Add debug 2019-08-20 18:30:08 +01:00
Sergio Martins
9e9ca66382 Call ensureAnchorsBounded() directly in setSize()
No need for it to be scattered in random places.
Also, don't warn in Anchor::setPosition() if we're in the middle
of a resize, ensureAnchorsBounded() will be called soon.
2019-08-20 18:19:20 +01:00
Sergio Martins
1726f323fc When updating the layout's min size also update its size immediately
So we don't rely on a round trip to the widget which then responds
with a resize, which is async sometimes.

Also, now it's self contained and doesn't depend on the widget's
stack
2019-08-20 17:58:28 +01:00
Sergio Martins
ecf1b61f22 Respond immediatley to min size changes
instead of waiting for LayoutRequests from the main window
which can be async.
2019-08-20 17:48:55 +01:00
Sergio Martins
f74fa9977d Add a sanity check 2019-08-20 16:33:13 +01:00
Sergio Martins
3d16347f80 Remove unneeded dumpDebug 2019-08-20 16:28:59 +01:00
Sergio Martins
d960c27b00 Remove unneeded ; 2019-08-20 15:25:48 +01:00
Sergio Martins
6ec23d433b Add more sanity checks 2019-08-19 23:32:28 +01:00
Sergio Martins
7a91fb5310 tests: Add more checkSanity() 2019-08-19 22:50:27 +01:00
Sergio Martins
e604037cba Add another checkSanity() check 2019-08-19 22:18:56 +01:00
Sergio Martins
ffe4a6a4da Remove some ifdefs, use maybeCheckSanity() instead 2019-08-19 21:00:37 +01:00
Sergio Martins
b24763478a Add more sanity checks 2019-08-19 20:58:30 +01:00
Sergio Martins
74be72a816 developer_build: Check sanity after adding a dock widget
Tests will fail if a warning is printed
2019-08-19 20:54:22 +01:00
Sergio Martins
682524610f Remove unneeded setDoSanityChecks() 2019-08-19 20:51:26 +01:00
Sergio Martins
eed6082d0c DebugWindow: Add option to call ensureAnchorsBounded() 2019-08-19 20:38:32 +01:00
Sergio Martins
9f544975f1 Support existing widget's minSize changing
previously we only honoured the min size of when they were
added to the layout
2019-08-19 19:44:51 +01:00
Sergio Martins
807a9a5d90 Remove complexities from MultiSplitterLayout::rectForDrop
The anchors get adjusted in ensureAnchorsBounded(), when we
add an item
2019-08-19 19:37:51 +01:00
Sergio Martins
dd58836ddf Fix another case of out of bounds anchor position
Happens because rectForDrop() is returning the rect without considering
the widget that we're adding, so doesn't respect the bounds.

Let's just ignore the out of bounds warning. ensureAnchorsBounded()
is ran at the end anyway so we're fine.
2019-08-19 19:26:54 +01:00
Sergio Martins
aa7f5d6c39 Remove some qDebug 2019-08-19 16:47:51 +01:00
Sergio Martins
7ca590cb58 Minor refactoring 2019-08-19 16:43:27 +01:00