Merge branch '15.10'

* 15.10: (37 commits)
  Tweak the initial camera position
  Never disable the view button
  Use selection status to disable/enable tools rather than platform activity
  JSON: bugfix: skirt_speed was the only child of speed_layer_0, which meant you couldnt tweak them separately
  Fix Windows build
  Move all contributed profiles to an "Other" manufacturer
  Bump version
  Make the Infill buttons and support checkboxes in Simple mode functional
  Fix the variants menu so the variants actually get added
  Try to add a page when the name of a wizard page is unknown
  Catch any exception that happens while trying to eject
  Set High Quality to 0.08 layer height
  Capture stdout and stderr on Windows to prevent py2exe messages
  Add missing Ulti and Low quality profiles
  JSON: bugfix/feat: wall_line_width defaults to nozzle size and wall_line_count computed properly
  When you click [Manage Printers..] it brings you to the right page
  Delay showing the Add Machine dialog until after the main window is properly shown
  Adds a smaller cross icon
  Use the job name for saving files
  Update RemovableDrive and USB output devices to use the new file_name parameter
  ...
This commit is contained in:
Arjen Hiemstra 2015-10-01 15:47:18 +02:00
commit 7982e79940
32 changed files with 10681 additions and 225 deletions

View file

@ -68,7 +68,7 @@ class CuraApplication(QtApplication):
if not hasattr(sys, "frozen"):
Resources.addSearchPath(os.path.join(os.path.abspath(os.path.dirname(__file__)), ".."))
super().__init__(name = "cura", version = "15.09.82")
super().__init__(name = "cura", version = "15.09.85")
self.setWindowIcon(QIcon(Resources.getPath(Resources.Images, "cura-icon.png")))
@ -90,6 +90,7 @@ class CuraApplication(QtApplication):
self._i18n_catalog = None
self._previous_active_tool = None
self._platform_activity = False
self._job_name = None
self.getMachineManager().activeMachineInstanceChanged.connect(self._onActiveMachineChanged)
self.getMachineManager().addMachineRequested.connect(self._onAddMachineRequested)
@ -165,25 +166,21 @@ class CuraApplication(QtApplication):
self._physics = PlatformPhysics.PlatformPhysics(controller, self._volume)
camera = Camera("3d", root)
camera.setPosition(Vector(-150, 150, 300))
camera.setPosition(Vector(0, 250, 900))
camera.setPerspective(True)
camera.lookAt(Vector(0, 0, 0))
controller.getScene().setActiveCamera("3d")
self.getController().getTool("CameraTool").setOrigin(Vector(0, 100, 0))
self._camera_animation = CameraAnimation.CameraAnimation()
self._camera_animation.setCameraTool(self.getController().getTool("CameraTool"))
controller.getScene().setActiveCamera("3d")
self.showSplashMessage(self._i18n_catalog.i18nc("@info:progress", "Loading interface..."))
self.setMainQml(Resources.getPath(self.ResourceTypes.QmlFiles, "Cura.qml"))
self.initializeEngine()
manager = self.getMachineManager()
if not self.getMachineManager().getMachineInstances():
self.requestAddPrinter.emit()
if self._engine.rootObjects:
self.closeSplash()
@ -248,6 +245,17 @@ class CuraApplication(QtApplication):
self._platform_activity = True if count > 0 else False
self.activityChanged.emit()
@pyqtSlot(str)
def setJobName(self, name):
if self._job_name != name:
self._job_name = name
self.jobNameChanged.emit()
jobNameChanged = pyqtSignal()
@pyqtProperty(str, notify = jobNameChanged)
def jobName(self):
return self._job_name
## Remove an object from the scene
@pyqtSlot("quint64")
def deleteObject(self, object_id):
@ -536,6 +544,8 @@ class CuraApplication(QtApplication):
op = AddSceneNodeOperation(node, self.getController().getScene().getRoot())
op.push()
self.getController().getScene().sceneChanged.emit(node) #Force scene change.
def _onJobFinished(self, job):
if type(job) is not ReadMeshJob or not job.getResult():
return

View file

@ -13,5 +13,10 @@ sys.excepthook = exceptHook
import cura.CuraApplication
if sys.platform == "win32" and hasattr(sys, "frozen"):
from UM.Resources import Resources
sys.stdout = open(Resources.getStoragePath(Resources.Resources, "stdout.log"), "w")
sys.stderr = open(Resources.getStoragePath(Resources.Resources, "stderr.log"), "w")
app = cura.CuraApplication.CuraApplication.getInstance()
app.run()

View file

@ -77,6 +77,8 @@ class CuraEngineBackend(Backend):
self._message = None
self.backendConnected.connect(self._onBackendConnected)
Application.getInstance().getController().toolOperationStarted.connect(self._onToolOperationStarted)
Application.getInstance().getController().toolOperationStopped.connect(self._onToolOperationStopped)
## Get the command that is used to call the engine.
# This is usefull for debugging and used to actually start the engine
@ -221,10 +223,16 @@ class CuraEngineBackend(Backend):
self._socket.sendMessage(slice_message)
def _onSceneChanged(self, source):
if (type(source) is not SceneNode) or (source is self._scene.getRoot()) or (source.getMeshData() is None):
if type(source) is not SceneNode:
return
if(source.getMeshData().getVertices() is None):
if source is self._scene.getRoot():
return
if source.getMeshData() is None:
return
if source.getMeshData().getVertices() is None:
return
self._onChanged()

