Sergio Martins
f5622732ce
Added ItemBoxContainer::tst_numSideBySide_recursive()
2022-06-02 13:59:20 +01:00
Sergio Martins
4727c9c7fc
MainWindow: Allow to avoid the immediate QWidget::create()
...
In case you're going to put the main window into a layout you
don't want to have it create a QWindow.
2022-05-25 00:36:40 +01:00
Allen Winter
f8ca5ca1ef
KDDockWidgetsConfig.cmake.in - make sure QuickControls2 is found
...
if building for QTQUICK we'll have dependencies
on the Qt libraries QtQuick and QuickControls2
2022-05-24 17:20:16 -04:00
Albert Astals Cid
9b8759c472
Add the possibility of setting the margin used for overlay docks
2022-05-17 15:32:28 +01:00
Sergio Martins
58b8633e3d
Added KDDockWidgets::InitialVisibilityOption::PreserveCurrentTab
...
So you can insert into a tab group without changing the current
tab, if you want.
2022-05-05 14:28:07 +01:00
Sergio Martins
a743eafca1
Added DockWidgetBase::currentTabIndex()
2022-05-05 10:45:55 +01:00
Albert Astals Cid
2446519024
SideBar_p.h: Fix includes to make it usable from external projects
2022-05-03 10:43:37 +01:00
Sergio Martins
6166e5805c
Don't show middle dock indicator if frame isn't dockable
...
This was implemented but the logic was wrong.
Fixes central persistent showing the central indicator.
2022-04-19 15:53:42 +01:00
Allen Winter
f3da0f0547
various - fix some misspellings
2022-04-14 12:27:29 -04:00
Allen Winter
b2fc0c3eb1
various - update copyright year
2022-04-14 12:01:05 -04:00
Sergio Martins
6e7268e42a
Workaround QTBUG-102430, don't move still maximized window
...
When dragging a maximized window we show normal, but we can
only start moving it when the window managers acknowledges the new
state. The state in QWidget isn't reliable.
2022-04-12 16:37:14 +01:00
Sergio Martins
7e6c5b2d9f
Save the last known window state from the window manager POV
...
Required for QTBUG-102430
2022-04-12 14:56:20 +01:00
Sergio Martins
9a9676cb7a
Add a TODOv2 comment about writing the same fix for QtQuick
2022-04-11 22:33:45 +01:00
Sergio Martins
aff86c3e0f
Add a comment regarding QTBUG-102430
2022-04-11 22:31:26 +01:00
Sergio Martins
d4fe17a0bf
Workaround FloatingWindow::windowStateChanged regarding QTBUG-102430
...
QWidget::windowStateChanged isn't useful as it's emitted once sync
and another async, with the same value. Only the async one is useful
as it will represent the real window manager state. Then we can do
further moves.
The QWindow one happens to be good (async), so use that one instead.
2022-04-11 22:10:30 +01:00
Sergio Martins
0e5247e039
Use FloatingWindow::isMaximizedOverride() instead of isMaximized()
...
This is for issue #286 .
Allows users to workaround buggy window managers.
2022-04-08 14:12:35 +01:00
Sergio Martins
6413266df3
Linux: Fix dragging of maximized floating windows
...
They should restore their normal size when the drag starts
(cherry picked from commit 1305dee081 )
2022-04-08 14:12:35 +01:00
Albert Astals Cid
7b73393095
Fix position of right overlay dockwidgets when there's a toolbar on the left
2022-04-05 17:13:29 +01:00
Sergio Martins
1a85363faf
Preserve order of tabs when re-docking a tabbed group
...
Since our workaround isn't an atomic operation, each dock widget
was saving its new tab index while we were in the middle of a restore.
So be sure we set their correct index and restore "current" at the end.
Fixes #279
2022-03-30 15:26:11 +01:00
Sergio Martins
bec69e17a2
Fix QtQuick build
2022-03-21 15:40:07 +00:00
Sergio Martins
743dbc0718
Added dockWidgetInserted|Removed signals to TabBarWidget
...
Since QTabBar doesn't have them.
Useful for custom tab bars
2022-03-12 12:47:26 +00:00
Sergio Martins
fd4588de0f
TitleBarWidget: Mark members as protected
...
So custom titlebars have more power
2022-03-12 12:31:53 +00:00
Sergio Martins
6ba10cfe12
Added TitleBar::tabBar()
...
Useful for people writing custom titlebar's with style that depends
on the current tab
2022-03-11 18:21:49 +00:00
Sergio Martins
096176dc72
Don't dereference potentially nullptr
2022-03-10 18:37:28 +00:00
Sergio Martins
25b04d7ed8
MDI: Fix another case of showing resize handles wrong
...
the logic for 'y' only makes sense if 'x' is bounded and vice-versa
2022-03-10 10:55:17 +00:00
Sergio Martins
e345e89c35
MDI: Fix case where resize cursor would be shown for frame bellow
...
Was already fixed a few days ago, but this is the case for nested
mdi.
2022-03-09 19:08:29 +00:00
Sergio Martins
61cca1e5ec
Forward QCloseEvent to the MDI widgets too
...
Fixes case where docked MDI widgets were not able to block a close
2022-03-09 16:11:55 +00:00
Sergio Martins
7db9938b85
Fix MainWindow not propagating close events to docked widgets
...
Nested FloatingWindows already supported it, so make it consistent.
Personal take: In a non-docking world, users can override their
main window close event and prevent a close, to save a document
or such. However, in a docking world, the main window developer
won't know which widgets are docked, so forwarding needs to happen,
as some might have documents to save.
2022-03-09 15:47:02 +00:00
Sergio Martins
01cc915734
Further move onCloseEvent to base class
...
So that it can be reused by MDI layouts too
2022-03-09 14:58:35 +00:00
Sergio Martins
3454b67a45
Refactor: Move close event logic from FloatingWindow to DropArea
...
So main window can use it too
2022-03-09 14:39:20 +00:00
Sergio Martins
524dff9105
Don't try to restore to previous position if there isn't any
2022-03-07 16:36:38 +00:00
Sergio Martins
0099a19a82
Make redocking floating windows with tabs possible
...
TitleBar::isFloating() was returning false, while it should
have returned true.
Fixed by making isFloating() simpler and dumb. isFloating() should
only say if it belongs to a floating window or not. It shouldn't
contain any logic about whether button should be visible or not.
There's already logic elsewhere that will hide the float button
in case there's nesting.
Fixes issue #96 and #44
2022-03-07 15:56:15 +00:00
Sergio Martins
e6b8636e88
MDI: Fix resize cursor appearing for frames that had others on top
2022-03-04 11:34:35 +00:00
Sergio Martins
86419fd979
MDI: Fixed closing dock widget in MDI would close main window
...
We only close the window when the window is a FloatingWindow and
it's the last frame
2022-03-03 17:52:13 +00:00
Eism
220471f746
Corrected the updating of normal geometry for window
2022-02-14 15:34:01 +00:00
Sergio Martins
2eeb4aac27
Fix Item_p.h being exposed in public API
...
Forward declare Item instead
2022-02-12 14:37:19 +00:00
Sergio Martins
54bf24d5d4
Added Config::setDropIndicatorAllowedFunc()
2022-02-11 19:49:23 +00:00
Sergio Martins
76cbb760ed
Minor refactoring before introducing DropIndicatorAllowedFunc
...
Deals with all the false case first
2022-02-11 19:07:28 +00:00
Sergio Martins
4824a398ab
Move DropIndicatorOverlayInterface::DropLocation enum to namespace scope
...
It's public now
2022-02-11 18:14:26 +00:00
Sergio Martins
a502a8250b
Fix possible nullptr dereference
2022-02-11 17:42:09 +00:00
Sergio Martins
85fb4ff671
indicators: Prepare the visibility to be more granular
...
Currently either all or none inner indicators can be hidden/shown,
and same of the outter.
We'll soon allow some of them to be hidden, selectively, by the
client app.
2022-02-11 17:37:26 +00:00
Sergio Martins
5811cab164
segmented indicators: Fix potential bugs due to decoupled drop types
...
The returned QVector was indexed by the enum values, but the enum
is flag based now, no longer sequential. Instead of depending
on ordering of the enum, let's instead return a QHash where the
type is coupled with the corresponding QPolygon already
2022-02-11 17:08:30 +00:00
Sergio Martins
1387c2f573
segmented indicators: Use the base class logic
...
Instead of repeating it
2022-02-11 16:58:12 +00:00
Sergio Martins
79cc347cd8
Refactor: Move indicator visibility logic into base class
2022-02-11 16:42:07 +00:00
Sergio Martins
e62bde3152
Improve documentation for MainWindowOption_HasCentralWidget
...
Fixes issue #272
2022-02-11 14:36:19 +00:00
Sergio Martins
ecd3c20adf
Fix build with Qt5+C++20
...
Error was:
qvector.h:532:18: error: use of overloaded operator '!=' is ambiguous (with operand types 'int *' and 'QTypedArrayData<int>::iterator')
while (i != d->begin())
2022-02-10 11:01:14 +00:00
Sergio Martins
755d53432b
Fix "drag to detach" MDI windows when in nested MDI mode
...
We were deleting the draggable, causing the drag to stop
2022-02-04 17:54:43 +00:00
Sergio Martins
e00a552bf8
Add DragController::currentStateChanged() signal
2022-02-04 17:52:54 +00:00
Sergio Martins
faf93fe597
Add DragController::isIdle()
2022-02-04 17:48:42 +00:00
Sergio Martins
4f8aac7df3
Fix floating windows not restoring to previous position
...
The dock widget wrapper that we deleted had that info. We need
to preserve it.
2022-02-04 16:57:44 +00:00