Commit Graph

4135 Commits

Author SHA1 Message Date
Sergio Martins
7b4e04703d Added MultiSplitter::numSideBySide_recursive()
(cherry-picked from commit f5622732ce)
2022-06-19 13:52:30 +01:00
Sergio Martins
a705ccfe5e Fix typo in code snippet 2022-06-19 13:48:44 +01:00
Sergio Martins
84a8fd61b4 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.

(cherry-picked from commit 4727c9c7fc)
2022-06-19 13:25:53 +01:00
Sergio Martins
724a67f2ef distro/ - update for ubuntu22.04 and fedora36
(cherry-picked from commit bf255c104f)
2022-06-19 13:21:44 +01:00
Sergio Martins
d1e29e6773 Add the possibility of setting the margin used for overlay docks
(cherry-picked from commit 9b8759c472)
2022-06-19 13:19:50 +01:00
Sergio Martins
f2ddbd2cc3 Added KDDockWidgets::InitialVisibilityOption::PreserveCurrentTab
So you can insert into a tab group without changing the current
tab, if you want.

(cherry-picked from commit 58b8633e3d)
2022-06-19 13:14:54 +01:00
Sergio Martins
8a0fa46deb 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.

(cherry-picked from 6166e5805c)
2022-06-19 13:06:09 +01:00
Sergio Martins
28cc64be4a Remove unused/duplicated file 2022-06-19 13:04:05 +01:00
Sergio Martins
4856da3bec .pylintrc - initial pylint config file
(cherry-picked from commit b1379f0bef)
2022-06-19 13:00:49 +01:00
Sergio Martins
08518e02e0 various - fix some misspellings
(cherry-picked from commit f3da0f0547)
2022-06-19 13:00:06 +01:00
Sergio Martins
1e7f0d7c5f various - update copyright year
(cherry-picked from commit b2fc0c3eb1)
2022-06-19 12:57:51 +01:00
Sergio Martins
793661ea09 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.

(cherry-picked from commit 6e7268e42a)
2022-06-19 12:54:12 +01:00
Sergio Martins
4c177d7823 Save the last known window state from the window manager POV
Required for QTBUG-102430

(cherry-picked from commit 7e6c5b2d9f)
2022-06-19 12:52:35 +01:00
Sergio Martins
e763cb138a Add a comment regarding QTBUG-102430 2022-06-19 12:47:11 +01:00
Sergio Martins
6da693c5da 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.

(cherry-picked from commit d4fe17a0bf)
2022-06-19 12:42:48 +01:00
Sergio Martins
d1de3a29b4 CMakeLists.txt - Python bindings are not supported in Unity builds
fixes #284

(cherry-picked from commit c6ce421432)
2022-06-19 12:30:57 +01:00
Sergio Martins
940991c75e Use FloatingWindow::isMaximizedOverride() instead of isMaximized()
This is for issue #286.
Allows users to workaround buggy window managers.

(cherry-picked from commit 47f773ab7c)
2022-06-19 12:22:32 +01:00
Sergio Martins
c0d1bd3f92 tests|qtquick|Windows: Stabilize a test
The warning is benign and unrelated to anything kddw is doing

(cherry-picked from commit 1f638d2c7a)
2022-06-19 12:16:46 +01:00
Sergio Martins
92192b7949 Fix position of right overlay dockwidgets when there's a toolbar on the left
(cherry-picked from commit 7b73393095)
2022-06-19 12:15:23 +01:00
Sergio Martins
9fda86a511 Linux: Fix dragging of maximized floating windows
They should restore their normal size when the drag starts

(cherry-picked from commit 1305dee081)
2022-06-19 12:13:50 +01:00
Sergio Martins
4114f00183 Added dockWidgetInserted|Removed signals to TabBarWidget
Since QTabBar doesn't have them.
Useful for custom tab bars

(cherry-picked from commit 743dbc0718)
2022-06-19 12:04:25 +01:00
Sergio Martins
848327d8b3 TitleBarWidget: Mark members as protected
So custom titlebars have more power

(cherry-picked from commit fd4588de0f)
2022-06-19 11:59:21 +01:00
Sergio Martins
44d38f9f84 Added TitleBar::tabBar()
Useful for people writing custom titlebar's with style that depends
on the current tab

(cherry-picked from commit 6ba10cfe12)
2022-06-19 11:57:26 +01:00
Sergio Martins
fe7f71d986 MDI: Fix another case of showing resize handles wrong
(cherry-picked from commit 25b04d7ed8)
2022-06-19 11:48:08 +01:00
Sergio Martins
05b7980cfe 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.

