Sergio Martins
f174ab6ebc
qtquick: Create ResizeHandlerHelper.qml to save some code
2021-03-03 12:57:37 +00:00
Sergio Martins
263f936690
Fix dock widgets in MDI getting bogus sizes
...
Setting the Item's min-size would resize the guest while the
guest was being set
2021-03-03 12:20:40 +00:00
Sergio Martins
bd903a0353
qtquick: Fix Frame's minimum size
...
It wasn't accounting for the margins, and the "heightWhenVisible"
property was Nan, making the entire expression be 0
2021-03-03 10:08:37 +00:00
Sergio Martins
5040d3a6b6
qtquick: Allow to update the size constraints from QML
2021-03-03 10:02:45 +00:00
Sergio Martins
3684da776d
Added DockWidgetQuick::frameVisualItem()
2021-03-03 09:27:27 +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
778c647782
qtquick: Register Frame
2021-03-02 22:14:07 +00:00
Sergio Martins
2a91f6279b
qtquick: Minor code refactoring
...
Uses less code
2021-03-02 22:05:48 +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
ff06f0cc73
Fix build
2021-03-02 21:06:57 +00:00
Sergio Martins
a37ab34fae
qtquick|MDI: When dragging don't trigger the resize drag handlers
...
MouseArea.enabled, even if false, will change the cursor shape.
So explicitly change the cursor to ArrowShape
2021-03-02 20:58:44 +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
16b0770d72
qtquick: Fix minor qml warning
2021-03-02 14:31:15 +00:00
Sergio Martins
3fe44ee735
qtquick: Enable transparency for the floating window
...
You can now have windows with round corners
2021-03-02 12:19:51 +00:00
Sergio Martins
40d1a72300
qtquick: Fix QtQuick min-sizes not working when wrapped
2021-03-02 11:02:15 +00:00
Sergio Martins
4d428d42f6
Added DockWidgetBase::setMDIZ(int z)
...
Sets the Z order of the dockwidget within the MDI layout
2021-03-02 10:43:07 +00:00
Sergio Martins
7e9896263b
Update .gitignore
2021-03-02 10:22:57 +00:00
Sergio Martins
cf0665c9b6
Added DockWidgetBase::setMDISize()
...
Only for dock widgets in MDI layout, where they are freely resizable
2021-03-02 10:21:29 +00:00
Sergio Martins
93c011c69d
Added DockWidgetBase::setMDIPosition(QPoint pos)
...
Moves the window within the layout.
Only applies to MDI layouts.
2021-03-01 23:41:53 +00:00
Sergio Martins
f50c0b9d06
qtquick: Fix typo
2021-03-01 23:24:29 +00:00
Sergio Martins
6fc79d942b
qtquick: add a way to disable the default mouse redirectors
...
So user can use his own
2021-03-01 23:23:04 +00:00
Sergio Martins
d01228d9ff
Fixes cases where actualTitleBarChanged() wasn't emitted
2021-03-01 23:02:56 +00:00
Sergio Martins
b58d766d54
qtquick: Add Q_INVOKABLE to DockWidgetBase::setFloating()
2021-03-01 22:38:23 +00:00
Sergio Martins
79cbb96a38
Remove some unneeded qDebug
2021-03-01 22:34:15 +00:00
Sergio Martins
aabaeacb81
Improve a warning
2021-03-01 22:30:31 +00:00
Sergio Martins
3ab3e6d41b
qtquick: Don't allow to have two redirectors for the same source
...
One event source can only have one redirector
2021-03-01 22:23:46 +00:00
Sergio Martins
f2f4afd0bb
qtquick: Allow the user to customize the titlebar margins
2021-03-01 20:50:46 +00:00
Sergio Martins
0d62c43b9e
qtquick: keep the original parent of the guest around
...
For debug purposes
2021-03-01 19:58:00 +00:00
Sergio Martins
1614d5702c
Allow to call DockWidget::setWidget(nullptr)
...
In case you need to change ownership
2021-03-01 19:56:46 +00:00
Sergio Martins
610b9542e9
qtquick: Expose the event source for debug purposes
2021-03-01 17:13:54 +00:00
Sergio Martins
946f32a274
qtquick: debug++
2021-03-01 17:12:09 +00:00
Sergio Martins
c7a6bc015e
qtquick: Minor performance optimization
...
Only check the properties for mouse events
2021-03-01 16:54:32 +00:00
Sergio Martins
19fd1635e6
Remove userType() from public API for now
...
If added, will need to be through overloads, to not break source
compat. Will add them once there's a need.
2021-03-01 16:34:22 +00:00
Sergio Martins
74b034a195
Merge branch '1.3'
...
Fixes #172
2021-03-01 15:48:45 +00:00
David Faure
581139d099
SideBarButton: use color roles from the widget palette
2021-03-01 16:42:59 +01:00
Sergio Martins
e5492ea906
qtquick: Allow to override the mouse redirector
2021-03-01 14:50:14 +00:00
Sergio Martins
623133a0dc
qtquick: Add DockWidgetQuick::actualTitleBar()
...
It's a pointer o either Frame::titleBar() or FloatingWindow::titleBar().
It's the same as Frame::actualTitleBar().
2021-03-01 14:35:14 +00:00
Sergio Martins
6baa8f2dbb
qtquicl: Fix invisible tab bar eating mouse events
2021-03-01 14:19:39 +00:00
Sergio Martins
d2739d7218
qtquick: disable tabbar mouse area if tabbar hidden
2021-03-01 13:15:30 +00:00
Sergio Martins
5702101935
Add a Q_PROPERTY for Frame::actualTitleBar()
2021-03-01 12:50:25 +00:00
Sergio Martins
35d45a7523
qtquick: Fix some places which weren't forwarding userType
2021-02-28 20:44:19 +00:00
Sergio Martins
e37c1f0e8c
qtquick: Pass the userType all the way to titleBarFilename()
2021-02-28 20:33:46 +00:00
Sergio Martins
ac0d35ef12
Fix clazy warning
2021-02-28 19:03:16 +00:00
Sergio Martins
15e63381a9
Added DockWidgetBase::setUserType(int)
...
This is an opaque value which KDDW won't try to interpret or do
anything with it other than forward it to the FrameworkWidgetFactory.
Which if specialized by the user he can have different title bars
for different said "dock widget types"
2021-02-28 18:57:35 +00:00
Sergio Martins
aa49ddacd5
qtquick: Allow the user to change the contents margin for Frame
2021-02-28 18:13:55 +00:00
Sergio Martins
f68e876bcb
qtquick: Make the setWidget(QQuickItem) overload also fill parent
2021-02-28 16:05:44 +00:00
Sergio Martins
6b82ded399
qtquick: Allow derived FloatingWindow to override margins
2021-02-28 16:04:28 +00:00
Sergio Martins
000e67a09e
qtquick: Register DockWidgetBase
2021-02-28 15:26:05 +00:00
Sergio Martins
1b6aa4c3d1
qtquick: Inject the dock registry into the context
...
Useful to call from QML if needed
2021-02-28 15:01:05 +00:00
Sergio Martins
8912a2c842
Remove debug
2021-02-28 14:50:12 +00:00