mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 23:23:57 -06:00
Merge branch 'master' into CURA-5570_beyond_comprehension
This commit is contained in:
commit
de1b8edb72
51 changed files with 527 additions and 92 deletions
|
@ -26,7 +26,6 @@ Column
|
|||
|
||||
OutputDeviceHeader
|
||||
{
|
||||
width: parent.width
|
||||
outputDevice: connectedDevice
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ Item
|
|||
|
||||
Rectangle
|
||||
{
|
||||
anchors.fill: parent
|
||||
height: childrenRect.height
|
||||
color: UM.Theme.getColor("setting_category")
|
||||
property var activePrinter: outputDevice != null ? outputDevice.activePrinter : null
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2015 Ultimaker B.V.
|
||||
// Copyright (c) 2018 Ultimaker B.V.
|
||||
// Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.2
|
||||
|
@ -21,8 +21,8 @@ Item
|
|||
{
|
||||
id: buttons;
|
||||
|
||||
anchors.bottom: parent.bottom;
|
||||
anchors.left: parent.left;
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
spacing: UM.Theme.getSize("button_lining").width
|
||||
|
||||
Repeater
|
||||
|
@ -34,20 +34,22 @@ Item
|
|||
height: childrenRect.height
|
||||
Button
|
||||
{
|
||||
text: model.name
|
||||
text: model.name + (model.shortcut ? (" (" + model.shortcut + ")") : "")
|
||||
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
|
||||
|
||||
onCheckedChanged: {
|
||||
if (checked) {
|
||||
base.activeY = y
|
||||
onCheckedChanged:
|
||||
{
|
||||
if (checked)
|
||||
{
|
||||
base.activeY = y;
|
||||
}
|
||||
}
|
||||
|
||||
//Workaround since using ToolButton"s onClicked would break the binding of the checked property, instead
|
||||
//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
|
||||
{
|
||||
|
@ -57,7 +59,7 @@ Item
|
|||
forceActiveFocus() //First grab focus, so all the text fields are updated
|
||||
if(parent.checked)
|
||||
{
|
||||
UM.Controller.setActiveTool(null)
|
||||
UM.Controller.setActiveTool(null);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -96,11 +98,13 @@ Item
|
|||
|
||||
width:
|
||||
{
|
||||
if (panel.item && panel.width > 0){
|
||||
return Math.max(panel.width + 2 * UM.Theme.getSize("default_margin").width)
|
||||
if (panel.item && panel.width > 0)
|
||||
{
|
||||
return Math.max(panel.width + 2 * UM.Theme.getSize("default_margin").width);
|
||||
}
|
||||
else {
|
||||
return 0
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
height: panel.item ? panel.height + 2 * UM.Theme.getSize("default_margin").height : 0;
|
||||
|
@ -124,7 +128,7 @@ Item
|
|||
x: UM.Theme.getSize("default_margin").width;
|
||||
y: UM.Theme.getSize("default_margin").height;
|
||||
|
||||
source: UM.ActiveTool.valid ? UM.ActiveTool.activeToolPanel : "";
|
||||
source: UM.ActiveTool.valid ? UM.ActiveTool.activeToolPanel : ""
|
||||
enabled: UM.Controller.toolsEnabled;
|
||||
}
|
||||
}
|
||||
|
@ -148,6 +152,6 @@ Item
|
|||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
|
||||
visible: toolHint.text != "";
|
||||
visible: toolHint.text != ""
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue