Merge branch 'master' into CURA-4708_fix_definition_changes_extruder_stacks

This commit is contained in:
Lipu Fei 2018-01-02 10:41:44 +01:00 committed by GitHub
commit 70d5d4415f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 10717 additions and 54 deletions

View file

@ -24,16 +24,23 @@ function(cura_add_test)
if(WIN32)
string(REPLACE "|" "\\;" _PYTHONPATH ${_PYTHONPATH})
set(_PYTHONPATH "${_PYTHONPATH}\\;$ENV{PYTHONPATH}")
else()
string(REPLACE "|" ":" _PYTHONPATH ${_PYTHONPATH})
set(_PYTHONPATH "${_PYTHONPATH}:$ENV{PYTHONPATH}")
endif()
add_test(
NAME ${_NAME}
COMMAND ${PYTHON_EXECUTABLE} -m pytest --junitxml=${CMAKE_BINARY_DIR}/junit-${_NAME}.xml ${_DIRECTORY}
)
set_tests_properties(${_NAME} PROPERTIES ENVIRONMENT LANG=C)
set_tests_properties(${_NAME} PROPERTIES ENVIRONMENT "PYTHONPATH=${_PYTHONPATH}")
get_test_property(${_NAME} ENVIRONMENT test_exists) #Find out if the test exists by getting a property from it that always exists (such as ENVIRONMENT because we set that ourselves).
if (NOT ${test_exists})
add_test(
NAME ${_NAME}
COMMAND ${PYTHON_EXECUTABLE} -m pytest --junitxml=${CMAKE_BINARY_DIR}/junit-${_NAME}.xml ${_DIRECTORY}
)
set_tests_properties(${_NAME} PROPERTIES ENVIRONMENT LANG=C)
set_tests_properties(${_NAME} PROPERTIES ENVIRONMENT "PYTHONPATH=${_PYTHONPATH}")
else()
message(WARNING "Duplicate test ${_NAME}!")
endif()
endfunction()
cura_add_test(NAME pytest-main DIRECTORY ${CMAKE_SOURCE_DIR}/tests PYTHONPATH "${CMAKE_SOURCE_DIR}|${URANIUM_DIR}")

View file

@ -316,7 +316,7 @@ class CuraApplication(QtApplication):
preferences.addPreference("cura/material_settings", "{}")
preferences.addPreference("view/invert_zoom", False)
preferences.addPreference("cura/sidebar_collapse", False)
preferences.addPreference("cura/sidebar_collapsed", False)
self._need_to_show_user_agreement = not Preferences.getInstance().getValue("general/accepted_user_agreement")
@ -1387,7 +1387,7 @@ class CuraApplication(QtApplication):
if node.callDecoration("isSliceable"):
# Only check position if it's not already blatantly obvious that it won't fit.
if node.getBoundingBox().width < self._volume.getBoundingBox().width or node.getBoundingBox().depth < self._volume.getBoundingBox().depth:
if node.getBoundingBox() is None or self._volume.getBoundingBox() is None or node.getBoundingBox().width < self._volume.getBoundingBox().width or node.getBoundingBox().depth < self._volume.getBoundingBox().depth:
# Find node location
offset_shape_arr, hull_shape_arr = ShapeArray.fromNode(node, min_offset = min_offset)

View file

