Sergio Martins
13a5a472cd
Fix build
2021-09-08 23:17:39 +01:00
Sergio Martins
83c8c22736
Add a TitleBar::isFocused property so we can use with qss
...
This has nothing to do with QWidget::hasFocus, but regarding our
focus scope support
2021-09-08 22:31:51 +01:00
Sergio Martins
c8ca7bf9e1
Allow TitleBarWidget to honour the stylesheet background color
2021-09-08 20:22:20 +01:00
Sergio Martins
736358a71f
cmake: Introduce KDDockWidgets_X11EXTRAS option, default ON
...
Use -DKDDockWidgets_X11EXTRAS=OFF to disable it, if you don't want
to link to Qt5X11Extras.
I've added a new option instead of relying on auto-detection, because
I want to make it difficult to disable it when on X11, it's opt-out.
X11Extras is needed when window managers don't have compositors, in
that case we use icons without transparency.
2021-09-07 12:19:20 +01:00
Sergio Martins
bffe671679
Fix QtQuick build
2021-09-04 20:11:35 +01:00
Sergio Martins
fafc0b7946
Fix "normal geometry" not being restored
...
When restoring a maximized window, calling QWidget::showNormal()
on it wouldn't set it's previous non-maximized size.
QWidget::normalGeometry() doesn't have a setter, so use private API.
2021-09-04 19:59:03 +01:00
Sergio Martins
3574feea98
Added isNormalWindowState()
...
As QWidget doesn't have it.
2021-09-04 13:38:06 +01:00
Sergio Martins
25b48920bb
Make FloatingWindow::normalGeometry() virtual
...
So it can be overridden by QtQuick, since there's no "normal geometry"
for QWindow.
Also useful to workaround window manager bugs in a class derived from FloatingWindow.
2021-09-03 15:33:46 +01:00
Sergio Martins
e22ca48674
Fix QtQuick build
2021-09-03 00:18:42 +01:00
Sergio Martins
3b9773f872
Add support for restoring minimized/maximized floating window state
2021-09-02 18:32:35 +01:00
Sergio Martins
3e3cf10fff
Allow to override FloatingWindow maximization/minimization
...
So users can workaround bugs in window managers / Qt, such as QTBUG-95478
The custom behavior needs to be done in a FloatingWindow sub-class,
as a generic workaround which doesn't break other window managers isn't
possible
2021-09-02 18:08:13 +01:00
Sergio Martins
421b401b4f
qtquick: Added QWidgetAdapter::isMinimized()
2021-09-02 17:31:05 +01:00
Sergio Martins
a0c97e3388
Fix layout save restore when using MainWindowOption_HasCentralWidget
...
Those checks don't make sense anymore
2021-09-02 11:05:57 +01:00
Sergio Martins
4ea7953a76
Don't allow to overlay central widget
2021-09-02 10:52:56 +01:00
Sergio Martins
0cc0972eea
Don't allow to close/float/tab persistent central widget
...
Fixes corner cases with MainWindowOption_HasCentralWidget
2021-09-02 10:30:34 +01:00
Sergio Martins
77b5d1630d
Added DockWidget::isPersistentCentralDockWidget()
2021-09-02 10:24:43 +01:00
Sergio Martins
f962989484
Fix MainWindow::addDockWidgetAsTab with MainWindowOption_HasCentralWidget
...
When using central widget no tabs are supported
2021-09-02 10:17:37 +01:00
Sergio Martins
1ccdf445eb
Introduce MainWindowOption_HasCentralWidget
...
You can now set an arbitrary widget as "central widget".
It's similar to MainWindowOption_HasCentralFrame, however the widget
won't be detachable and won't show tabs.
Similar to what you'd get with QMainWindow central widget concept.
Example:
QWidget *myWidget = new MyWidget();
mainWindow->setPersistentCentralWidget(myWidget);
Fixes #225
2021-08-30 10:12:46 +01:00
Sergio Martins
3fb8861eee
Remove "EXPERIMENTAL" comment from MDI option
...
MDI doesn't have known bugs
2021-08-29 17:43:21 +01:00
Sergio Martins
9ee52a0011
Merge branch '1.4'
2021-08-22 16:34:25 +01:00
Sergio Martins
240169ce23
Fix bug where the central frame would be detached
...
We don't allow detaching the central frame.
Fixes #228
2021-08-22 16:33:19 +01:00
Albert Astals Cid
5cc7a0864b
Fix KDDockWidgetsConfig to require the proper Qt version
...
And for Qt5X11Extras we only require it if building the Qt5 one
2021-08-11 16:26:10 +02:00
Albert Astals Cid
e4671f175c
Install the qt6 cmake targets in prefix lib/cmake/KDDockWidgets-qt6
...
So it does not collide with the qt5 files
2021-08-11 16:19:05 +02:00
Albert Astals Cid
7ed3945d58
Make qt5/qt6 includes coinstallable
...
Even if they are "the same file" it's always good to not have packages
trying to install over the same files.
Since we don't want users to have to change their existing
#include <kddockwidgets/DockWidget.h>
We install the qt6 includes in include/kddockwidgets-qt6/kddockwidgets
and change the cmake target INTERFACE_INCLUDE_DIRECTORIES to be
"${_IMPORT_PREFIX}/include/kddockwidgets-qt6"
so everything is transparent for the user
2021-08-11 15:22:29 +02:00
Sergio Martins
ffe5d5f6cb
Merge branch '1.4'
2021-08-10 10:05:13 +01:00
Sergio Martins
aff4450b42
cmake: Install QWidgetAdapter_quick_p.h too
...
Fixes #224
2021-08-10 10:04:11 +01:00
Allen Winter
d40580c550
buildsystem - rename QT_MAJOR_VERSION to Qt_VERSION_MAJOR
...
as this is consistent with CMake style and other projects
2021-08-04 16:18:31 -04:00
Sérgio Martins
200ef12b4a
Fix close icon being too dark
...
Fixes #208
2021-07-22 18:11:53 +01:00
Allen Winter
c85904c67e
2 more misspelling fixes for contractions.
2021-07-15 10:25:53 -04:00
Allen Winter
22a709a39e
fix more misspellings
2021-07-15 10:14:04 -04:00
Allen Winter
4f4a5de700
fix misspellings found by codespell
2021-07-15 09:46:53 -04:00
Sergio Martins
214dbdf359
qtquick: Fix clazy-connect-not-normalized
2021-07-14 16:10:07 +01:00
Allen Winter
74ba8c6bd2
src/CMakeLists.txt - coding style
...
consistent indentation, etc.
2021-07-13 16:59:53 -04:00
Allen Winter
11a1023e79
src/CMakeLists.txt - generate and install camelcase headers
...
for public headers and exported classes only
2021-07-13 16:58:25 -04:00
Renato Araujo Oliveira Filho
ec4a4d1c86
Python: Create bindings for InitialOption
...
Added bindings for missing enums
Added InitialOption as value type
Task-Id: #198
2021-07-13 17:33:09 +01:00
Sergio Martins
8800c02403
Fix persistent central frame becoming invisible
...
Wouldn't affect functionality but would have a different color.
Fixes #220
2021-07-13 08:19:05 +01:00
Allen Winter
dd9ec48979
DragController.cpp - fix multi-line comment [-Werror=comment]
...
caused by clang-format
2021-07-12 17:37:59 -04:00
Allen Winter
7001aa58ce
clang-format on code base
2021-07-12 17:05:37 -04:00
Allen Winter
d87898b59e
private/DragController.cpp - don't include QWindow more than once
2021-07-12 17:04:15 -04:00
Sergio Martins
4b06706d61
Port away from deprecated QWidget::isTopLevel()
...
Fixes Qt6 warnings about it
2021-07-10 07:18:27 -07:00
Sergio Martins
3088f33837
Fix non-windows build
2021-07-10 06:44:48 -07:00
Sergio Martins
1d598d2585
windows: Fix all clang-cl warnings
...
Mostly int vs uint conversions.
In preparation to add -Werror
2021-07-10 06:43:04 -07:00
Sergio Martins
768c51f01c
windows: Fix a -Wunused-lambda-capture warning
2021-07-10 06:27:23 -07:00
Sergio Martins
a2e2b32fc3
cmake: Don't pass -fvisibility=hidden to clang-cl
...
It's not supported
2021-07-10 06:22:24 -07:00
Sergio Martins
02c17e59dd
relax a warning about not finding dock widget to restore
...
If the user provided a factory and it returns nullptr on purpose
then don't warn, it's intentional by the user
2021-07-06 23:12:49 +01:00
Sergio Martins
238193f56b
qtquick: DockWidget now receives QQmlEngine as param
...
If nullptr then the usual Config::qmlEngine() will be used.
2021-07-04 18:41:52 +01:00
Sergio Martins
2241b938c9
qtquick|minor: Decouple a bit more from Config::self().qmlEngine()
...
Moves it up one layer, will be easier to remove
2021-07-03 17:26:59 +01:00
Sergio Martins
631d036c26
qtquick: Exclude two clazy-old-style-connect warnings
...
Those two cases are fine and required
2021-07-03 16:44:04 +01:00
Sergio Martins
d70f795dea
qtquick: Fix a -Wclazy-func-args-by-value
2021-07-03 16:39:25 +01:00
Sergio Martins
0be99d3e79
qtquick: Fix -Wclazy-missing-qobject-macro
2021-07-03 16:33:21 +01:00