diff options
author | Janne Kangas <janne.kangas@qt.io> | 2018-08-15 07:06:46 +0300 |
---|---|---|
committer | Janne Kangas <janne.kangas@qt.io> | 2018-08-15 08:07:46 +0000 |
commit | 55a5e7847eead76677d9f98219171db9733f229d (patch) | |
tree | 49e70b134b04329582a72cef90fc3092bed655cc /src/Authoring/Studio/Palettes | |
parent | 4814571049c060c5c80fe2f59fc8a5f8e13d4079 (diff) |
Make datainput selector popup placement fixed
Change positioning in both slide and inspector panels
Change-Id: Ibb197cd12ad9a5b08b632539101731dc85702878
Task-Id: QT3DS-2059
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src/Authoring/Studio/Palettes')
-rw-r--r-- | src/Authoring/Studio/Palettes/Inspector/InspectorControlView.qml | 19 | ||||
-rw-r--r-- | src/Authoring/Studio/Palettes/Slide/SlideView.qml | 2 |
2 files changed, 10 insertions, 11 deletions
diff --git a/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.qml b/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.qml index 918d8940..be27b47f 100644 --- a/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.qml +++ b/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.qml @@ -256,7 +256,11 @@ Rectangle { _parentView.showDataInputChooser( model.modelData.handle, model.modelData.instance, - mapToGlobal(mouse.x, mouse.y)); + mapToGlobal( + ctrldPropButton.x + + ctrldPropButton.width, + ctrldPropButton.y + + ctrldPropButton.height)); } else { groupDelegateItem.showContextMenu( mapToItem(root, mouse.x, mouse.y)); @@ -270,7 +274,7 @@ Rectangle { } Image { - id: controlledPropertyButton + id: ctrldPropButton property bool controlled: model.modelData.controlled @@ -288,8 +292,8 @@ Rectangle { } Item { - width: (controlledPropertyButton.visible - ? 4 : controlledPropertyButton.width + 4) + width: (ctrldPropButton.visible + ? 4 : ctrldPropButton.width + 4) height: loadedItem.height + 4 // Add little space between items } @@ -319,12 +323,7 @@ Rectangle { acceptedButtons: Qt.RightButton | Qt.LeftButton hoverEnabled: true onClicked: { - if (mouse.button === Qt.LeftButton) { - _parentView.showDataInputChooser( - model.modelData.handle, - model.modelData.instance, - mapToGlobal(mouse.x, mouse.y)); - } else { + if (mouse.button === Qt.RightButton) { groupDelegateItem.showContextMenu( mapToItem(root, mouse.x, mouse.y)); } diff --git a/src/Authoring/Studio/Palettes/Slide/SlideView.qml b/src/Authoring/Studio/Palettes/Slide/SlideView.qml index 32393ffa..3e60b76b 100644 --- a/src/Authoring/Studio/Palettes/Slide/SlideView.qml +++ b/src/Authoring/Studio/Palettes/Slide/SlideView.qml @@ -354,7 +354,7 @@ Rectangle { hoverEnabled: true acceptedButtons: Qt.LeftButton onClicked: { - _parentView.showControllerDialog(mapToGlobal(mouse.x, mouse.y)); + _parentView.showControllerDialog(mapToGlobal(x + width, y + height)); } } Image { |