@ -117,33 +117,33 @@ class PlatformPhysics:
overlap = node.callDecoration("getConvexHull").translate(move_vector.x, move_vector.z).intersectsPolygon(other_head_hull)
if overlap:
# Moving ensured that overlap was still there. Try anew!
move_vector = move_vector.set(x=move_vector.x + overlap[0] * self._move_factor,
z=move_vector.z + overlap[1] * self._move_factor)
move_vector = move_vector.set(x = move_vector.x + overlap[0] * self._move_factor,
z = move_vector.z + overlap[1] * self._move_factor)
else:
# Moving ensured that overlap was still there. Try anew!
move_vector = move_vector.set(x=move_vector.x + overlap[0] * self._move_factor,
z=move_vector.z + overlap[1] * self._move_factor)
move_vector = move_vector.set(x = move_vector.x + overlap[0] * self._move_factor,
z = move_vector.z + overlap[1] * self._move_factor)
else:
own_convex_hull = node.callDecoration("getConvexHull")
other_convex_hull = other_node.callDecoration("getConvexHull")
if own_convex_hull and other_convex_hull:
overlap = own_convex_hull.translate(move_vector.x, move_vector.z).intersectsPolygon(other_convex_hull)
if overlap: # Moving ensured that overlap was still there. Try anew!
temp_move_vector = move_vector.set(x=move_vector.x + overlap[0] * self._move_factor,
z=move_vector.z + overlap[1] * self._move_factor)
temp_move_vector = move_vector.set(x = move_vector.x + overlap[0] * self._move_factor,
z = move_vector.z + overlap[1] * self._move_factor)
# if the distance between two models less than 2mm then try to find a new factor
if abs(temp_move_vector.x - overlap[0]) < self._minimum_gap and abs(temp_move_vector.y - overlap[1]) < self._minimum_gap:
temp_scale_factor = self._move_factor
temp_x_factor = (abs(overlap[0]) + self._minimum_gap) / overlap[0] # find x move_factor, like (3.4 + 2) / 3.4 = 1.58
temp_y_factor = (abs(overlap[1]) + self._minimum_gap) / overlap[1] # find y move_factor
if temp_x_factor > temp_y_factor:
temp_x_factor = (abs(overlap[0]) + self._minimum_gap) / overlap[0] if overlap[0] != 0 else 0 # find x move_factor, like (3.4 + 2) / 3.4 = 1.58
temp_y_factor = (abs(overlap[1]) + self._minimum_gap) / overlap[1] if overlap[1] != 0 else 0 # find y move_factor
if abs(temp_x_factor) > abs(temp_y_factor):
temp_scale_factor = temp_x_factor
else:
temp_scale_factor = temp_y_factor
move_vector = move_vector.set(x=move_vector.x + overlap[0] * temp_scale_factor,
z=move_vector.z + overlap[1] * temp_scale_factor)
move_vector = move_vector.set(x = move_vector.x + overlap[0] * temp_scale_factor,
z = move_vector.z + overlap[1] * temp_scale_factor)
else:
move_vector = temp_move_vector
else:
@ -151,7 +151,7 @@ class PlatformPhysics:
# Simply waiting for the next tick seems to resolve this correctly.
overlap = None
if not Vector.Null.equals(move_vector, epsilon=1e-5):
if not Vector.Null.equals(move_vector, epsilon = 1e-5):
transformed_nodes.append(node)
op = PlatformPhysicsOperation.PlatformPhysicsOperation(node, move_vector)
op.push()

View file

@ -225,7 +225,7 @@ class CuraContainerRegistry(ContainerRegistry):
# This is assumed to be the global profile
profile_id = (global_container_stack.getBottom().getId() + "_" + name_seed).lower().replace(" ", "_")
elif len(machine_extruders) > profile_index:
elif profile_index < len(machine_extruders) + 1:
# This is assumed to be an extruder profile
extruder_id = Application.getInstance().getMachineManager().getQualityDefinitionId(machine_extruders[profile_index - 1].getBottom())
if not profile.getMetaDataEntry("extruder"):

View file

@ -43,13 +43,12 @@ class ShapeArray:
transform_x = transform._data[0][3]
transform_y = transform._data[2][3]
hull_verts = node.callDecoration("getConvexHull")
# If a model is too small then it will not contain any points
if hull_verts is None or not hull_verts.getPoints().any():
return None, None
# For one_at_a_time printing you need the convex hull head.
hull_head_verts = node.callDecoration("getConvexHullHead") or hull_verts
# If a model is to small then it will not contain any points
if not hull_verts.getPoints().any():
return None, None
offset_verts = hull_head_verts.getMinkowskiHull(Polygon.approximatedCircle(min_offset))
offset_points = copy.deepcopy(offset_verts._points) # x, y
offset_points[:, 0] = numpy.add(offset_points[:, 0], -transform_x)