View file

@ -102,14 +102,15 @@ class LayerView(View):
continue
except:
continue
if self._current_layer_mesh: #Threading thing; Switching between views can cause the current layer mesh to be deleted.
self._current_layer_mesh.addVertices(layer_mesh.getVertices())
# Scale layer color by a brightness factor based on the current layer number
# This will result in a range of 0.5 - 1.0 to multiply colors by.
brightness = (2.0 - (i / self._solid_layers)) / 2.0
if self._current_layer_mesh:
self._current_layer_mesh.addColors(layer_mesh.getColors() * brightness)
if self._current_layer_mesh:
renderer.queueNode(node, mesh = self._current_layer_mesh, material = self._material)
if not self._current_layer_jumps:

View file

@ -22,13 +22,13 @@ class RemovableDriveOutputDevice(OutputDevice):
self.setIconName("save_sd")
self.setPriority(1)
def requestWrite(self, node):
def requestWrite(self, node, file_name = None):
gcode_writer = Application.getInstance().getMeshFileHandler().getWriterByMimeType("text/x-gcode")
if not gcode_writer:
Logger.log("e", "Could not find GCode writer, not writing to removable drive %s", self.getName())
raise OutputDeviceError.WriteRequestFailedError()
file_name = None
if file_name == None:
for n in BreadthFirstIterator(node):
if n.getMeshData():
file_name = n.getName()

View file

@ -37,7 +37,11 @@ class RemovableDrivePlugin(OutputDevicePlugin):
raise NotImplementedError()
def ejectDevice(self, device):
try:
result = self.performEjectDevice(device)
except Exception as e:
result = False
if result:
message = Message(catalog.i18nc("@info:status", "Ejected {0}. You can now safely remove the drive.").format(device.getName()))
message.show()

View file

@ -88,13 +88,10 @@ class WindowsRemovableDrivePlugin(RemovableDrivePlugin.RemovableDrivePlugin):
result = None
# Then, try and tell it to eject
try:
if not windll.kernel32.DeviceIoControl(handle, IOCTL_STORAGE_EJECT_MEDIA, None, None, None, None, None, None):
result = False
else:
result = True
except Exception as e:
result = False
# Finally, close the handle
windll.kernel32.CloseHandle(handle)

View file

@ -323,6 +323,7 @@ class PrinterConnection(OutputDevice, QObject, SignalEmitter):
## Close the printer connection
def close(self):
Logger.log("d", "Closing the printer connection.")
if self._connect_thread.isAlive():
try:
self._connect_thread.join()
@ -411,6 +412,7 @@ class PrinterConnection(OutputDevice, QObject, SignalEmitter):
def createControlInterface(self):
if self._control_view is None:
Logger.log("d", "Creating control interface for printer connection")
path = QUrl.fromLocalFile(os.path.join(PluginRegistry.getInstance().getPluginPath("USBPrinting"), "ControlWindow.qml"))
component = QQmlComponent(Application.getInstance()._engine, path)
self._control_context = QQmlContext(Application.getInstance()._engine.rootContext())
@ -455,7 +457,7 @@ class PrinterConnection(OutputDevice, QObject, SignalEmitter):
self._bed_temperature = temperature
self.bedTemperatureChanged.emit()
def requestWrite(self, node):
def requestWrite(self, node, file_name = None):
self.showControlInterface()
def _setEndstopState(self, endstop_key, value):

View file

@ -2,7 +2,7 @@
"id": "rigidbotbig",
"version": 1,
"name": "RigidBot",
"manufacturer": "Invent-A-Part",
"manufacturer": "Other",
"author": "RBC",
"platform": "rigidbot_platform.stl",

View file

@ -2,7 +2,7 @@
"id": "rigidbotbig",
"version": 1,
"name": "RigidBotBig",
"manufacturer": "Invent-A-Part",
"manufacturer": "Other",
"author": "RBC",
"platform": "rigidbotbig_platform.stl",

View file

@ -2,7 +2,7 @@
"id": "bq_hephestos",
"version": 1,
"name": "BQ Prusa i3 Hephestos",
"manufacturer": "BQ",
"manufacturer": "Other",
"author": "BQ",
"platform": "hephestos_platform.stl",
"inherits": "fdmprinter.json",

View file

@ -2,7 +2,7 @@
"id": "bq_hephestos_xl",
"version": 1,
"name": "BQ Prusa i3 Hephestos XL",
"manufacturer": "BQ",
"manufacturer": "Other",
"author": "BQ",
"platform": "hephestos_platform.stl",
"inherits": "fdmprinter.json",

View file

@ -2,7 +2,7 @@
"id": "bq_witbox",
"version": 1,
"name": "BQ Witbox",
"manufacturer": "BQ",
"manufacturer": "Other",
"author": "BQ",
"platform": "witbox_platform.stl",
"inherits": "fdmprinter.json",

View file