(cherry-picked from commit e345e89c35)
2022-06-19 11:46:18 +01:00
Sergio Martins
e2e34fb11b examples: Remove more duplicate MyWidget.cpp/h files
share with main example instead

(cherry-picked from commit bb4cf802f5)
2022-06-19 11:35:54 +01:00
Sergio Martins
1935d3bace example: Allow to test propagation of close event in the mdi example
(cherry-picked from commit 701069617c)
2022-06-19 11:32:37 +01:00
Sergio Martins
8767159cc9 example: Remove duplicate minimal-mdi/MyWidget.cpp
It was using the cpp from the main example but the header from
minimal-mdi. Instead, share both the impl and the header

(cherry-picked from commit a8c50f1876)
2022-06-19 11:28:41 +01:00
Sergio Martins
198bd60565 example: Added --blocks-close-event
Makes dock widget #0 reject the close event, meaning it won't close.

(cherry-picked from commit 21765efbac)
2022-06-19 11:18:02 +01:00
Sergio Martins
f8b1745c68 Forward QCloseEvent to the MDI widgets too
Fixes case where docked MDI widgets were not able to block a close

(cherry-picked from commit 61cca1e5ec)
2022-06-19 00:56:42 +01:00
Sergio Martins
30f43d7579 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.

(cherry-picked from commit 7db9938b85)
2022-06-19 00:46:49 +01:00
Sergio Martins
950914e15c Further move onCloseEvent to base class
So that it can be reused by MDI layouts too

(cherry-picked from commit 01cc915734)
2022-06-19 00:34:31 +01:00
Sergio Martins
bd4aed18c9 Refactor: Move close event logic from FloatingWindow to DropArea
So main window can use it too

(cherry-picked from commit 3454b67a45)
2022-06-19 00:32:46 +01:00
Sergio Martins
d47130f0c8 appveyor: cherry-picked changed from master
f98ce37c12
339edf1143
2022-06-19 00:25:07 +01:00
Sergio Martins
f530668711 Don't dereference potentially nullptr 2022-06-19 00:23:54 +01:00
Sergio Martins
67bb7c16cf CMakeLists.txt - find COMPONENTS to search for Qt modules
(cherry-picked from commit 8b8ef7f2b0)
2022-06-19 00:22:01 +01:00
Sergio Martins
c30a266c01 Don't try to restore to previous position if there isn't any
(cherry-picked from commit 524dff9105)
2022-06-19 00:14:33 +01:00
Sergio Martins
66b91c1de3 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

(cherry-picked from commit 0099a19a82)
2022-06-19 00:09:21 +01:00
Sergio Martins
4c670a552e MDI: Fix resize cursor appearing for frames that had others on top
(cherry-picked from commit e6b8636e88)
2022-06-19 00:05:19 +01:00
Sergio Martins
d5e46dff31 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

(cherry picked from commit 86419fd979)
2022-06-18 23:37:02 +01:00
Sergio Martins
303532483b vscode: filter-out some todo-tree folders, mostly 3rdparty 2022-06-18 22:24:21 +01:00
Sergio Martins
ff92af1e62 Removed some TODOs
The comment is still there in case it's interesting for someone,
but it's not something that will be worked on
2022-06-18 22:24:21 +01:00
Sergio Martins
49b2a10cc6 Fix QtQuick build on Windows 2022-06-18 19:13:45 +01:00
Sergio Martins
a3f7126dfe cmake: Prefix ci build dirs with "build-" 2022-06-18 19:49:08 +01:00
Sergio Martins
2faecc68c0 Don't build the "Fuzzer"
It hasn't been needed in a long time.
I'll enable it once it's needed. Build needs fixing though
2022-06-18 19:48:19 +01:00
Sergio Martins
fe75297a29 cmake: Add CI presets
The idea is to test the different code paths, that means:
  - Qt5 vs Qt6
  - dev-mode vs release

but also to test that the qtquick frontend isn't including anything
from qtwidgets and vice-versa.
2022-06-18 19:40:59 +01:00
Sergio Martins
60c6ffaabb Rename MDIArea class to MDIArea_qtwidgets
To match the filename now
2022-06-18 18:15:19 +01:00
Sergio Martins
408fe315ed Rename MDIArea.h to views/MDIArea_qtwidgets.h
As done for all other views. This one was missing
2022-06-18 17:51:19 +01:00
Sergio Martins
c7f33f589e README: Add warning that 2.0 is in active development 2022-06-18 13:44:49 +01:00
Sergio Martins
942d086905 Fix linking on Qt/macOS 2022-06-18 13:36:07 +01:00