View file

@ -143,10 +143,11 @@ class StartSliceJob(Job):
if per_object_stack:
is_non_printing_mesh = any(per_object_stack.getProperty(key, "value") for key in NON_PRINTING_MESH_SETTINGS)
if not getattr(node, "_outside_buildarea", False) or not is_non_printing_mesh:
if not getattr(node, "_outside_buildarea", False) or is_non_printing_mesh:
temp_list.append(node)
if not is_non_printing_mesh:
has_printing_mesh = True
Job.yieldThread()
#If the list doesn't have any model with suitable settings then clean the list

View file

@ -122,6 +122,26 @@ class VersionUpgrade30to31(VersionUpgrade):
if len(all_quality_changes) <= 1 and not parser.has_option("metadata", "extruder"):
self._createExtruderQualityChangesForSingleExtrusionMachine(filename, parser)
if parser["metadata"]["type"] == "definition_changes":
if parser["general"]["definition"] == "custom":
# We are only interested in machine_nozzle_size
if parser.has_option("values", "machine_nozzle_size"):
machine_nozzle_size = parser["values"]["machine_nozzle_size"]
machine_extruder_count = '1' # by default it is 1 and the value cannot be stored in the global stack
if parser.has_option("values", "machine_extruder_count"):
machine_extruder_count = parser["values"]["machine_extruder_count"]
if machine_extruder_count == '1':
definition_name = parser["general"]["name"]
machine_extruders = self._getSingleExtrusionMachineExtruders(definition_name)
# For single extruder machine we need only first extruder
if len(machine_extruders) != 0:
self._updateSingleExtruderDefinitionFile(machine_extruders, machine_nozzle_size)
parser.remove_option("values", "machine_nozzle_size")
# Update version numbers
parser["general"]["version"] = "2"
parser["metadata"]["setting_version"] = "4"

View file

@ -184,7 +184,7 @@ class X3DReader(MeshReader):
got_center = (center.x != 0 or center.y != 0 or center.z != 0)
T = self.transform
if trans.x != 0 or trans.y != 0 or trans.z !=0:
if trans.x != 0 or trans.y != 0 or trans.z != 0:
T.translate(trans)
if got_center:
T.translate(center)

View file