@ -149,7 +149,6 @@
"default": 0.4,
"type": "float",
"visible": false,
"inherit_function": "max(machine_nozzle_size, (wall_thickness / (int(wall_thickness / (machine_nozzle_size - 0.0001) + 1))) if (wall_thickness / (int(wall_thickness / (machine_nozzle_size - 0.0001))) > machine_nozzle_size * 1.5) else (wall_thickness / int(wall_thickness / (machine_nozzle_size - 0.0001))))",
"children": {
"wall_line_width_0": {
"label": "Outer Wall Line Width",
@ -257,6 +256,7 @@
"min_value_warning": "0.2",
"max_value_warning": "5",
"type": "float",
"inherit_function": "parent_value",
"visible": false,
"children": {
"wall_line_count": {
@ -266,7 +266,7 @@
"default": 2,
"type": "int",
"visible": false,
"inherit_function": "max(1, (int(parent_value / (machine_nozzle_size - 0.0001) + 1) if (parent_value / max(1, int(parent_value / (machine_nozzle_size - 0.0001))) > machine_nozzle_size) * 1.5 else int(parent_value / (machine_nozzle_size - 0.0001))))"
"inherit_function": "max(1, round((wall_thickness - wall_line_width_0) / wall_line_width_x) + 1)"
}
}
},
@ -408,8 +408,7 @@
"description": "Number of lines around skin regions. Using one or two skin perimeter lines can greatly improve on roofs which would start in the middle of infill cells.",
"default": 0,
"type": "int",
"visible": false,
"enabled": "top_bottom_pattern"
"visible": false
},
"xy_offset": {
"label": "Horizontal expansion",
@ -777,8 +776,8 @@
"type": "float",
"min_value": "0.1",
"default": 15,
"visible": false,
"children": {
"visible": false
},
"skirt_speed": {
"label": "Skirt Speed",
"description": "The speed at which the skirt and brim are printed. Normally this is done at the initial layer speed. But sometimes you want to print the skirt at a different speed.",
@ -786,9 +785,8 @@
"type": "float",
"min_value": "0.1",
"default": 15,
"visible": false
}
}
"visible": false,
"inherit_function": "speed_layer_0"
},
"speed_slowdown_layers": {
"label": "Amount of Slower Layers",

View file

@ -3,7 +3,7 @@
"version": 1,
"name": "German RepRap Neo",
"manufacturer": "Other",
"author": "other",
"author": "Other",
"icon": "icon_ultimaker.png",
"platform": "grr_neo_platform.stl",

View file

@ -2,8 +2,8 @@
"id": "prusa_i3",
"version": 1,
"name": "Prusa i3",
"manufacturer": "Prusa",
"author": "other",
"manufacturer": "Other",
"author": "Other",
"icon": "icon_ultimaker2.png",
"platform": "prusai3_platform.stl",

View file

@ -43,19 +43,19 @@
"default": [
[
-40,
30
10
],
[
-40,
-10
-30
],
[
60,
-10
10
],
[
60,
30
-30
]
]
},

View file

@ -3,4 +3,4 @@ version = 1
name = High Quality
[settings]
layer_height = 0.06
layer_height = 0.08

View file

@ -0,0 +1,6 @@
[general]
version = 1
name = High Quality
[settings]
layer_height = 0.15

View file

@ -0,0 +1,6 @@
[general]
version = 1
name = Ulti Quality
[settings]
layer_height = 0.06

View file

@ -72,7 +72,7 @@ UM.MainWindow
text: catalog.i18nc("@action:inmenu", "&Save Selection to File");
enabled: UM.Selection.hasSelection;
iconName: "document-save-as";
onTriggered: UM.OutputDeviceManager.requestWriteSelectionToDevice("local_file");
onTriggered: UM.OutputDeviceManager.requestWriteSelectionToDevice("local_file", Printer.jobName);
}
Menu
{
@ -88,7 +88,7 @@ UM.MainWindow
MenuItem
{
text: model.description;
onTriggered: UM.OutputDeviceManager.requestWriteToDevice(model.id);
onTriggered: UM.OutputDeviceManager.requestWriteToDevice(model.id, Printer.jobName);
}
onObjectAdded: saveAllMenu.insertItem(index, object)
onObjectRemoved: saveAllMenu.removeItem(object)
@ -373,6 +373,7 @@ UM.MainWindow
{
id: viewModeButton
property bool verticalTooltip: true
anchors
{
top: parent.top;
@ -389,12 +390,13 @@ UM.MainWindow
id: viewMenu;
Instantiator
{
id: viewMenuInstantiator
model: UM.ViewModel { }
MenuItem
{
text: model.name;
text: model.name
checkable: true;
checked: model.active;
checked: model.active
exclusiveGroup: viewMenuGroup;
onTriggered: UM.Controller.setActiveView(model.id);
}
@ -413,7 +415,7 @@ UM.MainWindow
anchors {
left: parent.left
top: parent.top
topMargin: 74
topMargin: UM.Theme.sizes.window_margin.height + UM.Theme.sizes.button.height
//horizontalCenter: parent.horizontalCenter
//horizontalCenterOffset: -(UM.Theme.sizes.sidebar.width / 2)
//top: parent.top;
@ -543,8 +545,8 @@ UM.MainWindow
addMachine.onTriggered: addMachineWizard.visible = true;
preferences.onTriggered: preferences.visible = true;
configureMachines.onTriggered: { preferences.visible = true; preferences.setPage(2); }
preferences.onTriggered: { preferences.visible = true; }
configureMachines.onTriggered: { preferences.visible = true; preferences.setPage(3); }
manageProfiles.onTriggered: { preferences.visible = true; preferences.setPage(4); }
documentation.onTriggered: CuraActions.openDocumentation();
@ -648,14 +650,30 @@ UM.MainWindow
onRequestAddPrinter:
{
addMachineWizard.visible = true
addMachineWizard.firstRun = true
addMachineWizard.firstRun = false
}
}
Component.onCompleted:
{
UM.Theme.load(UM.Resources.getPath(UM.Resources.Themes, "cura"))
base.visible = true;
visible = true;
addMachineTimer.start();
}
Timer
{
id: addMachineTimer;
interval: 100;
repeat: false;
onTriggered:
{
if(UM.MachineManager.activeMachineInstance == "")
{
addMachineWizard.firstRun = true;
addMachineWizard.open();
}
}
}
}

View file

@ -8,23 +8,19 @@ import QtQuick.Layouts 1.1
import UM 1.1 as UM
Column{
Item{
id: base;
UM.I18nCatalog { id: catalog; name:"cura"}
property int totalHeightProfileSetup: childrenRect.height
property Action manageProfilesAction
spacing: 0
Rectangle{
id: variantItem;
height: UM.Theme.sizes.sidebar_setup.height
width: base.width
visible: UM.MachineManager.hasVariants;
Rectangle {
id: variantRow
anchors.top: base.top
width: base.width
height: parent.heigth
height: UM.Theme.sizes.sidebar_setup.height
//visible: UM.MachineManager.hasVariants;
visible: true
Label{
id: variantLabel
@ -61,16 +57,19 @@ Column{
exclusiveGroup: variantSelectionMenuGroup;
onTriggered: UM.MachineManager.setActiveMachineVariant(model.getItem(index).name)
}
onObjectAdded: variantsSelectionMenu.insertItem(index, object)
onObjectRemoved: variantsSelectionMenu.removeItem(object)
}
ExclusiveGroup { id: variantSelectionMenuGroup; }
}
}
}
}
Rectangle{
id: globalProfileRow;
anchors.top: UM.MachineManager.hasVariants ? variantRow.bottom : base.top
//anchors.top: variantRow.bottom
height: UM.Theme.sizes.sidebar_setup.height
width: base.width
@ -148,8 +147,4 @@ Column{
// }
}
}
Rectangle{
width: base.width
height: UM.Theme.sizes.default_margin.width/2
}
}

View file

@ -62,7 +62,7 @@ Rectangle {
Rectangle{
id: printJobRow
implicitWidth: base.width;
implicitHeight: UM.Theme.sizes.sidebar_header.height
implicitHeight: UM.Theme.sizes.save_button_header.height
anchors.top: parent.top
color: UM.Theme.colors.sidebar_header_bar
Label{
@ -83,6 +83,7 @@ Rectangle {
height: UM.Theme.sizes.sidebar_inputFields.height
property int unremovableSpacing: 5
text: ''
onTextChanged: Printer.setJobName(text)
onEditingFinished: {
if (printJobTextfield.text != ''){
printJobTextfield.focus = false
@ -110,6 +111,7 @@ Rectangle {
implicitWidth: base.width
implicitHeight: UM.Theme.sizes.sidebar_specs_bar.height
anchors.top: printJobRow.bottom
visible: base.progress > 0.99 && base.activity == true
Item{
id: time
width: childrenRect.width;
@ -188,12 +190,23 @@ Rectangle {
text: UM.OutputDeviceManager.activeDeviceShortDescription
onClicked:
{
UM.OutputDeviceManager.requestWriteToDevice(UM.OutputDeviceManager.activeDevice)
UM.OutputDeviceManager.requestWriteToDevice(UM.OutputDeviceManager.activeDevice, Printer.jobName)
}
style: ButtonStyle {
background: Rectangle {
color: control.hovered ? UM.Theme.colors.load_save_button_hover : UM.Theme.colors.load_save_button
//opacity: control.enabled ? 1.0 : 0.5
//Behavior on opacity { NumberAnimation { duration: 50; } }
color: {
if(!control.enabled){
return UM.Theme.colors.button;
}
else if(control.enabled && control.hovered) {
return UM.Theme.colors.load_save_button_hover
} else {
return UM.Theme.colors.load_save_button
}
}
Behavior on color { ColorAnimation { duration: 50; } }
width: {
var w = 0;
@ -205,15 +218,15 @@ Rectangle {
saveToButton.resizedWidth = actualLabel.width + (UM.Theme.sizes.default_margin.width * 2)
w = actualLabel.width + (UM.Theme.sizes.default_margin.width * 2)
}
if(w < base.width * 0.55) {
w = base.width * 0.55;
}
return w;
}
Label {
id: actualLabel
opacity: control.enabled ? 1.0 : 0.4
//Behavior on opacity { NumberAnimation { duration: 50; } }
anchors.centerIn: parent
color: UM.Theme.colors.load_save_button_text
font: UM.Theme.fonts.default

View file

@ -76,6 +76,7 @@ Rectangle
id: sidebarContents;
anchors.bottom: saveButton.top
anchors.top: profileItem.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.left: base.left
anchors.right: base.right

View file

@ -39,18 +39,17 @@ Item
Rectangle{
id: settingsModeSelection
width: parent.width/100*55
height: childrenRect.height - UM.Theme.sizes.default_margin.width;
height: UM.Theme.sizes.sidebar_header_mode_toggle.height
anchors.right: parent.right
anchors.rightMargin: UM.Theme.sizes.default_margin.width;
anchors.verticalCenter: parent.verticalCenter
Component{
id: wizardDelegate
Button {
id: simpleModeButton
height: settingsModeSelection.height
anchors.left: parent.left
anchors.leftMargin: model.index * (settingsModeSelection.width / 2)
anchors.top: parent.top
anchors.verticalCenter: parent.verticalCenter
width: parent.width / 2
text: model.text
exclusiveGroup: modeMenuGroup;
@ -81,8 +80,6 @@ Item
anchors.top: parent.top
anchors.left: parent.left
width: parent.width
height: UM.Theme.sizes.sidebar_header.height
currentIndex: base.currentIndex;
}
}
}
@ -90,8 +87,9 @@ Item
Rectangle {
id: machineSelectionRow
width: base.width
height: UM.Theme.sizes.sidebar_header.height
height: UM.Theme.sizes.sidebar_setup.height
anchors.top: settingsModeRow.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.horizontalCenter: parent.horizontalCenter
Label{
@ -110,7 +108,6 @@ Item
width: parent.width/100*55
height: UM.Theme.sizes.setting_control.height
tooltip: UM.MachineManager.activeMachineInstance;
//style: UM.Theme.styles.sidebar_header_button;
anchors.right: parent.right
anchors.rightMargin: UM.Theme.sizes.default_margin.width
anchors.verticalCenter: parent.verticalCenter

View file

@ -41,7 +41,7 @@ Item
Label{
id: infillCaption
width: infillCellLeft.width - UM.Theme.sizes.default_margin.width
text: infillModel.get(infillListView.activeIndex).text
text: infillModel.count > 0 && infillListView.activeIndex != -1 ? infillModel.get(infillListView.activeIndex).text : ""
font: UM.Theme.fonts.caption
wrapMode: Text.Wrap
color: UM.Theme.colors.text
@ -51,65 +51,80 @@ Item
}
}
Rectangle{
Flow {
id: infillCellRight
height: 100
height: childrenRect.height;
width: base.width / 100 * 45
anchors.right: parent.right
anchors.rightMargin: UM.Theme.sizes.default_margin.width - (UM.Theme.sizes.default_margin.width/4)
anchors.top: parent.top
anchors.topMargin: UM.Theme.sizes.default_margin.height
Component{
id: infillDelegate
Repeater {
id: infillListView
property int activeIndex: {
if(!UM.ActiveProfile.valid)
{
return -1;
}
var density = parseInt(UM.ActiveProfile.settingValues.infill_sparse_density);
for(var i = 0; i < infillModel.count; ++i)
{
if(infillModel.get(i).percentage == density)
{
return i;
}
}
return -1;
}
model: infillModel;
Item {
width: infillCellRight.width/3
x: index * (infillCellRight.width/3)
anchors.top: parent.top
width: childrenRect.width;
height: childrenRect.height;
Rectangle{
id: infillIconLining
anchors.top: parent.top
anchors.horizontalCenter: parent.horizontalCenter
width: parent.width - (UM.Theme.sizes.default_margin.width/2)
height: parent.width - (UM.Theme.sizes.default_margin.width/2)
width: infillCellRight.width / 3 - UM.Theme.sizes.default_margin.width;
height: width
border.color: infillListView.activeIndex == index ? UM.Theme.colors.setting_control_text : UM.Theme.colors.setting_control_border
border.width: infillListView.activeIndex == index ? 2 : 1
color: infillListView.activeIndex == index ? UM.Theme.colors.setting_category_active : "transparent"
UM.RecolorImage {
Image {
id: infillIcon
z: parent.z + 1
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
width: parent.width - UM.Theme.sizes.default_margin.width
height: parent.width - UM.Theme.sizes.default_margin.width
anchors.fill: parent;
anchors.margins: UM.Theme.sizes.default_margin.width / 2
sourceSize.width: width
sourceSize.height: width
color: UM.Theme.colors.setting_control_text
source: UM.Theme.icons[model.icon];
}
MouseArea {
anchors.fill: parent
onClicked: {
infillListView.activeIndex = index
UM.MachineManager.setSettingValue("infill_sparse_density", model.percentage)
}
}
}
Label{
id: infillLabel
anchors.top: infillIconLining.bottom
anchors.horizontalCenter: parent.horizontalCenter
anchors.horizontalCenter: infillIconLining.horizontalCenter
color: infillListView.activeIndex == index ? UM.Theme.colors.setting_control_text : UM.Theme.colors.setting_control_border
text: name
//font.bold: infillListView.activeIndex == index ? true : false
}
}
}
ListView{
id: infillListView
property int activeIndex: 0
model: infillModel
delegate: infillDelegate
anchors.fill: parent
}
ListModel {
id: infillModel
@ -139,11 +154,12 @@ Item
Rectangle {
id: helpersCellLeft
anchors.top: infillCellLeft.bottom
anchors.top: infillCellRight.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.left: parent.left
width: parent.width/100*45 - UM.Theme.sizes.default_margin.width
height: childrenRect.height
Label{
anchors.left: parent.left
anchors.leftMargin: UM.Theme.sizes.default_margin.width
@ -155,7 +171,6 @@ Item
Rectangle {
id: helpersCellRight
anchors.top: helpersCellLeft.top
anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.left: helpersCellLeft.right
width: parent.width/100*55 - UM.Theme.sizes.default_margin.width
height: childrenRect.height
@ -164,37 +179,31 @@ Item
id: skirtCheckBox
anchors.top: parent.top
anchors.left: parent.left
Layout.preferredHeight: UM.Theme.sizes.section.height;
//: Setting enable skirt adhesion checkbox
text: catalog.i18nc("@option:check","Enable Skirt Adhesion");
style: UM.Theme.styles.checkbox;
checked: Printer.getSettingValue("skirt_line_count") == null ? false: Printer.getSettingValue("skirt_line_count");
onCheckedChanged:
checked: UM.ActiveProfile.valid ? UM.ActiveProfile.settingValues.adhesion_type == "brim" : false;
onClicked:
{
if(checked != Printer.getSettingValue("skirt_line_count"))
{
Printer.setSettingValue("skirt_line_count", checked)
}
UM.MachineManager.setSettingValue("adhesion_type", "brim")
}
}
CheckBox{
anchors.top: skirtCheckBox.bottom
anchors.topMargin: UM.Theme.sizes.default_lining.height
anchors.left: parent.left
Layout.preferredHeight: UM.Theme.sizes.section.height;
//: Setting enable support checkbox
text: catalog.i18nc("@option:check","Enable Support");
style: UM.Theme.styles.checkbox;
checked: Printer.getSettingValue("support_enable") == null? false: Printer.getSettingValue("support_enable");
onCheckedChanged:
checked: UM.ActiveProfile.valid ? UM.ActiveProfile.settingValues.support_enable : false;
onClicked:
{
if(checked != Printer.getSettingValue("support_enable"))
{
Printer.setSettingValue("support_enable", checked)
}
UM.MachineManager.setSettingValue("support_enable", checked)
}
}
}

View file

@ -33,6 +33,7 @@ Item {
checkable: true;
checked: model.active;
enabled: UM.Selection.hasSelection;
style: UM.Theme.styles.tool_button;
@ -43,7 +44,6 @@ Item {
onClicked: {
parent.checked ? UM.Controller.setActiveTool(null) : UM.Controller.setActiveTool(model.id);
base.activeY = parent.y
}
}
}
@ -65,7 +65,14 @@ Item {
anchors.left: parent.right;
y: base.activeY
width: panel.item ? Math.max(panel.width + 2 * UM.Theme.sizes.default_margin.width) : 0;
width: {
if (panel.item && panel.width > 0){
return Math.max(panel.width + 2 * UM.Theme.sizes.default_margin.width)
}
else {
return 0
}
}
height: panel.item ? panel.height + 2 * UM.Theme.sizes.default_margin.height : 0;
opacity: panel.item ? 1 : 0

View file

@ -221,6 +221,7 @@ Item
base.wizard.appendPage(Qt.resolvedUrl("Bedleveling.qml"), catalog.i18nc("@title", "Bed Levelling"));
break;
default:
base.wizard.appendPage(Qt.resolvedUrl("%1.qml".arg(pages[i])), pages[i])
break;
}
}

File diff suppressed because it is too large Load diff

After

Width:  |  Height:  |  Size: 760 KiB

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="13px" height="13px" viewBox="0 0 13 13" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<!-- Generator: Sketch 3.3.3 (12081) - http://www.bohemiancoding.com/sketch -->
<title>Fill 1 Copy 3</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<g id="Artboard-9" sketch:type="MSArtboardGroup" fill="#979797">
<path d="M12.9591703,5.77835943 C12.9386134,5.59558436 12.7256076,5.45815541 12.5413815,5.45815541 C11.945715,5.45815541 11.4171607,5.10856711 11.1953879,4.56749729 C10.9691411,4.01342825 11.1150951,3.36745775 11.5588824,2.96031012 C11.6986693,2.832555 11.7157195,2.61858181 11.5985451,2.47002795 C11.2936378,2.08289306 10.9471935,1.73312338 10.5688256,1.43009042 C10.4207554,1.31134407 10.203215,1.32785005 10.0747343,1.47005546 C9.68741806,1.89915061 8.99138546,2.05858755 8.45358056,1.83421498 C7.89413045,1.59877796 7.54103538,1.0317097 7.57574027,0.423043942 C7.58704657,0.231743807 7.44725962,0.065474726 7.25668502,0.0432853613 C6.77105838,-0.0129438188 6.2812599,-0.0145762789 5.79424265,0.0394762878 C5.60602605,0.0602750383 5.46617864,0.222553661 5.47258755,0.411495799 C5.49356769,1.01423633 5.13648216,1.57132845 4.58241312,1.79830086 C4.05101714,2.01535759 3.35994238,1.85712988 2.97335165,1.43178334 C2.84559653,1.29169408 2.63180473,1.27446256 2.48282763,1.39066953 C2.09333475,1.69630233 1.73909092,2.04631387 1.43134196,2.43030475 C1.31138638,2.57958415 1.32910159,2.79591534 1.47009777,2.92415415 C1.92259152,3.33396209 2.06854554,3.9855555 1.83353175,4.54603346 C1.60915919,5.08045252 1.05442507,5.42459928 0.419337643,5.42459928 C0.213163982,5.41800898 0.0664844221,5.55640532 0.0438113656,5.74389638 C-0.0133851983,6.2320624 -0.0140502746,6.72972088 0.0409696758,7.22187736 C0.0615265804,7.40543842 0.280941306,7.54171861 0.4672836,7.54171861 C1.03338447,7.52726831 1.57657045,7.87752169 1.80475209,8.43231627 C2.03196634,8.98638531 1.88577048,9.63211396 1.44125765,10.0397453 C1.30213577,10.1675004 1.28442056,10.3809899 1.40183676,10.5293624 C1.70366049,10.9140788 2.05034664,11.2640903 2.42992383,11.5697231 C2.57890093,11.6896787 2.79547396,11.6729309 2.92468016,11.5304836 C3.31368934,11.1004211 4.0094801,10.941226 4.54510839,11.1660823 C5.10625142,11.4008542 5.45910464,11.9679225 5.4246416,12.5767696 C5.41327484,12.7680697 5.55360594,12.9348225 5.743455,12.9565282 C5.9919517,12.9856102 6.24177855,13 6.4923914,13 C6.73024688,13 6.9680419,12.9870008 7.20589738,12.9605791 C7.39435582,12.9397804 7.53396139,12.7772599 7.52755247,12.5883178 C7.5058468,11.9858191 7.86365786,11.428727 8.41700136,11.2021778 C8.95196457,10.9837304 9.6399558,11.1436511 10.0267884,11.5682721 C10.155269,11.7081195 10.3676098,11.7251091 10.5173124,11.6093859 C10.9060797,11.3044786 11.2596585,10.9547089 11.5687981,10.5697507 C11.6887536,10.4207131 11.671764,10.2041401 11.5300423,10.0756594 C11.0775485,9.66609331 10.9308689,9.01425805 11.1658827,8.45426379 C11.3866881,7.92716057 11.9209257,7.57309812 12.4955517,7.57309812 L12.5758445,7.57521427 C12.7624287,7.59032964 12.9338974,7.44673362 12.9563287,7.25640087 C13.0137066,6.76775115 13.0144321,6.27057637 12.9591703,5.77835943 L12.9591703,5.77835943 Z M6.51034846,8.68196174 C5.31478308,8.68196174 4.34244149,7.7093783 4.34244149,6.51387338 C4.34244149,5.318308 5.31478308,4.34572456 6.51034846,4.34572456 C7.70609523,4.34572456 8.67843682,5.318308 8.67843682,6.51387338 C8.67843682,7.7093783 7.70609523,8.68196174 6.51034846,8.68196174 L6.51034846,8.68196174 Z" id="Fill-1-Copy-3" sketch:type="MSShapeGroup"></path>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.7 KiB

View file

@ -34,17 +34,17 @@ QtObject {
elide: Text.ElideRight;
anchors.left: parent.left;
anchors.leftMargin: UM.Theme.sizes.setting_unit_margin.width
anchors.right: downArrow.left;
anchors.rightMargin: UM.Theme.sizes.setting_unit_margin.width
anchors.right: separationLine.left;
anchors.verticalCenter: parent.verticalCenter;
font: UM.Theme.fonts.default
}
Rectangle{
id: separationLine
width: 1
height: UM.Theme.sizes.setting_control.height
color: UM.Theme.colors.setting_control_border
anchors.right: sidebarComboBoxLabel.right
anchors.rightMargin: UM.Theme.sizes.setting_unit_margin.width
anchors.right: downArrow.left
anchors.rightMargin: UM.Theme.sizes.setting_unit_margin.width + downArrow.width/2
anchors.top: parent.top
z: parent.z + 1
}
@ -57,11 +57,11 @@ QtObject {
ButtonStyle {
background: Item{
implicitWidth: UM.Theme.sizes.button.width;
implicitHeight: UM.Theme.sizes.button.width;
implicitHeight: UM.Theme.sizes.button.height;
Rectangle {
anchors.left: parent.right
anchors.verticalCenter: parent.verticalCenter
color: "white"
color: UM.Theme.colors.button_text
width: control.hovered ? openFileLabel.width : 0;
height: openFileLabel.height
Behavior on width { NumberAnimation { duration: 100; } }
@ -87,7 +87,7 @@ QtObject {
source: control.iconSource;
width: UM.Theme.sizes.button_icon.width;
height: UM.Theme.sizes.button_icon.height;
sourceSize: UM.Theme.sizes.button_icon;
sourceSize: UM.Theme.sizes.button_icon
}
}
}
@ -139,13 +139,10 @@ QtObject {
id: buttonFace;
anchors.fill: parent;
property bool down: control.pressed || (control.checkable && control.checked);
color: {
if(!control.enabled) {
return UM.Theme.colors.button_disabled;
} else if(control.checkable && control.checked && control.hovered) {
if(control.checkable && control.checked && control.hovered) {
return UM.Theme.colors.button_active_hover;
} else if(control.pressed || (control.checkable && control.checked)) {
return UM.Theme.colors.button_active;
@ -159,6 +156,7 @@ QtObject {
Label {
id: tool_button_arrow
opacity: !control.enabled ? 0.4 : 1.0
anchors.right: parent.right;
anchors.rightMargin: (UM.Theme.sizes.button.width - UM.Theme.sizes.button_icon.width - tool_button_arrow.width) / 2
anchors.verticalCenter: parent.verticalCenter;
@ -173,12 +171,12 @@ QtObject {
label: Item {
Image {
anchors.centerIn: parent;
opacity: !control.enabled ? 0.4 : 1.0
source: control.iconSource;
width: UM.Theme.sizes.button_icon.width;
height: UM.Theme.sizes.button_icon.height;
sourceSize: UM.Theme.sizes.button_icon;
sourceSize: UM.Theme.sizes.button_icon
}
}
}
@ -243,7 +241,7 @@ QtObject {
width: UM.Theme.sizes.button_icon.width;
height: UM.Theme.sizes.button_icon.height;
sourceSize: UM.Theme.sizes.button_icon;
sourceSize: UM.Theme.sizes.button_icon
}
}
}
@ -334,10 +332,10 @@ QtObject {
minimumPointSize: 8
}
UM.RecolorImage {
id: lengthIcon
id: category_arrow
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: UM.Theme.sizes.default_margin.width * 2
anchors.rightMargin: UM.Theme.sizes.default_margin.width * 2 - width / 2
width: UM.Theme.sizes.standard_arrow.width
height: UM.Theme.sizes.standard_arrow.height
sourceSize.width: width

View file

@ -71,7 +71,7 @@
"button_active": [32, 166, 219, 255],
"button_active_hover": [77, 184, 226, 255],
"button_text": [255, 255, 255, 255],
"button_disabled": [245, 245, 245, 255],
"button_disabled": [0, 0, 0, 255],
"button_tooltip_text": [35, 35, 35, 255],
"toggle_active": [255, 255, 255, 255],
@ -82,7 +82,8 @@
"load_save_button": [0, 0, 0, 255],
"load_save_button_text": [255, 255, 255, 255],
"load_save_button_hover": [43, 45, 46, 255],
"load_save_button_active": [43, 45, 46, 255],
"load_save_button_inactive": [176, 184, 191, 255],
"load_save_button_inactive_text": [209, 214, 219, 255],
"scrollbar_background": [245, 245, 245, 255],
"scrollbar_handle": [12, 159, 227, 255],
@ -91,15 +92,16 @@
"setting_category": [238, 238, 238, 255],
"setting_category_disabled": [238, 238, 238, 255],
"setting_category_hover": [240, 248, 255, 255],
"setting_category_active": [238, 238, 238, 255],
"setting_category_active_hover": [240, 248, 255, 255],
"setting_category_hover": [231, 231, 231, 255],
"setting_category_active": [240, 248, 255, 255],
"setting_category_active_hover": [233, 244, 245, 255],
"setting_category_text": [35, 35, 35, 255],
"setting_control": [255, 255, 255, 255],
"setting_control_highlight": [245, 245, 245, 255],
"setting_control_border": [174, 174, 174, 255],
"setting_control_text": [0, 0, 0, 255],
"setting_control_depth_line": [162, 192, 227, 255],
"setting_control_hover": [139, 143, 153, 255],
"setting_control_selected": [35, 35, 35, 255],
"setting_control_revert": [85, 85, 85, 255],
@ -126,16 +128,6 @@
"tooltip": [255, 225, 146, 255],
"save_button_border": [205, 202, 201, 255],
"save_button_inactive": [205, 202, 201, 255],
"save_button_active": [12, 159, 227, 255],
"save_button_active_hover": [34, 150, 190, 255],
"save_button_safe_to_text": [255, 255, 255, 255],
"save_button_estimated_text": [140, 144, 154, 255],
"save_button_estimated_text_background": [255, 255, 255, 255],
"save_button_printtime_text": [12, 169, 227, 255],
"save_button_background": [249, 249, 249, 255],
"message_background": [255, 255, 255, 255],
"message_text": [32, 166, 219, 255],
"message_dismiss": [139, 143, 153, 255],
@ -147,40 +139,39 @@
},
"sizes": {
"window_margin": [2.0, 2.0],
"window_margin": [1.5, 1.5],
"default_margin": [1.0, 1.0],
"default_lining": [0.1, 0.1],
"logo": [9.5, 2.0],
"toolbar_button": [2.0, 2.0],
"toolbar_spacing": [1.0, 1.0],
"loadfile_button": [11.0, 2.4],
"loadfile_margin": [0.8, 0.4],
"sidebar": [27.0, 10.0],
"sidebar_header": [0.0, 3.2],
"sidebar_setup": [0.0, 2.8],
"sidebar": [26.0, 10.0],
"sidebar_header": [0.0, 3.8],
"sidebar_header_mode_toggle": [0.0, 2.4],
"sidebar_setup": [0.0, 2.6],
"sidebar_subParts": [0.0, 2.4],
"sidebar_specs_bar": [0.0, 2.2],
"sidebar_inputFields": [0.0, 1.9],
"simple_mode_infill_caption": [0.0, 5.0],
"simple_mode_infill_height": [0.0, 8.0],
"section": [0.0, 1.8],
"section_icon": [1.2, 1.2],
"section": [0.0, 2.0],
"section_icon": [1.6, 1.6],
"section_icon_column": [2.8, 0.0],
"setting": [21.0, 1.8],
"setting_control": [6.0, 2.0],
"setting_control_margin": [3.0, 3.0],
"setting_control": [7.0, 2.0],
"setting_control_depth_margin": [1.4, 0.0],
"setting_preferences_button_margin": [3.3, 0.0],
"setting_control_margin": [0.0, 0.0],
"setting_unit_margin": [0.5, 0.5],
"setting_text_maxwidth": [40.0, 0.0],
"simple_mode_infill_caption": [0.0, 5.0],
"standard_list_lineheight": [1.5, 1.5],
"standard_list_input": [20.0, 25.0],
"standard_arrow": [0.6, 0.6],
"button": [3.2, 3.2],
"button_icon": [2.5, 2.5],
"button": [3.8, 3.8],
"button_icon": [2.6, 2.6],
"progressbar": [26.0, 0.8],
"progressbar_control": [8.0, 0.8],
@ -201,6 +192,7 @@
"tooltip_margins": [1.0, 1.0],
"save_button_border": [0.06, 0.06],
"save_button_header": [0.0, 3.2],
"save_button_text_margin": [0.3, 0.6],
"save_button_slicing_bar": [0.0, 2.2],
"save_button_label_margin": [0.5, 0.5],