mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 19:35:58 +08:00
Merge branch 'master' of github.com:Ultimaker/Cura
This commit is contained in:
commit
da5e9fcf2c
@ -452,7 +452,10 @@ class BuildVolume(SceneNode):
|
|||||||
|
|
||||||
if not used_extruders:
|
if not used_extruders:
|
||||||
# If no extruder is used, assume that the active extruder is used (else nothing is drawn)
|
# If no extruder is used, assume that the active extruder is used (else nothing is drawn)
|
||||||
|
if extruder_manager.getActiveExtruderStack():
|
||||||
used_extruders = [extruder_manager.getActiveExtruderStack()]
|
used_extruders = [extruder_manager.getActiveExtruderStack()]
|
||||||
|
else:
|
||||||
|
used_extruders = [self._global_container_stack]
|
||||||
|
|
||||||
result_areas = self._computeDisallowedAreasStatic(disallowed_border_size, used_extruders) #Normal machine disallowed areas can always be added.
|
result_areas = self._computeDisallowedAreasStatic(disallowed_border_size, used_extruders) #Normal machine disallowed areas can always be added.
|
||||||
prime_areas = self._computeDisallowedAreasPrime(disallowed_border_size, used_extruders)
|
prime_areas = self._computeDisallowedAreasPrime(disallowed_border_size, used_extruders)
|
||||||
|
@ -129,6 +129,7 @@ class CuraApplication(QtApplication):
|
|||||||
{
|
{
|
||||||
("quality", UM.Settings.InstanceContainer.Version): (self.ResourceTypes.QualityInstanceContainer, "application/x-uranium-instancecontainer"),
|
("quality", UM.Settings.InstanceContainer.Version): (self.ResourceTypes.QualityInstanceContainer, "application/x-uranium-instancecontainer"),
|
||||||
("machine_stack", UM.Settings.ContainerStack.Version): (self.ResourceTypes.MachineStack, "application/x-uranium-containerstack"),
|
("machine_stack", UM.Settings.ContainerStack.Version): (self.ResourceTypes.MachineStack, "application/x-uranium-containerstack"),
|
||||||
|
("extruder_train", UM.Settings.ContainerStack.Version): (self.ResourceTypes.ExtruderStack, "application/x-uranium-extruderstack"),
|
||||||
("preferences", UM.Preferences.Version): (Resources.Preferences, "application/x-uranium-preferences"),
|
("preferences", UM.Preferences.Version): (Resources.Preferences, "application/x-uranium-preferences"),
|
||||||
("user", UM.Settings.InstanceContainer.Version): (self.ResourceTypes.UserInstanceContainer, "application/x-uranium-instancecontainer")
|
("user", UM.Settings.InstanceContainer.Version): (self.ResourceTypes.UserInstanceContainer, "application/x-uranium-instancecontainer")
|
||||||
}
|
}
|
||||||
|
@ -140,8 +140,6 @@ class ExtrudersModel(UM.Qt.ListModel.ListModel):
|
|||||||
for extruder in manager.getMachineExtruders(global_container_stack.getId()):
|
for extruder in manager.getMachineExtruders(global_container_stack.getId()):
|
||||||
extruder_name = extruder.getName()
|
extruder_name = extruder.getName()
|
||||||
material = extruder.findContainer({ "type": "material" })
|
material = extruder.findContainer({ "type": "material" })
|
||||||
if material and not self._simple_names:
|
|
||||||
extruder_name = "%s (%s)" % (material.getName(), extruder_name)
|
|
||||||
position = extruder.getMetaDataEntry("position", default = "0") # Get the position
|
position = extruder.getMetaDataEntry("position", default = "0") # Get the position
|
||||||
try:
|
try:
|
||||||
position = int(position)
|
position = int(position)
|
||||||
|
@ -187,9 +187,11 @@ class ThreeMFReader(MeshReader):
|
|||||||
build_item_node = self._createNodeFromObject(object, self._base_name + "_" + str(id))
|
build_item_node = self._createNodeFromObject(object, self._base_name + "_" + str(id))
|
||||||
|
|
||||||
# compensate for original center position, if object(s) is/are not around its zero position
|
# compensate for original center position, if object(s) is/are not around its zero position
|
||||||
extents = build_item_node.getMeshData().getExtents()
|
|
||||||
center_vector = Vector(extents.center.x, extents.center.y, extents.center.z)
|
|
||||||
transform_matrix = Matrix()
|
transform_matrix = Matrix()
|
||||||
|
mesh_data = build_item_node.getMeshData()
|
||||||
|
if mesh_data is not None:
|
||||||
|
extents = mesh_data.getExtents()
|
||||||
|
center_vector = Vector(extents.center.x, extents.center.y, extents.center.z)
|
||||||
transform_matrix.setByTranslation(center_vector)
|
transform_matrix.setByTranslation(center_vector)
|
||||||
|
|
||||||
# offset with transform from 3mf
|
# offset with transform from 3mf
|
||||||
|
@ -349,7 +349,7 @@ class ThreeMFWorkspaceReader(WorkspaceReader):
|
|||||||
global_stack = stack
|
global_stack = stack
|
||||||
Job.yieldThread()
|
Job.yieldThread()
|
||||||
except:
|
except:
|
||||||
Logger.log("W", "We failed to serialize the stack. Trying to clean up.")
|
Logger.logException("w", "We failed to serialize the stack. Trying to clean up.")
|
||||||
# Something went really wrong. Try to remove any data that we added.
|
# Something went really wrong. Try to remove any data that we added.
|
||||||
for container in containers_to_add:
|
for container in containers_to_add:
|
||||||
self._container_registry.getInstance().removeContainer(container.getId())
|
self._container_registry.getInstance().removeContainer(container.getId())
|
||||||
@ -447,9 +447,17 @@ class ThreeMFWorkspaceReader(WorkspaceReader):
|
|||||||
def _getContainerIdListFromSerialized(self, serialized):
|
def _getContainerIdListFromSerialized(self, serialized):
|
||||||
parser = configparser.ConfigParser(interpolation=None, empty_lines_in_values=False)
|
parser = configparser.ConfigParser(interpolation=None, empty_lines_in_values=False)
|
||||||
parser.read_string(serialized)
|
parser.read_string(serialized)
|
||||||
|
|
||||||
|
container_ids = []
|
||||||
|
if "containers" in parser:
|
||||||
|
for index, container_id in parser.items("containers"):
|
||||||
|
container_ids.append(container_id)
|
||||||
|
elif parser.has_option("general", "containers"):
|
||||||
container_string = parser["general"].get("containers", "")
|
container_string = parser["general"].get("containers", "")
|
||||||
container_list = container_string.split(",")
|
container_list = container_string.split(",")
|
||||||
return [container_id for container_id in container_list if container_id != ""]
|
container_ids = [container_id for container_id in container_list if container_id != ""]
|
||||||
|
|
||||||
|
return container_ids
|
||||||
|
|
||||||
def _getMachineNameFromSerializedStack(self, serialized):
|
def _getMachineNameFromSerializedStack(self, serialized):
|
||||||
parser = configparser.ConfigParser(interpolation=None, empty_lines_in_values=False)
|
parser = configparser.ConfigParser(interpolation=None, empty_lines_in_values=False)
|
||||||
@ -462,3 +470,4 @@ class ThreeMFWorkspaceReader(WorkspaceReader):
|
|||||||
for entry in metadata:
|
for entry in metadata:
|
||||||
return entry.text
|
return entry.text
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@ -17,41 +17,60 @@ class OSXRemovableDrivePlugin(RemovableDrivePlugin.RemovableDrivePlugin):
|
|||||||
drives = {}
|
drives = {}
|
||||||
p = subprocess.Popen(["system_profiler", "SPUSBDataType", "-xml"], stdout = subprocess.PIPE)
|
p = subprocess.Popen(["system_profiler", "SPUSBDataType", "-xml"], stdout = subprocess.PIPE)
|
||||||
plist = plistlib.loads(p.communicate()[0])
|
plist = plistlib.loads(p.communicate()[0])
|
||||||
p.wait()
|
|
||||||
|
|
||||||
for entry in plist:
|
result = self._recursiveSearch(plist, "removable_media")
|
||||||
if "_items" in entry:
|
|
||||||
for item in entry["_items"]:
|
|
||||||
for dev in item["_items"]:
|
|
||||||
if "removable_media" in dev and dev["removable_media"] == "yes" and "volumes" in dev and len(dev["volumes"]) > 0:
|
|
||||||
for vol in dev["volumes"]:
|
|
||||||
if "mount_point" in vol:
|
|
||||||
volume = vol["mount_point"]
|
|
||||||
drives[volume] = os.path.basename(volume)
|
|
||||||
|
|
||||||
p = subprocess.Popen(["system_profiler", "SPCardReaderDataType", "-xml"], stdout=subprocess.PIPE)
|
p = subprocess.Popen(["system_profiler", "SPCardReaderDataType", "-xml"], stdout=subprocess.PIPE)
|
||||||
plist = plistlib.loads(p.communicate()[0])
|
plist = plistlib.loads(p.communicate()[0])
|
||||||
p.wait()
|
|
||||||
|
|
||||||
for entry in plist:
|
result.extend(self._recursiveSearch(plist, "removable_media"))
|
||||||
if "_items" in entry:
|
|
||||||
for item in entry["_items"]:
|
for drive in result:
|
||||||
for dev in item["_items"]:
|
# Ignore everything not explicitly marked as removable
|
||||||
if "removable_media" in dev and dev["removable_media"] == "yes" and "volumes" in dev and len(dev["volumes"]) > 0:
|
if drive["removable_media"] != "yes":
|
||||||
for vol in dev["volumes"]:
|
continue
|
||||||
if "mount_point" in vol:
|
|
||||||
volume = vol["mount_point"]
|
# Ignore any removable device that does not have an actual volume
|
||||||
drives[volume] = os.path.basename(volume)
|
if "volumes" not in drive or not drive["volumes"]:
|
||||||
|
continue
|
||||||
|
|
||||||
|
for volume in drive["volumes"]:
|
||||||
|
if not "mount_point" in volume:
|
||||||
|
continue
|
||||||
|
|
||||||
|
mount_point = volume["mount_point"]
|
||||||
|
|
||||||
|
if "_name" in volume:
|
||||||
|
drive_name = volume["_name"]
|
||||||
|
else:
|
||||||
|
drive_name = os.path.basename(mount_point)
|
||||||
|
|
||||||
|
drives[mount_point] = drive_name
|
||||||
|
|
||||||
return drives
|
return drives
|
||||||
|
|
||||||
def performEjectDevice(self, device):
|
def performEjectDevice(self, device):
|
||||||
p = subprocess.Popen(["diskutil", "eject", device.getId()], stdin = subprocess.PIPE, stdout = subprocess.PIPE, stderr = subprocess.PIPE)
|
p = subprocess.Popen(["diskutil", "eject", device.getId()], stdin = subprocess.PIPE, stdout = subprocess.PIPE, stderr = subprocess.PIPE)
|
||||||
output = p.communicate()
|
output = p.communicate()
|
||||||
Logger.log("d", "umount returned: %s.", repr(output))
|
|
||||||
|
|
||||||
return_code = p.wait()
|
return_code = p.wait()
|
||||||
if return_code != 0:
|
if return_code != 0:
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
# Recursively search for key in a plist parsed by plistlib
|
||||||
|
def _recursiveSearch(self, plist, key):
|
||||||
|
result = []
|
||||||
|
for entry in plist:
|
||||||
|
if key in entry:
|
||||||
|
result.append(entry)
|
||||||
|
continue
|
||||||
|
|
||||||
|
if "_items" in entry:
|
||||||
|
result.extend(self._recursiveSearch(entry["_items"], key))
|
||||||
|
|
||||||
|
if "Media" in entry:
|
||||||
|
result.extend(self._recursiveSearch(entry["Media"], key))
|
||||||
|
|
||||||
|
return result
|
||||||
|
120
plugins/VersionUpgrade/VersionUpgrade22to24/VersionUpgrade.py
Normal file
120
plugins/VersionUpgrade/VersionUpgrade22to24/VersionUpgrade.py
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
# Copyright (c) 2016 Ultimaker B.V.
|
||||||
|
# Cura is released under the terms of the AGPLv3 or higher.
|
||||||
|
|
||||||
|
import configparser #To get version numbers from config files.
|
||||||
|
import os
|
||||||
|
import os.path
|
||||||
|
import io
|
||||||
|
|
||||||
|
from UM import Resources
|
||||||
|
from UM.VersionUpgrade import VersionUpgrade # Superclass of the plugin.
|
||||||
|
|
||||||
|
class VersionUpgrade22to24(VersionUpgrade):
|
||||||
|
|
||||||
|
def upgradeMachineInstance(self, serialised, filename):
|
||||||
|
# All of this is needed to upgrade custom variant machines from old Cura to 2.4 where
|
||||||
|
# `definition_changes` instance container has been introduced. Variant files which
|
||||||
|
# look like the the handy work of the old machine settings plugin are converted directly
|
||||||
|
# on disk.
|
||||||
|
|
||||||
|
config = configparser.ConfigParser(interpolation = None)
|
||||||
|
config.read_string(serialised) # Read the input string as config file.
|
||||||
|
config.set("general", "version", "3")
|
||||||
|
|
||||||
|
container_list = []
|
||||||
|
if config.has_section("containers"):
|
||||||
|
for index, container_id in config.items("containers"):
|
||||||
|
container_list.append(container_id)
|
||||||
|
elif config.has_option("general", "containers"):
|
||||||
|
containers = config.get("general", "containers")
|
||||||
|
container_list = containers.split(",")
|
||||||
|
|
||||||
|
user_variants = self.__getUserVariants()
|
||||||
|
name_path_dict = {}
|
||||||
|
for variant in user_variants:
|
||||||
|
name_path_dict[variant.get("name")] = variant.get("path")
|
||||||
|
|
||||||
|
user_variant_names = set(container_list).intersection(name_path_dict.keys())
|
||||||
|
if len(user_variant_names):
|
||||||
|
# One of the user defined variants appears in the list of containers in the stack.
|
||||||
|
|
||||||
|
for variant_name in user_variant_names: # really there should just be one variant to convert.
|
||||||
|
config_name = self.__convertVariant(name_path_dict.get(variant_name))
|
||||||
|
|
||||||
|
# Change the name of variant and insert empty_variant into the stack.
|
||||||
|
new_container_list = []
|
||||||
|
for item in container_list:
|
||||||
|
if item == variant_name:
|
||||||
|
new_container_list.append(config_name)
|
||||||
|
new_container_list.append("empty_variant")
|
||||||
|
else:
|
||||||
|
new_container_list.append(item)
|
||||||
|
|
||||||
|
container_list = new_container_list
|
||||||
|
|
||||||
|
if not config.has_section("containers"):
|
||||||
|
config.add_section("containers")
|
||||||
|
|
||||||
|
config.remove_option("general", "containers")
|
||||||
|
|
||||||
|
for index in range(len(container_list)):
|
||||||
|
config.set("containers", index, container_list[index])
|
||||||
|
|
||||||
|
output = io.StringIO()
|
||||||
|
config.write(output)
|
||||||
|
return [filename], [output.getvalue()]
|
||||||
|
|
||||||
|
def __convertVariant(self, variant_path):
|
||||||
|
# Copy the variant to the machine_instances/*_settings.inst.cfg
|
||||||
|
variant_config = configparser.ConfigParser(interpolation=None)
|
||||||
|
with open(variant_path, "r") as fhandle:
|
||||||
|
variant_config.read_file(fhandle)
|
||||||
|
|
||||||
|
if variant_config.has_section("general") and variant_config.has_option("general", "name"):
|
||||||
|
config_name = variant_config.get("general", "name")
|
||||||
|
if config_name.endswith("_variant"):
|
||||||
|
config_name = config_name[:-len("_variant")] + "_settings"
|
||||||
|
variant_config.set("general", "name", config_name)
|
||||||
|
|
||||||
|
if not variant_config.has_section("metadata"):
|
||||||
|
variant_config.add_section("metadata")
|
||||||
|
variant_config.set("metadata", "type", "definition_changes")
|
||||||
|
|
||||||
|
resource_path = Resources.getDataStoragePath()
|
||||||
|
machine_instances_dir = os.path.join(resource_path, "machine_instances")
|
||||||
|
|
||||||
|
if variant_path.endswith("_variant.inst.cfg"):
|
||||||
|
variant_path = variant_path[:-len("_variant.inst.cfg")] + "_settings.inst.cfg"
|
||||||
|
|
||||||
|
with open(os.path.join(machine_instances_dir, os.path.basename(variant_path)), "w") as fp:
|
||||||
|
variant_config.write(fp)
|
||||||
|
|
||||||
|
return config_name
|
||||||
|
|
||||||
|
def __getUserVariants(self):
|
||||||
|
resource_path = Resources.getDataStoragePath()
|
||||||
|
variants_dir = os.path.join(resource_path, "variants")
|
||||||
|
|
||||||
|
result = []
|
||||||
|
for entry in os.scandir(variants_dir):
|
||||||
|
if entry.name.endswith('.inst.cfg') and entry.is_file():
|
||||||
|
config = configparser.ConfigParser(interpolation = None)
|
||||||
|
with open(entry.path, "r") as fhandle:
|
||||||
|
config.read_file(fhandle)
|
||||||
|
if config.has_section("general") and config.has_option("general", "name"):
|
||||||
|
result.append( { "path": entry.path, "name": config.get("general", "name") } )
|
||||||
|
return result
|
||||||
|
|
||||||
|
def upgradeExtruderTrain(self, serialised, filename):
|
||||||
|
config = configparser.ConfigParser(interpolation = None)
|
||||||
|
config.read_string(serialised) # Read the input string as config file.
|
||||||
|
config.set("general", "version", "3") # Just bump the version number. That is all we need for now.
|
||||||
|
|
||||||
|
output = io.StringIO()
|
||||||
|
config.write(output)
|
||||||
|
return [filename], [output.getvalue()]
|
||||||
|
|
||||||
|
def getCfgVersion(self, serialised):
|
||||||
|
parser = configparser.ConfigParser(interpolation = None)
|
||||||
|
parser.read_string(serialised)
|
||||||
|
return int(parser.get("general", "version")) #Explicitly give an exception when this fails. That means that the file format is not recognised.
|
38
plugins/VersionUpgrade/VersionUpgrade22to24/__init__.py
Normal file
38
plugins/VersionUpgrade/VersionUpgrade22to24/__init__.py
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
# Copyright (c) 2016 Ultimaker B.V.
|
||||||
|
# Cura is released under the terms of the AGPLv3 or higher.
|
||||||
|
|
||||||
|
from . import VersionUpgrade
|
||||||
|
|
||||||
|
from UM.i18n import i18nCatalog
|
||||||
|
catalog = i18nCatalog("cura")
|
||||||
|
|
||||||
|
upgrade = VersionUpgrade.VersionUpgrade22to24()
|
||||||
|
|
||||||
|
def getMetaData():
|
||||||
|
return {
|
||||||
|
"plugin": {
|
||||||
|
"name": catalog.i18nc("@label", "Version Upgrade 2.2 to 2.4"),
|
||||||
|
"author": "Ultimaker",
|
||||||
|
"version": "1.0",
|
||||||
|
"description": catalog.i18nc("@info:whatsthis", "Upgrades configurations from Cura 2.2 to Cura 2.4."),
|
||||||
|
"api": 3
|
||||||
|
},
|
||||||
|
"version_upgrade": {
|
||||||
|
# From To Upgrade function
|
||||||
|
("machine_instance", 2): ("machine_stack", 3, upgrade.upgradeMachineInstance),
|
||||||
|
("extruder_train", 2): ("extruder_train", 3, upgrade.upgradeExtruderTrain)
|
||||||
|
},
|
||||||
|
"sources": {
|
||||||
|
"machine_stack": {
|
||||||
|
"get_version": upgrade.getCfgVersion,
|
||||||
|
"location": {"./machine_instances"}
|
||||||
|
},
|
||||||
|
"extruder_train": {
|
||||||
|
"get_version": upgrade.getCfgVersion,
|
||||||
|
"location": {"./extruders"}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
def register(app):
|
||||||
|
return { "version_upgrade": upgrade }
|
@ -106,6 +106,8 @@
|
|||||||
"line_width": { "value": "machine_nozzle_size * 0.875" },
|
"line_width": { "value": "machine_nozzle_size * 0.875" },
|
||||||
"machine_min_cool_heat_time_window": { "value": "15" },
|
"machine_min_cool_heat_time_window": { "value": "15" },
|
||||||
"default_material_print_temperature": { "value": "200" },
|
"default_material_print_temperature": { "value": "200" },
|
||||||
|
"material_bed_temperature": { "maximum_value": "115" },
|
||||||
|
"material_bed_temperature_layer_0": { "maximum_value": "115" },
|
||||||
"material_standby_temperature": { "value": "100" },
|
"material_standby_temperature": { "value": "100" },
|
||||||
"multiple_mesh_overlap": { "value": "0" },
|
"multiple_mesh_overlap": { "value": "0" },
|
||||||
"prime_tower_enable": { "value": "True" },
|
"prime_tower_enable": { "value": "True" },
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"id": "ultimaker3_extended_extruder_left",
|
"id": "ultimaker3_extended_extruder_left",
|
||||||
"version": 2,
|
"version": 2,
|
||||||
"name": "Print core 1",
|
"name": "Extruder 1",
|
||||||
"inherits": "fdmextruder",
|
"inherits": "fdmextruder",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"machine": "ultimaker3_extended",
|
"machine": "ultimaker3_extended",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"id": "ultimaker3_extended_extruder_right",
|
"id": "ultimaker3_extended_extruder_right",
|
||||||
"version": 2,
|
"version": 2,
|
||||||
"name": "Print core 2",
|
"name": "Extruder 2",
|
||||||
"inherits": "fdmextruder",
|
"inherits": "fdmextruder",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"machine": "ultimaker3_extended",
|
"machine": "ultimaker3_extended",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"id": "ultimaker3_extruder_left",
|
"id": "ultimaker3_extruder_left",
|
||||||
"version": 2,
|
"version": 2,
|
||||||
"name": "Print core 1",
|
"name": "Extruder 1",
|
||||||
"inherits": "fdmextruder",
|
"inherits": "fdmextruder",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"machine": "ultimaker3",
|
"machine": "ultimaker3",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"id": "ultimaker3_extruder_right",
|
"id": "ultimaker3_extruder_right",
|
||||||
"version": 2,
|
"version": 2,
|
||||||
"name": "Print core 2",
|
"name": "Extruder 2",
|
||||||
"inherits": "fdmextruder",
|
"inherits": "fdmextruder",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"machine": "ultimaker3",
|
"machine": "ultimaker3",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"id": "ultimaker_original_dual_1st",
|
"id": "ultimaker_original_dual_1st",
|
||||||
"version": 2,
|
"version": 2,
|
||||||
"name": "1st Extruder",
|
"name": "Extruder 1",
|
||||||
"inherits": "fdmextruder",
|
"inherits": "fdmextruder",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"machine": "ultimaker_original_dual",
|
"machine": "ultimaker_original_dual",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"id": "ultimaker_original_dual_2nd",
|
"id": "ultimaker_original_dual_2nd",
|
||||||
"version": 2,
|
"version": 2,
|
||||||
"name": "2nd Extruder",
|
"name": "Extruder 2",
|
||||||
"inherits": "fdmextruder",
|
"inherits": "fdmextruder",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"machine": "ultimaker_original_dual",
|
"machine": "ultimaker_original_dual",
|
||||||
|
@ -127,7 +127,7 @@ UM.ManagementPage
|
|||||||
{
|
{
|
||||||
text: catalog.i18nc("@action:button", "Activate");
|
text: catalog.i18nc("@action:button", "Activate");
|
||||||
iconName: "list-activate";
|
iconName: "list-activate";
|
||||||
enabled: base.currentItem != null && base.currentItem.id != Cura.MachineManager.activeMaterialId
|
enabled: base.currentItem != null && base.currentItem.id != Cura.MachineManager.activeMaterialId && Cura.MachineManager.hasMaterials
|
||||||
onClicked: Cura.MachineManager.setActiveMaterial(base.currentItem.id)
|
onClicked: Cura.MachineManager.setActiveMaterial(base.currentItem.id)
|
||||||
},
|
},
|
||||||
Button
|
Button
|
||||||
@ -144,9 +144,11 @@ UM.ManagementPage
|
|||||||
{
|
{
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if(Cura.MachineManager.hasMaterials)
|
||||||
|
{
|
||||||
Cura.MachineManager.setActiveMaterial(material_id)
|
Cura.MachineManager.setActiveMaterial(material_id)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
|
@ -84,7 +84,7 @@ Item
|
|||||||
|
|
||||||
onTextChanged:
|
onTextChanged:
|
||||||
{
|
{
|
||||||
definitionsModel.filter = {"label": "*" + text};
|
definitionsModel.filter = {"i18n_label": "*" + text};
|
||||||
findingSettings = (text.length > 0);
|
findingSettings = (text.length > 0);
|
||||||
if(findingSettings != lastFindingSettings)
|
if(findingSettings != lastFindingSettings)
|
||||||
{
|
{
|
||||||
|
@ -8,6 +8,7 @@ import QtQuick.Layouts 1.1
|
|||||||
|
|
||||||
import UM 1.2 as UM
|
import UM 1.2 as UM
|
||||||
import Cura 1.0 as Cura
|
import Cura 1.0 as Cura
|
||||||
|
import "Menus"
|
||||||
|
|
||||||
Rectangle
|
Rectangle
|
||||||
{
|
{
|
||||||
@ -30,9 +31,21 @@ Rectangle
|
|||||||
property bool printerConnected: Cura.MachineManager.printerOutputDevices.length != 0
|
property bool printerConnected: Cura.MachineManager.printerOutputDevices.length != 0
|
||||||
property bool printerAcceptsCommands: printerConnected && Cura.MachineManager.printerOutputDevices[0].acceptsCommands
|
property bool printerAcceptsCommands: printerConnected && Cura.MachineManager.printerOutputDevices[0].acceptsCommands
|
||||||
|
|
||||||
color: UM.Theme.getColor("sidebar");
|
color: UM.Theme.getColor("sidebar")
|
||||||
UM.I18nCatalog { id: catalog; name:"cura"}
|
UM.I18nCatalog { id: catalog; name:"cura"}
|
||||||
|
|
||||||
|
Timer {
|
||||||
|
id: tooltipDelayTimer
|
||||||
|
interval: 500
|
||||||
|
repeat: false
|
||||||
|
property var item
|
||||||
|
property string text
|
||||||
|
|
||||||
|
onTriggered:
|
||||||
|
{
|
||||||
|
base.showTooltip(base, {x:1, y:item.y}, text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function showTooltip(item, position, text)
|
function showTooltip(item, position, text)
|
||||||
{
|
{
|
||||||
@ -73,7 +86,7 @@ Rectangle
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mode selection buttons for changing between Setting & Monitor print mode
|
// Printer selection and mode selection buttons for changing between Setting & Monitor print mode
|
||||||
Rectangle
|
Rectangle
|
||||||
{
|
{
|
||||||
id: sidebarHeaderBar
|
id: sidebarHeaderBar
|
||||||
@ -85,25 +98,90 @@ Rectangle
|
|||||||
Row
|
Row
|
||||||
{
|
{
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width;
|
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||||
|
spacing: UM.Theme.getSize("default_margin").width
|
||||||
|
|
||||||
|
ToolButton
|
||||||
|
{
|
||||||
|
id: machineSelection
|
||||||
|
text: Cura.MachineManager.activeMachineName
|
||||||
|
|
||||||
|
width: parent.width - (showSettings.width + showMonitor.width + 2 * UM.Theme.getSize("default_margin").width)
|
||||||
|
height: UM.Theme.getSize("sidebar_header").height
|
||||||
|
tooltip: Cura.MachineManager.activeMachineName
|
||||||
|
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
style: ButtonStyle {
|
||||||
|
background: Rectangle {
|
||||||
|
color: control.hovered ? UM.Theme.getColor("button_hover") :
|
||||||
|
control.pressed ? UM.Theme.getColor("button_hover") : UM.Theme.getColor("sidebar_header_bar")
|
||||||
|
Behavior on color { ColorAnimation { duration: 50; } }
|
||||||
|
|
||||||
|
UM.RecolorImage {
|
||||||
|
id: downArrow
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||||
|
width: UM.Theme.getSize("standard_arrow").width
|
||||||
|
height: UM.Theme.getSize("standard_arrow").height
|
||||||
|
sourceSize.width: width
|
||||||
|
sourceSize.height: width
|
||||||
|
color: UM.Theme.getColor("text_reversed")
|
||||||
|
source: UM.Theme.getIcon("arrow_bottom")
|
||||||
|
}
|
||||||
|
Label {
|
||||||
|
id: sidebarComboBoxLabel
|
||||||
|
color: UM.Theme.getColor("text_reversed")
|
||||||
|
text: control.text;
|
||||||
|
elide: Text.ElideRight;
|
||||||
|
anchors.left: parent.left;
|
||||||
|
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||||
|
anchors.right: downArrow.left;
|
||||||
|
anchors.rightMargin: control.rightMargin;
|
||||||
|
anchors.verticalCenter: parent.verticalCenter;
|
||||||
|
font: UM.Theme.getFont("large")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
label: Label{}
|
||||||
|
}
|
||||||
|
|
||||||
|
menu: PrinterMenu { }
|
||||||
|
}
|
||||||
|
|
||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
id: showSettings
|
id: showSettings
|
||||||
width: (parent.width - UM.Theme.getSize("default_margin").width) / 2
|
width: height
|
||||||
height: UM.Theme.getSize("sidebar_header").height
|
height: UM.Theme.getSize("sidebar_header").height
|
||||||
onClicked: monitoringPrint = false
|
onClicked: monitoringPrint = false
|
||||||
iconSource: UM.Theme.getIcon("tab_settings");
|
iconSource: UM.Theme.getIcon("tab_settings");
|
||||||
checkable: true
|
checkable: true
|
||||||
checked: !monitoringPrint
|
checked: !monitoringPrint
|
||||||
exclusiveGroup: sidebarHeaderBarGroup
|
exclusiveGroup: sidebarHeaderBarGroup
|
||||||
|
property string tooltipText: catalog.i18nc("@tooltip", "<b>Print Setup</b><br/><br/>Edit or review the settings for the active print job.")
|
||||||
|
|
||||||
|
onHoveredChanged: {
|
||||||
|
if (hovered)
|
||||||
|
{
|
||||||
|
tooltipDelayTimer.item = showSettings
|
||||||
|
tooltipDelayTimer.text = tooltipText
|
||||||
|
tooltipDelayTimer.start();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
tooltipDelayTimer.stop();
|
||||||
|
base.hideTooltip();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
style: UM.Theme.styles.sidebar_header_tab
|
style: UM.Theme.styles.sidebar_header_tab
|
||||||
}
|
}
|
||||||
|
|
||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
id: showMonitor
|
id: showMonitor
|
||||||
width: (parent.width - UM.Theme.getSize("default_margin").width) / 2
|
width: height
|
||||||
height: UM.Theme.getSize("sidebar_header").height
|
height: UM.Theme.getSize("sidebar_header").height
|
||||||
onClicked: monitoringPrint = true
|
onClicked: monitoringPrint = true
|
||||||
iconSource: {
|
iconSource: {
|
||||||
@ -139,6 +217,21 @@ Rectangle
|
|||||||
checkable: true
|
checkable: true
|
||||||
checked: monitoringPrint
|
checked: monitoringPrint
|
||||||
exclusiveGroup: sidebarHeaderBarGroup
|
exclusiveGroup: sidebarHeaderBarGroup
|
||||||
|
property string tooltipText: catalog.i18nc("@tooltip", "<b>Print Monitor</b><br/><br/>Monitor the state of the connected printer and the print job in progress.")
|
||||||
|
|
||||||
|
onHoveredChanged: {
|
||||||
|
if (hovered)
|
||||||
|
{
|
||||||
|
tooltipDelayTimer.item = showMonitor
|
||||||
|
tooltipDelayTimer.text = tooltipText
|
||||||
|
tooltipDelayTimer.start();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
tooltipDelayTimer.stop();
|
||||||
|
base.hideTooltip();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
style: UM.Theme.styles.sidebar_header_tab
|
style: UM.Theme.styles.sidebar_header_tab
|
||||||
}
|
}
|
||||||
@ -151,7 +244,6 @@ Rectangle
|
|||||||
width: parent.width
|
width: parent.width
|
||||||
|
|
||||||
anchors.top: sidebarHeaderBar.bottom
|
anchors.top: sidebarHeaderBar.bottom
|
||||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
|
||||||
|
|
||||||
onShowTooltip: base.showTooltip(item, location, text)
|
onShowTooltip: base.showTooltip(item, location, text)
|
||||||
onHideTooltip: base.hideTooltip()
|
onHideTooltip: base.hideTooltip()
|
||||||
@ -160,10 +252,11 @@ Rectangle
|
|||||||
Rectangle {
|
Rectangle {
|
||||||
id: headerSeparator
|
id: headerSeparator
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: UM.Theme.getSize("sidebar_lining").height
|
visible: !monitoringPrint
|
||||||
|
height: visible ? UM.Theme.getSize("sidebar_lining").height : 0
|
||||||
color: UM.Theme.getColor("sidebar_lining")
|
color: UM.Theme.getColor("sidebar_lining")
|
||||||
anchors.top: header.bottom
|
anchors.top: header.bottom
|
||||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
anchors.topMargin: visible ? UM.Theme.getSize("default_margin").height : 0
|
||||||
}
|
}
|
||||||
|
|
||||||
onCurrentModeIndexChanged:
|
onCurrentModeIndexChanged:
|
||||||
@ -212,6 +305,20 @@ Rectangle
|
|||||||
checked: base.currentModeIndex == index
|
checked: base.currentModeIndex == index
|
||||||
onClicked: base.currentModeIndex = index
|
onClicked: base.currentModeIndex = index
|
||||||
|
|
||||||
|
onHoveredChanged: {
|
||||||
|
if (hovered)
|
||||||
|
{
|
||||||
|
tooltipDelayTimer.item = settingsModeSelection
|
||||||
|
tooltipDelayTimer.text = model.tooltipText
|
||||||
|
tooltipDelayTimer.start();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
tooltipDelayTimer.stop();
|
||||||
|
base.hideTooltip();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
style: ButtonStyle {
|
style: ButtonStyle {
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
border.width: UM.Theme.getSize("default_lining").width
|
border.width: UM.Theme.getSize("default_lining").width
|
||||||
@ -408,8 +515,18 @@ Rectangle
|
|||||||
|
|
||||||
Component.onCompleted:
|
Component.onCompleted:
|
||||||
{
|
{
|
||||||
modesListModel.append({ text: catalog.i18nc("@title:tab", "Recommended"), item: sidebarSimple, showFilterButton: false })
|
modesListModel.append({
|
||||||
modesListModel.append({ text: catalog.i18nc("@title:tab", "Custom"), item: sidebarAdvanced, showFilterButton: true })
|
text: catalog.i18nc("@title:tab", "Recommended"),
|
||||||
|
tooltipText: catalog.i18nc("@tooltip", "<b>Recommended Print Setup</b><br/><br/>Print with the recommended settings for the selected printer, material and quality."),
|
||||||
|
item: sidebarSimple,
|
||||||
|
showFilterButton: false
|
||||||
|
})
|
||||||
|
modesListModel.append({
|
||||||
|
text: catalog.i18nc("@title:tab", "Custom"),
|
||||||
|
tooltipText: catalog.i18nc("@tooltip", "<b>Custom Print Setup</b><br/><br/>Print with finegrained control over every last bit of the slicing process."),
|
||||||
|
item: sidebarAdvanced,
|
||||||
|
showFilterButton: true
|
||||||
|
})
|
||||||
sidebarContents.push({ "item": modesListModel.get(base.currentModeIndex).item, "immediate": true });
|
sidebarContents.push({ "item": modesListModel.get(base.currentModeIndex).item, "immediate": true });
|
||||||
|
|
||||||
var index = parseInt(UM.Preferences.getValue("cura/active_mode"))
|
var index = parseInt(UM.Preferences.getValue("cura/active_mode"))
|
||||||
|
@ -21,44 +21,23 @@ Column
|
|||||||
signal showTooltip(Item item, point location, string text)
|
signal showTooltip(Item item, point location, string text)
|
||||||
signal hideTooltip()
|
signal hideTooltip()
|
||||||
|
|
||||||
Row
|
Item
|
||||||
{
|
{
|
||||||
id: machineSelectionRow
|
id: extruderSelectionRow
|
||||||
height: UM.Theme.getSize("sidebar_setup").height
|
width: parent.width
|
||||||
|
height: UM.Theme.getSize("sidebar_tabs").height
|
||||||
|
visible: machineExtruderCount.properties.value > 1 && !sidebar.monitoringPrint
|
||||||
|
|
||||||
anchors
|
Rectangle
|
||||||
{
|
{
|
||||||
left: parent.left
|
id: extruderSeparator
|
||||||
leftMargin: UM.Theme.getSize("default_margin").width
|
visible: machineExtruderCount.properties.value > 1 && !sidebar.monitoringPrint
|
||||||
right: parent.right
|
|
||||||
rightMargin: UM.Theme.getSize("default_margin").width
|
|
||||||
}
|
|
||||||
|
|
||||||
Label
|
width: parent.width
|
||||||
{
|
height: parent.height
|
||||||
id: machineSelectionLabel
|
color: UM.Theme.getColor("sidebar_lining")
|
||||||
text: catalog.i18nc("@label:listbox", "Printer:");
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
font: UM.Theme.getFont("default");
|
|
||||||
color: UM.Theme.getColor("text");
|
|
||||||
|
|
||||||
width: parent.width * 0.45 - UM.Theme.getSize("default_margin").width
|
anchors.top: extruderSelectionRow.top
|
||||||
}
|
|
||||||
|
|
||||||
ToolButton
|
|
||||||
{
|
|
||||||
id: machineSelection
|
|
||||||
text: Cura.MachineManager.activeMachineName;
|
|
||||||
|
|
||||||
height: UM.Theme.getSize("setting_control").height
|
|
||||||
tooltip: Cura.MachineManager.activeMachineName
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
style: UM.Theme.styles.sidebar_header_button
|
|
||||||
|
|
||||||
width: parent.width * 0.55 + UM.Theme.getSize("default_margin").width
|
|
||||||
|
|
||||||
menu: PrinterMenu { }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ListView
|
ListView
|
||||||
@ -66,17 +45,15 @@ Column
|
|||||||
id: extrudersList
|
id: extrudersList
|
||||||
property var index: 0
|
property var index: 0
|
||||||
|
|
||||||
visible: machineExtruderCount.properties.value > 1 && !sidebar.monitoringPrint
|
height: UM.Theme.getSize("sidebar_header_mode_tabs").height
|
||||||
height: UM.Theme.getSize("sidebar_header_mode_toggle").height
|
width: parent.width
|
||||||
|
|
||||||
boundsBehavior: Flickable.StopAtBounds
|
boundsBehavior: Flickable.StopAtBounds
|
||||||
|
|
||||||
anchors
|
anchors
|
||||||
{
|
{
|
||||||
left: parent.left
|
left: parent.left
|
||||||
leftMargin: UM.Theme.getSize("default_margin").width
|
|
||||||
right: parent.right
|
right: parent.right
|
||||||
rightMargin: UM.Theme.getSize("default_margin").width
|
bottom: extruderSelectionRow.bottom
|
||||||
}
|
}
|
||||||
|
|
||||||
ExclusiveGroup { id: extruderMenuGroup; }
|
ExclusiveGroup { id: extruderMenuGroup; }
|
||||||
@ -117,14 +94,25 @@ Column
|
|||||||
background: Rectangle
|
background: Rectangle
|
||||||
{
|
{
|
||||||
border.width: UM.Theme.getSize("default_lining").width
|
border.width: UM.Theme.getSize("default_lining").width
|
||||||
border.color: control.checked ? UM.Theme.getColor("toggle_checked_border") :
|
border.color: control.checked ? UM.Theme.getColor("tab_checked_border") :
|
||||||
control.pressed ? UM.Theme.getColor("toggle_active_border") :
|
control.pressed ? UM.Theme.getColor("tab_active_border") :
|
||||||
control.hovered ? UM.Theme.getColor("toggle_hovered_border") : UM.Theme.getColor("toggle_unchecked_border")
|
control.hovered ? UM.Theme.getColor("tab_hovered_border") : UM.Theme.getColor("tab_unchecked_border")
|
||||||
color: control.checked ? UM.Theme.getColor("toggle_checked") :
|
color: control.checked ? UM.Theme.getColor("tab_checked") :
|
||||||
control.pressed ? UM.Theme.getColor("toggle_active") :
|
control.pressed ? UM.Theme.getColor("tab_active") :
|
||||||
control.hovered ? UM.Theme.getColor("toggle_hovered") : UM.Theme.getColor("toggle_unchecked")
|
control.hovered ? UM.Theme.getColor("tab_hovered") : UM.Theme.getColor("tab_unchecked")
|
||||||
Behavior on color { ColorAnimation { duration: 50; } }
|
Behavior on color { ColorAnimation { duration: 50; } }
|
||||||
|
|
||||||
|
Rectangle
|
||||||
|
{
|
||||||
|
id: highlight
|
||||||
|
visible: control.checked
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.top: parent.top
|
||||||
|
height: UM.Theme.getSize("sidebar_header_highlight").height
|
||||||
|
color: UM.Theme.getColor("sidebar_header_bar")
|
||||||
|
}
|
||||||
|
|
||||||
Rectangle
|
Rectangle
|
||||||
{
|
{
|
||||||
id: swatch
|
id: swatch
|
||||||
@ -137,7 +125,7 @@ Column
|
|||||||
|
|
||||||
color: model.color
|
color: model.color
|
||||||
border.width: UM.Theme.getSize("default_lining").width
|
border.width: UM.Theme.getSize("default_lining").width
|
||||||
border.color: UM.Theme.getColor("toggle_checked")
|
border.color: UM.Theme.getColor("setting_control_border")
|
||||||
}
|
}
|
||||||
|
|
||||||
Label
|
Label
|
||||||
@ -148,9 +136,9 @@ Column
|
|||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width / 2
|
anchors.rightMargin: UM.Theme.getSize("default_margin").width / 2
|
||||||
|
|
||||||
color: control.checked ? UM.Theme.getColor("toggle_checked_text") :
|
color: control.checked ? UM.Theme.getColor("tab_checked_text") :
|
||||||
control.pressed ? UM.Theme.getColor("toggle_active_text") :
|
control.pressed ? UM.Theme.getColor("tab_active_text") :
|
||||||
control.hovered ? UM.Theme.getColor("toggle_hovered_text") : UM.Theme.getColor("toggle_unchecked_text")
|
control.hovered ? UM.Theme.getColor("tab_hovered_text") : UM.Theme.getColor("tab_unchecked_text")
|
||||||
|
|
||||||
font: UM.Theme.getFont("default")
|
font: UM.Theme.getFont("default")
|
||||||
text: control.text
|
text: control.text
|
||||||
@ -161,6 +149,15 @@ Column
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Item
|
||||||
|
{
|
||||||
|
id: variantRowSpacer
|
||||||
|
height: UM.Theme.getSize("default_margin").height / 4
|
||||||
|
width: height
|
||||||
|
visible: !extruderSelectionRow.visible
|
||||||
|
}
|
||||||
|
|
||||||
Row
|
Row
|
||||||
{
|
{
|
||||||
|
@ -30,7 +30,7 @@ Item
|
|||||||
id: infillCellLeft
|
id: infillCellLeft
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
width: base.width / 100 * 35 - UM.Theme.getSize("default_margin").width
|
width: base.width * .45 - UM.Theme.getSize("default_margin").width
|
||||||
height: childrenRect.height
|
height: childrenRect.height
|
||||||
|
|
||||||
Label
|
Label
|
||||||
@ -52,7 +52,7 @@ Item
|
|||||||
id: infillCellRight
|
id: infillCellRight
|
||||||
|
|
||||||
height: childrenRect.height;
|
height: childrenRect.height;
|
||||||
width: base.width / 100 * 65
|
width: base.width * .55
|
||||||
spacing: UM.Theme.getSize("default_margin").width
|
spacing: UM.Theme.getSize("default_margin").width
|
||||||
|
|
||||||
anchors.left: infillCellLeft.right
|
anchors.left: infillCellLeft.right
|
||||||
@ -231,7 +231,7 @@ Item
|
|||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||||
anchors.verticalCenter: enableSupportCheckBox.verticalCenter
|
anchors.verticalCenter: enableSupportCheckBox.verticalCenter
|
||||||
width: parent.width / 100 * 45 - 3 * UM.Theme.getSize("default_margin").width
|
width: parent.width * .45 - 3 * UM.Theme.getSize("default_margin").width
|
||||||
text: catalog.i18nc("@label", "Enable Support");
|
text: catalog.i18nc("@label", "Enable Support");
|
||||||
font: UM.Theme.getFont("default");
|
font: UM.Theme.getFont("default");
|
||||||
color: UM.Theme.getColor("text");
|
color: UM.Theme.getColor("text");
|
||||||
@ -279,7 +279,7 @@ Item
|
|||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||||
anchors.verticalCenter: supportExtruderCombobox.verticalCenter
|
anchors.verticalCenter: supportExtruderCombobox.verticalCenter
|
||||||
width: parent.width / 100 * 45 - 3 * UM.Theme.getSize("default_margin").width
|
width: parent.width * .45 - 3 * UM.Theme.getSize("default_margin").width
|
||||||
text: catalog.i18nc("@label", "Support Extruder");
|
text: catalog.i18nc("@label", "Support Extruder");
|
||||||
font: UM.Theme.getFont("default");
|
font: UM.Theme.getFont("default");
|
||||||
color: UM.Theme.getColor("text");
|
color: UM.Theme.getColor("text");
|
||||||
@ -319,7 +319,7 @@ Item
|
|||||||
}
|
}
|
||||||
anchors.left: supportExtruderLabel.right
|
anchors.left: supportExtruderLabel.right
|
||||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||||
width: parent.width / 100 * 55
|
width: parent.width * .55
|
||||||
height:
|
height:
|
||||||
{
|
{
|
||||||
if ((supportEnabled.properties.value == "True") && (machineExtruderCount.properties.value > 1))
|
if ((supportEnabled.properties.value == "True") && (machineExtruderCount.properties.value > 1))
|
||||||
@ -332,6 +332,7 @@ Item
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Behavior on height { NumberAnimation { duration: 100 } }
|
||||||
|
|
||||||
style: UM.Theme.styles.combobox_color
|
style: UM.Theme.styles.combobox_color
|
||||||
enabled: base.settingsEnabled
|
enabled: base.settingsEnabled
|
||||||
@ -377,7 +378,7 @@ Item
|
|||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||||
anchors.verticalCenter: adhesionCheckBox.verticalCenter
|
anchors.verticalCenter: adhesionCheckBox.verticalCenter
|
||||||
width: parent.width / 100 * 45 - 3 * UM.Theme.getSize("default_margin").width
|
width: parent.width * .45 - 3 * UM.Theme.getSize("default_margin").width
|
||||||
text: catalog.i18nc("@label", "Build Plate Adhesion");
|
text: catalog.i18nc("@label", "Build Plate Adhesion");
|
||||||
font: UM.Theme.getFont("default");
|
font: UM.Theme.getFont("default");
|
||||||
color: UM.Theme.getColor("text");
|
color: UM.Theme.getColor("text");
|
||||||
|
@ -29,6 +29,11 @@ UM.PointingRectangle {
|
|||||||
} else {
|
} else {
|
||||||
x = position.x - base.width;
|
x = position.x - base.width;
|
||||||
y = position.y - UM.Theme.getSize("tooltip_arrow_margins").height;
|
y = position.y - UM.Theme.getSize("tooltip_arrow_margins").height;
|
||||||
|
if(y < 0)
|
||||||
|
{
|
||||||
|
position.y += -y;
|
||||||
|
y = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
base.opacity = 1;
|
base.opacity = 1;
|
||||||
target = Qt.point(40 , position.y + UM.Theme.getSize("tooltip_arrow_margins").height / 2)
|
target = Qt.point(40 , position.y + UM.Theme.getSize("tooltip_arrow_margins").height / 2)
|
||||||
|
@ -91,7 +91,21 @@
|
|||||||
"toggle_hovered_text": [24, 41, 77, 255],
|
"toggle_hovered_text": [24, 41, 77, 255],
|
||||||
"toggle_active": [32, 166, 219, 255],
|
"toggle_active": [32, 166, 219, 255],
|
||||||
"toggle_active_border": [32, 166, 219, 255],
|
"toggle_active_border": [32, 166, 219, 255],
|
||||||
"toggle_active_text": [255, 255, 255, 255],
|
"toggle_active_text": [24, 41, 77, 255],
|
||||||
|
|
||||||
|
"tab_checked": [255, 255, 255, 255],
|
||||||
|
"tab_checked_border": [255, 255, 255, 255],
|
||||||
|
"tab_checked_text": [24, 41, 77, 255],
|
||||||
|
"tab_unchecked": [245, 245, 245, 255],
|
||||||
|
"tab_unchecked_border": [245, 245, 245, 255],
|
||||||
|
"tab_unchecked_text": [127, 127, 127, 255],
|
||||||
|
"tab_hovered": [245, 245, 245, 255],
|
||||||
|
"tab_hovered_border": [245, 245, 245, 255],
|
||||||
|
"tab_hovered_text": [32, 166, 219, 255],
|
||||||
|
"tab_active": [255, 255, 255, 255],
|
||||||
|
"tab_active_border": [255, 255, 255, 255],
|
||||||
|
"tab_active_text": [24, 41, 77, 255],
|
||||||
|
"tab_background": [245, 245, 245, 255],
|
||||||
|
|
||||||
"action_button": [255, 255, 255, 255],
|
"action_button": [255, 255, 255, 255],
|
||||||
"action_button_text": [24, 41, 77, 255],
|
"action_button_text": [24, 41, 77, 255],
|
||||||
@ -191,10 +205,12 @@
|
|||||||
|
|
||||||
"sidebar": [35.0, 10.0],
|
"sidebar": [35.0, 10.0],
|
||||||
"sidebar_header": [0.0, 4.0],
|
"sidebar_header": [0.0, 4.0],
|
||||||
"sidebar_header_highlight": [0.5, 0.5],
|
"sidebar_header_highlight": [0.25, 0.25],
|
||||||
"sidebar_header_mode_toggle": [0.0, 2.0],
|
"sidebar_header_mode_toggle": [0.0, 2.0],
|
||||||
|
"sidebar_header_mode_tabs": [0.0, 3.0],
|
||||||
"sidebar_lining": [0.5, 0.5],
|
"sidebar_lining": [0.5, 0.5],
|
||||||
"sidebar_setup": [0.0, 2.0],
|
"sidebar_setup": [0.0, 2.0],
|
||||||
|
"sidebar_tabs": [0.0, 3.5],
|
||||||
"sidebar_inputfields": [0.0, 2.0],
|
"sidebar_inputfields": [0.0, 2.0],
|
||||||
"simple_mode_infill_caption": [0.0, 5.0],
|
"simple_mode_infill_caption": [0.0, 5.0],
|
||||||
"simple_mode_infill_height": [0.0, 8.0],
|
"simple_mode_infill_height": [0.0, 8.0],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user