@ -1,5 +1,4 @@
{
"id": "builder_premium_large",
"version": 2,
"name": "Builder Premium Large",
"inherits": "fdmprinter",

View file

@ -1,5 +1,4 @@
{
"id": "builder_premium_medium",
"version": 2,
"name": "Builder Premium Medium",
"inherits": "fdmprinter",

View file

@ -1,5 +1,4 @@
{
"id": "builder_premium_small",
"version": 2,
"name": "Builder Premium Small",
"inherits": "fdmprinter",

View file

@ -1,5 +1,4 @@
{
"id": "deltacomb",
"version": 2,
"name": "Deltacomb 3D",
"inherits": "fdmprinter",

View file

@ -1614,7 +1614,7 @@
"infill_overlap":
{
"label": "Infill Overlap Percentage",
"description": "The amount of overlap between the infill and the walls. A slight overlap allows the walls to connect firmly to the infill.",
"description": "The amount of overlap between the infill and the walls as a percentage of the infill line width. A slight overlap allows the walls to connect firmly to the infill.",
"unit": "%",
"type": "float",
"default_value": 10,
@ -1635,7 +1635,7 @@
"default_value": 0.04,
"minimum_value_warning": "-0.5 * machine_nozzle_size",
"maximum_value_warning": "machine_nozzle_size",
"value": "0.5 * ( infill_line_width + (wall_line_width_x if wall_line_count > 1 else wall_line_width_0) ) * infill_overlap / 100 if infill_sparse_density < 95 and infill_pattern != 'concentric' else 0",
"value": "0.5 * (infill_line_width + (wall_line_width_x if wall_line_count > 1 else wall_line_width_0)) * infill_overlap / 100 if infill_sparse_density < 95 and infill_pattern != 'concentric' else 0",
"enabled": "infill_sparse_density > 0 and infill_pattern != 'concentric'",
"settable_per_mesh": true
}
@ -1644,7 +1644,7 @@
"skin_overlap":
{
"label": "Skin Overlap Percentage",
"description": "The amount of overlap between the skin and the walls as a percentage of the line width. A slight overlap allows the walls to connect firmly to the skin. This is a percentage of the average line widths of the skin lines and the innermost wall.",
"description": "The amount of overlap between the skin and the walls as a percentage of the skin line width. A slight overlap allows the walls to connect firmly to the skin. This is a percentage of the average line widths of the skin lines and the innermost wall.",
"unit": "%",
"type": "float",
"default_value": 5,
@ -1665,7 +1665,7 @@
"default_value": 0.02,
"minimum_value_warning": "-0.5 * machine_nozzle_size",
"maximum_value_warning": "machine_nozzle_size",
"value": "0.5 * ( skin_line_width + (wall_line_width_x if wall_line_count > 1 else wall_line_width_0) ) * skin_overlap / 100 if top_bottom_pattern != 'concentric' else 0",
"value": "0.5 * (skin_line_width + (wall_line_width_x if wall_line_count > 1 else wall_line_width_0)) * skin_overlap / 100 if top_bottom_pattern != 'concentric' else 0",
"enabled": "top_bottom_pattern != 'concentric'",
"settable_per_mesh": true
}

4595
resources/i18n/pt_PT/cura.po Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,210 @@
# Cura JSON setting files
# Copyright (C) 2017 Ultimaker
# This file is distributed under the same license as the Cura package.
# Ruben Dulek <r.dulek@ultimaker.com>, 2017.
#
msgid ""
msgstr ""
"Project-Id-Version: Cura 3.1\n"
"Report-Msgid-Bugs-To: r.dulek@ultimaker.com\n"
"POT-Creation-Date: 2017-08-02 16:53+0000\n"
"PO-Revision-Date: 2017-12-07 13:41+0100\n"
"Last-Translator: Bothof <info@bothof.nl>\n"
"Language-Team: Bothof\n"
"Language: pt_PT\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: fdmextruder.def.json
msgctxt "machine_settings label"
msgid "Machine"
msgstr "Máquina"
#: fdmextruder.def.json
msgctxt "machine_settings description"
msgid "Machine specific settings"
msgstr "Definições específicas da máquina"
#: fdmextruder.def.json
msgctxt "extruder_nr label"
msgid "Extruder"
msgstr "Extrusora"
#: fdmextruder.def.json
msgctxt "extruder_nr description"
msgid "The extruder train used for printing. This is used in multi-extrusion."
msgstr "A máquina extrusora utilizada para imprimir. Esta é utilizada em extrusões múltiplas."
#: fdmextruder.def.json
msgctxt "machine_nozzle_id label"
msgid "Nozzle ID"
msgstr "ID do bocal"
#: fdmextruder.def.json
msgctxt "machine_nozzle_id description"
msgid "The nozzle ID for an extruder train, such as \"AA 0.4\" and \"BB 0.8\"."
msgstr "A ID do bocal para uma máquina de extrusão, tal como \"AA 0.4\" e \"BB 0.8\"."
#: fdmextruder.def.json
msgctxt "machine_nozzle_size label"
msgid "Nozzle Diameter"
msgstr "Diâmetro do bocal"
#: fdmextruder.def.json
msgctxt "machine_nozzle_size description"
msgid ""
"The inner diameter of the nozzle. Change this setting when using a non-"
"standard nozzle size."
msgstr "O diâmetro interno do bocal. Altere esta definição ao utilizar um tamanho de bocal não convencional."
#: fdmextruder.def.json
msgctxt "machine_nozzle_offset_x label"
msgid "Nozzle X Offset"
msgstr "Desvio X do bocal"
#: fdmextruder.def.json
msgctxt "machine_nozzle_offset_x description"
msgid "The x-coordinate of the offset of the nozzle."
msgstr "A coordenada X do desvio do bocal."
#: fdmextruder.def.json
msgctxt "machine_nozzle_offset_y label"
msgid "Nozzle Y Offset"
msgstr "Desvio Y do bocal"
#: fdmextruder.def.json
msgctxt "machine_nozzle_offset_y description"
msgid "The y-coordinate of the offset of the nozzle."
msgstr "A coordenada Y do desvio do bocal."
#: fdmextruder.def.json
msgctxt "machine_extruder_start_code label"
msgid "Extruder Start G-Code"
msgstr "G-Code inicial da extrusora"
#: fdmextruder.def.json
msgctxt "machine_extruder_start_code description"
msgid "Start g-code to execute whenever turning the extruder on."
msgstr "G-Code inicial a ser executado sempre que a extrusora for ligada."
#: fdmextruder.def.json
msgctxt "machine_extruder_start_pos_abs label"
msgid "Extruder Start Position Absolute"
msgstr "Posição inicial absoluta da extrusora"
#: fdmextruder.def.json
msgctxt "machine_extruder_start_pos_abs description"
msgid ""
"Make the extruder starting position absolute rather than relative to the "
"last-known location of the head."
msgstr "Torne a posição inicial da extrusora absoluta em vez de relativa à última posição conhecida da cabeça."
#: fdmextruder.def.json
msgctxt "machine_extruder_start_pos_x label"
msgid "Extruder Start Position X"
msgstr "X da posição inicial da extrusora"
#: fdmextruder.def.json
msgctxt "machine_extruder_start_pos_x description"
msgid "The x-coordinate of the starting position when turning the extruder on."
msgstr "A coordenada X da posição inicial ao ligar a extrusora."
#: fdmextruder.def.json
msgctxt "machine_extruder_start_pos_y label"
msgid "Extruder Start Position Y"
msgstr "Y da posição inicial da extrusora"
#: fdmextruder.def.json
msgctxt "machine_extruder_start_pos_y description"
msgid "The y-coordinate of the starting position when turning the extruder on."
msgstr "A coordenada Y da posição inicial ao ligar a extrusora."
#: fdmextruder.def.json
msgctxt "machine_extruder_end_code label"
msgid "Extruder End G-Code"
msgstr "G-Code final da extrusora"
#: fdmextruder.def.json
msgctxt "machine_extruder_end_code description"
msgid "End g-code to execute whenever turning the extruder off."
msgstr "G-Code final a ser executado sempre que a extrusora for desligada."
#: fdmextruder.def.json
msgctxt "machine_extruder_end_pos_abs label"
msgid "Extruder End Position Absolute"
msgstr "Posição final absoluta da extrusora"
#: fdmextruder.def.json
msgctxt "machine_extruder_end_pos_abs description"
msgid ""
"Make the extruder ending position absolute rather than relative to the last-"
"known location of the head."
msgstr "Torne a posição final da extrusora absoluta em vez de relativa à última localização conhecida da cabeça."
#: fdmextruder.def.json
msgctxt "machine_extruder_end_pos_x label"
msgid "Extruder End Position X"
msgstr "X da posição final da extrusora"
#: fdmextruder.def.json
msgctxt "machine_extruder_end_pos_x description"
msgid "The x-coordinate of the ending position when turning the extruder off."
msgstr "A coordenada X da posição final ao desligar a extrusora."
#: fdmextruder.def.json
msgctxt "machine_extruder_end_pos_y label"
msgid "Extruder End Position Y"
msgstr "Y da posição final da extrusora"
#: fdmextruder.def.json
msgctxt "machine_extruder_end_pos_y description"
msgid "The y-coordinate of the ending position when turning the extruder off."
msgstr "A coordenada Y da posição final ao desligar a extrusora."
#: fdmextruder.def.json
msgctxt "extruder_prime_pos_z label"
msgid "Extruder Prime Z Position"
msgstr "Posição Z de preparação da extrusora"
#: fdmextruder.def.json
msgctxt "extruder_prime_pos_z description"
msgid ""
"The Z coordinate of the position where the nozzle primes at the start of "
"printing."
msgstr "A coordenada Z da posição de preparação do bocal ao iniciar a impressão."
#: fdmextruder.def.json
msgctxt "platform_adhesion label"
msgid "Build Plate Adhesion"
msgstr "Aderência à placa de construção"
#: fdmextruder.def.json
msgctxt "platform_adhesion description"
msgid "Adhesion"
msgstr "Aderência"
#: fdmextruder.def.json
msgctxt "extruder_prime_pos_x label"
msgid "Extruder Prime X Position"
msgstr "Posição X de preparação da extrusora"
#: fdmextruder.def.json
msgctxt "extruder_prime_pos_x description"
msgid ""
"The X coordinate of the position where the nozzle primes at the start of "
"printing."
msgstr "A coordenada X da posição de preparação do bocal ao iniciar a impressão."
#: fdmextruder.def.json
msgctxt "extruder_prime_pos_y label"
msgid "Extruder Prime Y Position"
msgstr "Posição Y de preparação da extrusora"
#: fdmextruder.def.json
msgctxt "extruder_prime_pos_y description"
msgid ""
"The Y coordinate of the position where the nozzle primes at the start of "
"printing."
msgstr "A coordenada Y da posição de preparação do bocal ao iniciar a impressão."

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,4 @@
// Copyright (c) 2016 Ultimaker B.V.
// Copyright (c) 2017 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.2
@ -25,6 +25,15 @@ UM.Dialog
width: minimumWidth
height: minimumHeight
flags: {
var window_flags = Qt.Dialog | Qt.CustomizeWindowHint | Qt.WindowTitleHint;
if (Cura.MachineManager.activeDefinitionId !== "") //Disallow closing the window if we have no active printer yet. You MUST add a printer.
{
window_flags |= Qt.WindowCloseButtonHint;
}
return window_flags;
}
onVisibilityChanged:
{
// Reset selection and machine name

View file

@ -401,7 +401,7 @@ UM.MainWindow
collapseSidebarAnimation.start();
}
collapsed = !collapsed;
UM.Preferences.setValue("cura/sidebar_collapse", collapsed);
UM.Preferences.setValue("cura/sidebar_collapsed", collapsed);
}
anchors
@ -432,9 +432,10 @@ UM.MainWindow
Component.onCompleted:
{
var sidebarCollapsed = UM.Preferences.getValue("cura/sidebar_collapse");
var sidebar_collapsed = UM.Preferences.getValue("cura/sidebar_collapsed");
if (sidebarCollapsed) {
if (sidebar_collapsed)
{
sidebar.collapsed = true;
viewportRect = Qt.rect(0, 0, 1, 1.0)
collapseSidebarAnimation.start();

View file

@ -199,12 +199,12 @@ Item
}
Component.onCompleted: {
updateAdditionalComponents("monitorButtons")
buttonsRow.updateAdditionalComponents("monitorButtons")
}
Connections {
target: CuraApplication
onAdditionalComponentsChanged: updateAdditionalComponents
onAdditionalComponentsChanged: buttonsRow.updateAdditionalComponents("monitorButtons")
}
function updateAdditionalComponents (areaId) {

View file

@ -159,6 +159,7 @@ UM.PreferencesPage
append({ text: "Nederlands", code: "nl_NL" })
append({ text: "Polski", code: "pl_PL" })
append({ text: "Português do Brasil", code: "pt_BR" })
append({ text: "Português", code: "pt_PT" })
append({ text: "Русский", code: "ru_RU" })
append({ text: "Türkçe", code: "tr_TR" })
append({ text: "简体中文", code: "zh_CN" })

View file

@ -138,12 +138,12 @@ Item {
}
Component.onCompleted: {
addAdditionalComponents("saveButton")
saveRow.addAdditionalComponents("saveButton")
}
Connections {
target: CuraApplication
onAdditionalComponentsChanged: addAdditionalComponents
onAdditionalComponentsChanged: saveRow.addAdditionalComponents("saveButton")
}
function addAdditionalComponents (areaId) {

View file

@ -1,5 +1,5 @@
// Copyright (c) 2015 Ultimaker B.V.
// Uranium is released under the terms of the LGPLv3 or higher.
// Copyright (c) 2017 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.2
import QtQuick.Controls 1.1
@ -31,13 +31,17 @@ Button {
onClicked:
{
forceActiveFocus();
if(definition.expanded)
{
settingDefinitionsModel.collapse(definition.key);
} else {
}
else
{
settingDefinitionsModel.expandAll(definition.key);
}
//Set focus so that tab navigation continues from this point on.
//NB: This must be set AFTER collapsing/expanding the category so that the scroll position is correct.
forceActiveFocus();
}
onActiveFocusChanged:
{

View file

@ -1,5 +1,5 @@
// Copyright (c) 2015 Ultimaker B.V.
// Uranium is released under the terms of the LGPLv3 or higher.
// Copyright (c) 2017 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.1
import QtQuick.Layouts 1.1
@ -154,7 +154,7 @@ Item {
onEntered: {
hoverTimer.stop();
var tooltipText = catalog.i18nc("@label", "This setting is always shared between all extruders. Changing it here will change the value for all extruders") + ".";
var tooltipText = catalog.i18nc("@label", "This setting is always shared between all extruders. Changing it here will change the value for all extruders.");
if ((resolve != "None") && (stackLevel != 0)) {
// We come here if a setting has a resolve and the setting is not manually edited.
tooltipText += " " + catalog.i18nc("@label", "The value is resolved from per-extruder values ") + "[" + Cura.ExtruderManager.getInstanceExtruderValues(definition.key) + "].";

View file

@ -25,9 +25,12 @@ Rectangle
property int allItemsWidth: 0;
function updateMarginsAndSizes() {
if (UM.Preferences.getValue("cura/sidebar_collapse")) {
if (UM.Preferences.getValue("cura/sidebar_collapsed"))
{
rightMargin = UM.Theme.getSize("default_margin").width;
} else {
}
else
{
rightMargin = UM.Theme.getSize("sidebar").width + UM.Theme.getSize("default_margin").width;
}
allItemsWidth = (

View file

@ -202,9 +202,8 @@ QtObject {
height: Theme.getSize("topbar_button_icon").height
Label
{
id: button_label
text: control.text;
anchors.right: (icon.visible || overlayIcon.visible) ? icon.left : parent.right
anchors.rightMargin: (icon.visible || overlayIcon.visible) ? Theme.getSize("default_margin").width : 0
anchors.verticalCenter: parent.verticalCenter;
font: control.checked ? UM.Theme.getFont("large") : UM.Theme.getFont("large_nonbold")
color:
@ -227,6 +226,8 @@ QtObject {
{
visible: control.iconSource != ""
id: icon
anchors.left: button_label.right
anchors.leftMargin: (icon.visible || overlayIcon.visible) ? Theme.getSize("default_margin").width : 0
color: UM.Theme.getColor("text_emphasis")
opacity: !control.enabled ? 0.2 : 1.0
source: control.iconSource
@ -238,6 +239,8 @@ QtObject {
UM.RecolorImage
{
id: overlayIcon
anchors.left: button_label.right
anchors.leftMargin: (icon.visible || overlayIcon.visible) ? Theme.getSize("default_margin").width : 0
visible: control.overlayIconSource != "" && control.iconSource != ""
color: control.overlayColor
opacity: !control.enabled ? 0.2 : 1.0