Sergio Martins
759cf33f08
Windows: Link to Dwmapi.lib via pragma
...
So I don't have to figure out some exotic non-cmake build systems
It's more self-contained this way anyway.
2021-06-16 12:41:40 +01:00
Sergio Martins
77279d21ef
Fixed a MSVC warning about unreachable code
2021-06-16 12:32:25 +01:00
Sergio Martins
cc1347adf8
qtquick: Don't use native windows drop shadow with round corners
...
When using the Windows native drop shadow, the client area needs
to be rectangular, otherwise a white line appears at the top
2021-04-23 11:47:37 +01:00
Sergio Martins
02515d8956
MDI: Fix dock widget size getting out of sync with the layout item
...
When resizing with mouse, update the layout item too.
Wasn't a big deal, as this is MDI, layout doesn't do much. But
last used geometries werent being saved
2021-03-09 20:30:41 +00:00
Sergio Martins
9fe11a7ad5
qtwidgets|MDI: Fix showing resize handles
...
if there was no frame being resized it would be nullptr, and hence
enter that block.
QtQuick not affected since it uses mouse areas to change the cursor
shape
2021-03-05 12:19:16 +00:00
Sergio Martins
b099994ac5
qtquick|MDI: Remove the QtQuick special case
...
Now behaves as QtWidgets
2021-03-05 12:05:19 +00:00
Sergio Martins
c81ca45e41
qtquick|MDI: Improvements for resizing
2021-03-03 15:21:22 +00:00
Sergio Martins
9ce50fa305
qtquick: Minor refactoring, deal in CursorPosition
2021-03-03 14:59:24 +00:00
Sergio Martins
bc17c8e5b3
MDI: Don't active other resize handlers when resize in progress
...
When we're resizing a docked dock widget, the other dock widget's
resize handlers should be disabled
2021-03-02 22:21:12 +00:00
Sergio Martins
4ef2ddbfec
Add DockRegistry::frameInMDIResize()
...
Only emitted in a MDI layout. Emitted when one dockwidget is
being resized
2021-03-02 22:00:54 +00:00
Sergio Martins
cb2ffe66af
qtquick|MDI: Fix resizing inner MDI dock widgets
...
It was flaky. The mouse move events came from global event filter
but the mouse press came from the Frame's mouse area. Sometimes the
QQuickWindow wouldn't deliver the press to the frame if it was done
outside, while the moves were changing the cursor shape since
we had a treshold
Now we guarantee that whenever the cursor changes the resize
will really happen
2021-03-02 14:40:42 +00:00
Sergio Martins
14ff8bb26b
Fix mingw build
2021-02-19 11:33:01 +00:00
Sergio Martins
615bb0ee3f
Fix linux developer-build
2021-02-19 11:25:02 +00:00
Sergio Martins
986fd8c13b
CustomFrame: Don't use QWindow::fromWinId()
...
as that creates a new QWindow
2021-02-18 18:43:43 +00:00
Sergio Martins
3874e2d886
CustomFrame: Added a recursion guard
2021-02-18 18:32:14 +00:00
Sergio Martins
1afcf21529
CustomFrame: Same some cpu cycles in case we don't care about the events
2021-02-18 18:21:32 +00:00
Sergio Martins
9aafa2a662
CustomFrame: the native event handling now honours the features
2021-02-18 15:50:12 +00:00
Sergio Martins
029ba1202e
CustomFrame: Add a NativeFeatures enum
...
Replaces the htCaptionRect. As we don't want to pass many arguments,
instead just pass a struct which describes which native features
to enable
2021-02-18 15:14:52 +00:00
Sergio Martins
b5043b2b87
CustomFrame: Move the features enum up 1 level
2021-02-18 14:40:20 +00:00
Sergio Martins
52ce80fd97
CustomFrame: Use an enum instead of bool return in our callback
2021-02-18 14:22:26 +00:00
Sergio Martins
cd19c5eb38
CustomFrame: Allow to specify a callback for QWindow opt-in
...
Which QWindows should get a custom frame is up to you. Just
return true in the callback.
2021-02-18 14:10:40 +00:00
Sergio Martins
0d101d779f
Fix unused variable warning
2021-02-18 11:29:02 +00:00
Sergio Martins
98d892f643
CustomFrame: Apply the drop-shadow code initially
2021-02-17 19:46:56 +00:00
Milian Wolff
cc80afff7d
Fix compile on Linux
2021-02-17 20:36:37 +01:00
Sergio Martins
8b23769ccc
Remove some debug code
2021-02-17 18:17:48 +00:00
Sergio Martins
feadc1ff9e
Add a CustomFrameHelper class
...
So we can reuse the custom frame for arbitrary windows
2021-02-17 18:02:51 +00:00
Sergio Martins
e6135f49fb
Make WidgetResizeHandler::handleWindowsNativeEvent() more generic
...
Decoupled it from the KDDW specific parts. Can now be used
by non FloatingWindow widgets
2021-02-16 20:28:59 +00:00
Sergio Martins
94ee2e55fd
Move FloatingWindow::setupWindow() into a reusable function
...
So other QWindow can use this
2021-02-15 22:03:44 +00:00
Sergio Martins
e3c370eb6b
Revert "Move FloatingWindow::setupWindow() into a reusable function"
...
This reverts commit 6fea5af585 .
Need to fix the windows build first
2021-02-15 10:43:15 -08:00
Sergio Martins
6fea5af585
Move FloatingWindow::setupWindow() into a reusable function
...
So other QWindow can use this
2021-02-15 18:29:19 +00:00
Sergio Martins
8941f41d1c
Moved NCHITTESTEventFilter to WidgetResizeHandler
...
It's a better fit there.
2021-02-15 17:36:22 +00:00
Sergio Martins
c52db1945b
Minor rename for readability
2021-02-14 17:52:36 +00:00
Sergio Martins
09a10cd791
Minor rename for readability
2021-02-14 17:42:35 +00:00
Sergio Martins
07fd577894
MDI|qtquick: Fix resize cursor not being shown
...
the docked widgets were resizable but the cursor didn't change
shape
2021-02-14 17:41:01 +00:00
Sergio Martins
329a980510
WidgetResizeHandler: Fix case if parent's target wasn't top-level
...
By luck parentGeometry was in global space. Force it to be in global
space, as the target might be more nested.
Will be used by MDI, where Frame's parent is the MDI layout
2021-02-11 19:35:40 +00:00
Sergio Martins
d8605e9ce3
Minor styling: Reduce nesting, process invariant early
2021-02-11 19:15:36 +00:00
Sergio Martins
64db52fd17
Move the CursorPositions header to the enums header instead
...
Otherwise will have to include WidgetResizeHandler_p.h
where I don't want to. And make it an installed header etc.
2021-02-11 18:52:21 +00:00
Allen Winter
a2f4c972a6
update copyright year
2021-01-02 09:27:50 -05:00
Jacob Young
0fe58fd160
Fix filename case so that it will build on a case-sensitive filesystem.
2020-12-28 12:34:03 +00:00
Sergio Martins
5c0c9799a4
Fix build with clang -Wsigness
2020-12-22 15:14:13 +00:00
Sergio Martins
8b97088c70
Fix QtQuick build
2020-12-18 17:39:24 +00:00
Sergio Martins
e5809c06c7
Enable resizing the overlayed dock widgets
...
Fixed WidgetResizeHandler to not allow it to resize the overlay
bigger than its parent
For issue #116
The size isn't remembered though. Next time you open the overlay
it will have the previous size.
2020-12-18 17:15:54 +00:00
Sergio Martins
468074cda8
Fix min/max not being respected when resizing overlay popup
...
While the min size wasn't set the min size hint was.
Use our wrapper which honours the size hint.
Also for isssue #118
2020-12-18 15:32:43 +00:00
Sergio Martins
7acbe0c62e
Make the WidgetResizeHandler margin public
2020-12-18 15:23:52 +00:00
Sergio Martins
2c1a70280a
WidgetResizeHandler: Fix the geometry calculation for non-toplevels
2020-12-18 15:20:58 +00:00
Sergio Martins
a437bc5d07
Minor WidgetResizeHandler cleanups
2020-12-18 12:11:28 +00:00
Sergio Martins
2447bb12c8
WidgetResizeHandler: Dont' accept the release if we're not resizing
2020-12-18 11:58:08 +00:00
Sergio Martins
1082d5e8e1
Added WidgetResizeHandler::setAllowedResizeSides()
2020-12-18 10:43:36 +00:00
Sergio Martins
4635405fb5
Allow WidgetResizeHandler to act on global event filter
...
Needed for widgets which are not top-levels
2020-12-17 19:47:19 +00:00
Sergio Martins
c481875e55
Fix WidgetResizeHandler::cursorPosition() for negative positions
...
Usually we don't get negative relative positions, since we're
tracking top-level widgets which wouldn't receive exterior mouse
events to begin with.
But we want the WidgetResizeHandler to work for embedded widgets
too, for example for the sidebar overlays.
2020-12-17 19:47:19 +00:00