mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47: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 2.2
|
||||||
import QtQuick.Controls 1.1
|
import QtQuick.Controls 1.1
|
||||||
|
import QtQuick.Controls 2.15 as QQC2
|
||||||
import QtQuick.Controls.Styles 1.1
|
import QtQuick.Controls.Styles 1.1
|
||||||
|
import QtQml.Models 2.15 as Models
|
||||||
import QtQuick.Layouts 1.1
|
import QtQuick.Layouts 1.1
|
||||||
import QtQuick.Dialogs 1.1
|
import QtQuick.Dialogs 1.1
|
||||||
import QtQuick.Window 2.2
|
import QtQuick.Window 2.2
|
||||||
|
@ -235,7 +237,7 @@ UM.Dialog
|
||||||
anchors.leftMargin: base.textMargin
|
anchors.leftMargin: base.textMargin
|
||||||
anchors.top: activeScriptsList.bottom
|
anchors.top: activeScriptsList.bottom
|
||||||
anchors.topMargin: base.textMargin
|
anchors.topMargin: base.textMargin
|
||||||
menu: scriptsMenu
|
onClicked: scriptsMenu.open()
|
||||||
style: ButtonStyle
|
style: ButtonStyle
|
||||||
{
|
{
|
||||||
label: Label
|
label: Label
|
||||||
|
@ -244,15 +246,16 @@ UM.Dialog
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Menu
|
QQC2.Menu
|
||||||
{
|
{
|
||||||
id: scriptsMenu
|
id: scriptsMenu
|
||||||
|
width: parent.width
|
||||||
|
|
||||||
Instantiator
|
Models.Instantiator
|
||||||
{
|
{
|
||||||
model: manager.loadedScriptList
|
model: manager.loadedScriptList
|
||||||
|
|
||||||
MenuItem
|
QQC2.MenuItem
|
||||||
{
|
{
|
||||||
text: manager.getScriptLabelByKey(modelData.toString())
|
text: manager.getScriptLabelByKey(modelData.toString())
|
||||||
onTriggered: manager.addScriptToList(modelData.toString())
|
onTriggered: manager.addScriptToList(modelData.toString())
|
||||||
|
@ -422,7 +425,7 @@ UM.Dialog
|
||||||
tooltip.target.x = position.x + 1
|
tooltip.target.x = position.x + 1
|
||||||
}
|
}
|
||||||
|
|
||||||
onHideTooltip: tooltip.hide()
|
function onHideTooltip() { tooltip.hide() }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue