QmlDesigner: Make ColorEditor scrollable

Make the ColorEditor react to mouse wheel events when having the mouse
inside of it. Use a WheelHandler to forward wheel events to the ItemPane
by calling the flick() function.

Task-number: QDS-4698
Change-Id: Ic1bcaf21e80d6bdc6dfcc6eb2e4b0341778a7c2f
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Henning Gruendl
2021-07-14 13:32:28 +02:00
committed by Henning Gründl
parent 4d8d91647e
commit 8b8f7dca4d

View File

@@ -281,6 +281,12 @@ SecondColumnLayout {
T.Popup { T.Popup {
id: cePopup id: cePopup
WheelHandler {
onWheel: function(event) {
Controller.mainScrollView.flick(0, event.angleDelta.y * 5)
}
}
onOpened: { onOpened: {
if (Controller.mainScrollView === null) if (Controller.mainScrollView === null)
return return