mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
Fix add script button list not working in MacOS
Fixed by using the qt quick controls 2 CURA-8127
This commit is contained in:
parent
1132e4c6f9
commit
b2b258d357
1 changed files with 8 additions and 5 deletions
|
@ -3,7 +3,9 @@
|
|||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Controls 1.1
|
||||
import QtQuick.Controls 2.15 as QQC2
|
||||
import QtQuick.Controls.Styles 1.1
|
||||
import QtQml.Models 2.15 as Models
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Dialogs 1.1
|
||||
import QtQuick.Window 2.2
|
||||
|
@ -235,7 +237,7 @@ UM.Dialog
|
|||
anchors.leftMargin: base.textMargin
|
||||
anchors.top: activeScriptsList.bottom
|
||||
anchors.topMargin: base.textMargin
|
||||
menu: scriptsMenu
|
||||
onClicked: scriptsMenu.open()
|
||||
style: ButtonStyle
|
||||
{
|
||||
label: Label
|
||||
|
@ -244,15 +246,16 @@ UM.Dialog
|
|||
}
|
||||
}
|
||||
}
|
||||
Menu
|
||||
QQC2.Menu
|
||||
{
|
||||
id: scriptsMenu
|
||||
width: parent.width
|
||||
|
||||
Instantiator
|
||||
Models.Instantiator
|
||||
{
|
||||
model: manager.loadedScriptList
|
||||
|
||||
MenuItem
|
||||
QQC2.MenuItem
|
||||
{
|
||||
text: manager.getScriptLabelByKey(modelData.toString())
|
||||
onTriggered: manager.addScriptToList(modelData.toString())
|
||||
|
@ -422,7 +425,7 @@ UM.Dialog
|
|||
tooltip.target.x = position.x + 1
|
||||
}
|
||||
|
||||
onHideTooltip: tooltip.hide()
|
||||
function onHideTooltip() { tooltip.hide() }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue