mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 00:45:56 +08:00
Merge remote-tracking branch 'origin/qt6_beyond_the_splash' into qt6_beyond_the_splash
This commit is contained in:
commit
90f03befc8
@ -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
|
||||
{
|
||||
|
@ -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()
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
@ -97,7 +97,7 @@ Item
|
||||
|
||||
anchors.fill: parent
|
||||
|
||||
acceptedButtons: Qt.MouseButton.RightButton
|
||||
acceptedButtons: Qt.RightButton
|
||||
hoverEnabled: true;
|
||||
|
||||
onClicked: base.contextMenuRequested()
|
||||
|
Loading…
x
Reference in New Issue
Block a user