diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorCarousel.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorCarousel.qml index e604b7af1c..df6748cc36 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorCarousel.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorCarousel.qml @@ -38,24 +38,10 @@ Item } height: parent.height z: 10 - LinearGradient + Rectangle { anchors.fill: parent - start: Qt.point(0, 0) - end: Qt.point(leftHint.width, 0) - gradient: Gradient - { - GradientStop - { - position: 0.0 - color: UM.Theme.getColor("monitor_stage_background") - } - GradientStop - { - position: 1.0 - color: UM.Theme.getColor("monitor_stage_background_fade") - } - } + color: UM.Theme.getColor("monitor_stage_background") } MouseArea { @@ -193,24 +179,11 @@ Item height: centerSection.height z: 10 - LinearGradient + Rectangle { anchors.fill: parent - start: Qt.point(0, 0) - end: Qt.point(rightHint.width, 0) - gradient: Gradient - { - GradientStop - { - position: 0.0 - color: UM.Theme.getColor("monitor_stage_background_fade") - } - GradientStop - { - position: 1.0 - color: UM.Theme.getColor("monitor_stage_background") - } - } + color: UM.Theme.getColor("monitor_stage_background_fade") + } MouseArea { diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 2b419a5d76..61b4813d28 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -48,6 +48,22 @@ UM.MainWindow tooltip.hide(); } + MouseArea + { + // Hack introduced when switching to qt6 + // We used to be able to let the main window's default handlers control this, but something seems to be changed + // for qt6 in the ordering. TODO; We should find out what changed and have a less hacky fix for that. + enabled: parent.visible + anchors.fill: parent + hoverEnabled: true + acceptedButtons: Qt.AllButtons + onPositionChanged: (mouse) => {base.mouseMoved(mouse);} + onPressed: (mouse) => { base.mousePressed(mouse);} + onReleased: (mouse) => { base.mouseReleased(mouse);} + onWheel: (wheel) => {base.wheel(wheel)} + + } + Rectangle { id: greyOutBackground @@ -148,7 +164,7 @@ UM.MainWindow //DeleteSelection on the keypress backspace event Keys.onPressed: { - if (event.key == Qt.Key.Key_Backspace) + if (event.key == Qt.Key_Backspace) { Cura.Actions.deleteSelection.trigger() } diff --git a/resources/qml/ExpandableComponent.qml b/resources/qml/ExpandableComponent.qml index 3742c6d5e5..6717be94a5 100644 --- a/resources/qml/ExpandableComponent.qml +++ b/resources/qml/ExpandableComponent.qml @@ -307,4 +307,16 @@ Item contentItem: Item {} } } + + // DO NOT MOVE UP IN THE CODE: This connection has to be here, after the definition of the content item. + // Apparently the order in which these are handled matters and so the height is correctly updated if this is here. + Connections + { + // Since it could be that the content is dynamically populated, we should also take these changes into account. + target: content.contentItem + function onHeightChanged() + { + contentContainer.height = contentHeader.height + content.height + } + } } diff --git a/resources/qml/Menus/RecentFilesMenu.qml b/resources/qml/Menus/RecentFilesMenu.qml index 8f4f328927..19ff681219 100644 --- a/resources/qml/Menus/RecentFilesMenu.qml +++ b/resources/qml/Menus/RecentFilesMenu.qml @@ -29,7 +29,7 @@ Cura.Menu } onTriggered: CuraApplication.readLocalFile(modelData) } - onObjectAdded: menu.insertItem(index, object) - onObjectRemoved: menu.removeItem(object) + onObjectAdded: (index, object) => menu.insertItem(index, object) + onObjectRemoved: (object) => menu.removeItem(object) } } diff --git a/resources/qml/Settings/SettingItem.qml b/resources/qml/Settings/SettingItem.qml index b7c276369d..6787855775 100644 --- a/resources/qml/Settings/SettingItem.qml +++ b/resources/qml/Settings/SettingItem.qml @@ -97,7 +97,7 @@ Item anchors.fill: parent - acceptedButtons: Qt.MouseButton.RightButton + acceptedButtons: Qt.RightButton hoverEnabled: true; onClicked: base.contextMenuRequested()