mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-12-11 16:00:47 -07:00
CURA-4354 fixed plugin injected tool icon path finding, example in PerObjectSettingsTool
This commit is contained in:
parent
045f1ce259
commit
11241642b3
3 changed files with 12 additions and 19 deletions
|
|
@ -34,28 +34,18 @@ Item
|
|||
Button
|
||||
{
|
||||
text: model.name
|
||||
iconSource:
|
||||
{
|
||||
var result = UM.Theme.getIcon(model.icon)
|
||||
if(result == "")
|
||||
{
|
||||
return model.location + "/" + model.icon
|
||||
}
|
||||
return result
|
||||
}
|
||||
iconSource: (UM.Theme.getIcon(model.icon) != "") ? UM.Theme.getIcon(model.icon) : "file:///" + model.location + "/" + model.icon
|
||||
checkable: true
|
||||
checked: model.active
|
||||
enabled: model.enabled && UM.Selection.hasSelection && UM.Controller.toolsEnabled
|
||||
style: UM.Theme.styles.tool_button
|
||||
|
||||
checkable: true;
|
||||
checked: model.active;
|
||||
enabled: model.enabled && UM.Selection.hasSelection && UM.Controller.toolsEnabled;
|
||||
|
||||
style: UM.Theme.styles.tool_button;
|
||||
onCheckedChanged:
|
||||
{
|
||||
if(checked)
|
||||
{
|
||||
onCheckedChanged: {
|
||||
if (checked) {
|
||||
base.activeY = y
|
||||
}
|
||||
}
|
||||
|
||||
//Workaround since using ToolButton"s onClicked would break the binding of the checked property, instead
|
||||
//just catch the click so we do not trigger that behaviour.
|
||||
MouseArea
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue