mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-12-11 16:00:47 -07:00
Fix merge conflicts with #2422
This commit is contained in:
commit
acb709e804
19 changed files with 812 additions and 140 deletions
|
|
@ -1354,7 +1354,7 @@
|
|||
"default_value": 2,
|
||||
"minimum_value": "0",
|
||||
"minimum_value_warning": "infill_line_width",
|
||||
"value": "0 if infill_sparse_density == 0 else (infill_line_width * 100) / infill_sparse_density * (2 if infill_pattern == 'grid' else (3 if infill_pattern == 'triangles' or infill_pattern == 'cubic' or infill_pattern == 'cubicsubdiv' else (2 if infill_pattern == 'tetrahedral' or infill_pattern == 'quarter_cubic' else 1)))",
|
||||
"value": "0 if infill_sparse_density == 0 else (infill_line_width * 100) / infill_sparse_density * (2 if infill_pattern == 'grid' else (3 if infill_pattern == 'triangles' or infill_pattern == 'cubic' or infill_pattern == 'cubicsubdiv' else (2 if infill_pattern == 'tetrahedral' or infill_pattern == 'quarter_cubic' else (1 if infill_pattern == 'cross' or infill_pattern == 'cross_3d' else 1))))",
|
||||
"limit_to_extruder": "infill_extruder_nr",
|
||||
"settable_per_mesh": true
|
||||
}
|
||||
|
|
@ -1376,7 +1376,9 @@
|
|||
"quarter_cubic": "Quarter Cubic",
|
||||
"concentric": "Concentric",
|
||||
"concentric_3d": "Concentric 3D",
|
||||
"zigzag": "Zig Zag"
|
||||
"zigzag": "Zig Zag",
|
||||
"cross": "Cross",
|
||||
"cross_3d": "Cross 3D"
|
||||
},
|
||||
"default_value": "grid",
|
||||
"enabled": "infill_sparse_density > 0",
|
||||
|
|
@ -1384,6 +1386,15 @@
|
|||
"limit_to_extruder": "infill_extruder_nr",
|
||||
"settable_per_mesh": true
|
||||
},
|
||||
"zig_zaggify_infill":
|
||||
{
|
||||
"label": "Connect Infill Lines",
|
||||
"description": "Connect the ends where the infill pattern meets the inner wall using a lines which follows the shape of the inner wall. Enabling this setting can make the infill adhere to the walls better and reduces the effects on infill on the quality of vertical surfaces. Disabling this setting reduces the amount of material used.",
|
||||
"type": "bool",
|
||||
"default_value": true,
|
||||
"enabled": "infill_pattern == 'cross' or infill_pattern == 'cross_3d'",
|
||||
"settable_per_mesh": true
|
||||
},
|
||||
"infill_angles":
|
||||
{
|
||||
"label": "Infill Line Directions",
|
||||
|
|
@ -3360,7 +3371,8 @@
|
|||
"triangles": "Triangles",
|
||||
"concentric": "Concentric",
|
||||
"concentric_3d": "Concentric 3D",
|
||||
"zigzag": "Zig Zag"
|
||||
"zigzag": "Zig Zag",
|
||||
"cross": "Cross"
|
||||
},
|
||||
"default_value": "zigzag",
|
||||
"enabled": "support_enable",
|
||||
|
|
@ -5168,6 +5180,30 @@
|
|||
"limit_to_extruder": "top_bottom_extruder_nr",
|
||||
"settable_per_mesh": true
|
||||
},
|
||||
"cross_infill_pocket_size":
|
||||
{
|
||||
"label": "Cross 3D Pocket Size",
|
||||
"description": "The size of pockets at four-way crossings in the cross 3D pattern at heights where the pattern is touching itself.",
|
||||
"unit": "mm",
|
||||
"type": "float",
|
||||
"default_value": 2.0,
|
||||
"value": "infill_line_distance",
|
||||
"minimum_value": "0",
|
||||
"maximum_value_warning": "infill_line_distance * math.sqrt(2)",
|
||||
"enabled": "infill_pattern == 'cross_3d'",
|
||||
"limit_to_extruder": "infill_extruder_nr",
|
||||
"settable_per_mesh": true
|
||||
},
|
||||
"cross_infill_apply_pockets_alternatingly":
|
||||
{
|
||||
"label": "Alternate Cross 3D Pockets",
|
||||
"description": "Only apply pockets at half of the four-way crossings in the cross 3D pattern and alternate the location of the pockets between heights where the pattern is touching itself.",
|
||||
"type": "bool",
|
||||
"default_value": true,
|
||||
"enabled": "infill_pattern == 'cross_3d'",
|
||||
"limit_to_extruder": "infill_extruder_nr",
|
||||
"settable_per_mesh": true
|
||||
},
|
||||
"spaghetti_infill_enabled":
|
||||
{
|
||||
"label": "Spaghetti Infill",
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 55 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 3.5 KiB |
|
|
@ -22,6 +22,7 @@ Menu
|
|||
checked: Cura.MachineManager.activeQualityChangesId == "" && Cura.MachineManager.activeQualityType == model.metadata.quality_type
|
||||
exclusiveGroup: group
|
||||
onTriggered: Cura.MachineManager.setActiveQuality(model.id)
|
||||
visible: model.available
|
||||
}
|
||||
|
||||
onObjectAdded: menu.insertItem(index, object);
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ import QtQuick.Layouts 1.1
|
|||
import UM 1.2 as UM
|
||||
import Cura 1.0 as Cura
|
||||
|
||||
import "../Menus"
|
||||
|
||||
Item
|
||||
{
|
||||
id: base;
|
||||
|
|
@ -18,6 +20,88 @@ Item
|
|||
signal showTooltip(Item item, point location, string text);
|
||||
signal hideTooltip();
|
||||
|
||||
Item
|
||||
{
|
||||
id: globalProfileRow
|
||||
height: UM.Theme.getSize("sidebar_setup").height
|
||||
visible: !sidebar.monitoringPrint && !sidebar.hideSettings
|
||||
|
||||
anchors
|
||||
{
|
||||
top: parent.top
|
||||
left: parent.left
|
||||
leftMargin: UM.Theme.getSize("sidebar_margin").width
|
||||
right: parent.right
|
||||
rightMargin: UM.Theme.getSize("sidebar_margin").width
|
||||
}
|
||||
|
||||
Text
|
||||
{
|
||||
id: globalProfileLabel
|
||||
text: catalog.i18nc("@label","Profile:");
|
||||
width: parent.width * 0.45 - UM.Theme.getSize("sidebar_margin").width - 2
|
||||
font: UM.Theme.getFont("default");
|
||||
color: UM.Theme.getColor("text");
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
}
|
||||
|
||||
ToolButton
|
||||
{
|
||||
id: globalProfileSelection
|
||||
|
||||
text: {
|
||||
var result = Cura.MachineManager.activeQualityName;
|
||||
if (Cura.MachineManager.activeQualityLayerHeight > 0) {
|
||||
result += " <font color=\"" + UM.Theme.getColor("text_detail") + "\">";
|
||||
result += " - ";
|
||||
result += Cura.MachineManager.activeQualityLayerHeight + "mm";
|
||||
result += "</font>";
|
||||
}
|
||||
return result;
|
||||
}
|
||||
enabled: !header.currentExtruderVisible || header.currentExtruderIndex > -1
|
||||
|
||||
width: parent.width * 0.55
|
||||
height: UM.Theme.getSize("setting_control").height
|
||||
anchors.left: globalProfileLabel.right
|
||||
anchors.right: parent.right
|
||||
tooltip: Cura.MachineManager.activeQualityName
|
||||
style: UM.Theme.styles.sidebar_header_button
|
||||
activeFocusOnPress: true;
|
||||
menu: ProfileMenu { }
|
||||
|
||||
UM.SimpleButton
|
||||
{
|
||||
id: customisedSettings
|
||||
|
||||
visible: Cura.MachineManager.hasUserSettings
|
||||
height: parent.height * 0.6
|
||||
width: parent.height * 0.6
|
||||
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: UM.Theme.getSize("setting_preferences_button_margin").width - UM.Theme.getSize("sidebar_margin").width
|
||||
|
||||
color: hovered ? UM.Theme.getColor("setting_control_button_hover") : UM.Theme.getColor("setting_control_button");
|
||||
iconSource: UM.Theme.getIcon("star");
|
||||
|
||||
onClicked:
|
||||
{
|
||||
forceActiveFocus();
|
||||
Cura.Actions.manageProfiles.trigger()
|
||||
}
|
||||
onEntered:
|
||||
{
|
||||
var content = catalog.i18nc("@tooltip","Some setting/override values are different from the values stored in the profile.\n\nClick to open the profile manager.")
|
||||
base.showTooltip(globalProfileRow, Qt.point(-UM.Theme.getSize("sidebar_margin").width, 0), content)
|
||||
}
|
||||
onExited: base.hideTooltip()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle
|
||||
{
|
||||
id: filterContainer
|
||||
|
|
@ -40,7 +124,8 @@ Item
|
|||
|
||||
anchors
|
||||
{
|
||||
top: parent.top
|
||||
top: globalProfileRow.bottom
|
||||
topMargin: UM.Theme.getSize("sidebar_margin").height
|
||||
left: parent.left
|
||||
leftMargin: UM.Theme.getSize("sidebar_margin").width
|
||||
right: parent.right
|
||||
|
|
|
|||
|
|
@ -125,7 +125,6 @@ Rectangle
|
|||
font: UM.Theme.getFont("large")
|
||||
color: UM.Theme.getColor("text")
|
||||
visible: !monitoringPrint
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
|
|
@ -135,7 +134,17 @@ Rectangle
|
|||
height: UM.Theme.getSize("sidebar_header_mode_toggle").height
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width
|
||||
anchors.top: headerSeparator.bottom
|
||||
anchors.top:
|
||||
{
|
||||
if (settingsModeLabel.contentWidth >= parent.width - width - UM.Theme.getSize("sidebar_margin").width)
|
||||
{
|
||||
return settingsModeLabel.bottom;
|
||||
}
|
||||
else
|
||||
{
|
||||
return headerSeparator.bottom;
|
||||
}
|
||||
}
|
||||
anchors.topMargin: UM.Theme.getSize("sidebar_margin").height
|
||||
visible: !monitoringPrint && !hideSettings
|
||||
Component{
|
||||
|
|
@ -203,95 +212,12 @@ Rectangle
|
|||
}
|
||||
}
|
||||
|
||||
Item
|
||||
{
|
||||
id: globalProfileRow
|
||||
height: UM.Theme.getSize("sidebar_setup").height
|
||||
visible: !sidebar.monitoringPrint && !sidebar.hideSettings
|
||||
|
||||
anchors
|
||||
{
|
||||
top: settingsModeSelection.bottom
|
||||
topMargin: UM.Theme.getSize("sidebar_margin").height
|
||||
left: parent.left
|
||||
leftMargin: UM.Theme.getSize("sidebar_margin").width
|
||||
right: parent.right
|
||||
rightMargin: UM.Theme.getSize("sidebar_margin").width
|
||||
}
|
||||
|
||||
Text
|
||||
{
|
||||
id: globalProfileLabel
|
||||
text: catalog.i18nc("@label","Profile:");
|
||||
width: parent.width * 0.45 - UM.Theme.getSize("sidebar_margin").width - 2
|
||||
font: UM.Theme.getFont("default");
|
||||
color: UM.Theme.getColor("text");
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
}
|
||||
|
||||
ToolButton
|
||||
{
|
||||
id: globalProfileSelection
|
||||
|
||||
text: {
|
||||
var result = Cura.MachineManager.activeQualityName;
|
||||
if (Cura.MachineManager.activeQualityLayerHeight > 0) {
|
||||
result += " <font color=\"" + UM.Theme.getColor("text_detail") + "\">";
|
||||
result += " - ";
|
||||
result += Cura.MachineManager.activeQualityLayerHeight + "mm";
|
||||
result += "</font>";
|
||||
}
|
||||
return result;
|
||||
}
|
||||
enabled: !header.currentExtruderVisible || header.currentExtruderIndex > -1
|
||||
|
||||
width: parent.width * 0.55
|
||||
height: UM.Theme.getSize("setting_control").height
|
||||
anchors.left: globalProfileLabel.right
|
||||
anchors.right: parent.right
|
||||
tooltip: Cura.MachineManager.activeQualityName
|
||||
style: UM.Theme.styles.sidebar_header_button
|
||||
activeFocusOnPress: true;
|
||||
menu: ProfileMenu { }
|
||||
|
||||
UM.SimpleButton
|
||||
{
|
||||
id: customisedSettings
|
||||
|
||||
visible: Cura.MachineManager.hasUserSettings
|
||||
height: parent.height * 0.6
|
||||
width: parent.height * 0.6
|
||||
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: UM.Theme.getSize("setting_preferences_button_margin").width - UM.Theme.getSize("sidebar_margin").width
|
||||
|
||||
color: hovered ? UM.Theme.getColor("setting_control_button_hover") : UM.Theme.getColor("setting_control_button");
|
||||
iconSource: UM.Theme.getIcon("star");
|
||||
|
||||
onClicked:
|
||||
{
|
||||
forceActiveFocus();
|
||||
Cura.Actions.manageProfiles.trigger()
|
||||
}
|
||||
onEntered:
|
||||
{
|
||||
var content = catalog.i18nc("@tooltip","Some setting/override values are different from the values stored in the profile.\n\nClick to open the profile manager.")
|
||||
base.showTooltip(globalProfileRow, Qt.point(-UM.Theme.getSize("sidebar_margin").width, 0), content)
|
||||
}
|
||||
onExited: base.hideTooltip()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
StackView
|
||||
{
|
||||
id: sidebarContents
|
||||
|
||||
anchors.bottom: footerSeparator.top
|
||||
anchors.top: globalProfileRow.bottom
|
||||
anchors.top: settingsModeSelection.bottom
|
||||
anchors.topMargin: UM.Theme.getSize("sidebar_margin").height
|
||||
anchors.left: base.left
|
||||
anchors.right: base.right
|
||||
|
|
|
|||
|
|
@ -31,16 +31,391 @@ Item
|
|||
style: UM.Theme.styles.scrollview
|
||||
flickableItem.flickableDirection: Flickable.VerticalFlick
|
||||
|
||||
Item
|
||||
Rectangle
|
||||
{
|
||||
width: childrenRect.width
|
||||
height: childrenRect.height
|
||||
color: UM.Theme.getColor("sidebar")
|
||||
|
||||
//
|
||||
// Quality profile
|
||||
//
|
||||
Text
|
||||
{
|
||||
id: resolutionLabel
|
||||
anchors.top: resolutionSlider.top
|
||||
anchors.topMargin: UM.Theme.getSize("default_margin").height / 4
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width
|
||||
width: UM.Theme.getSize("sidebar").width * .45 - UM.Theme.getSize("sidebar_margin").width
|
||||
|
||||
text: catalog.i18nc("@label", "Layer Height")
|
||||
font: UM.Theme.getFont("default")
|
||||
color: UM.Theme.getColor("text")
|
||||
}
|
||||
|
||||
Text
|
||||
{
|
||||
id: speedLabel
|
||||
anchors.bottom: resolutionSlider.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width
|
||||
|
||||
text: catalog.i18nc("@label", "Print Speed")
|
||||
font: UM.Theme.getFont("default")
|
||||
color: UM.Theme.getColor("text")
|
||||
}
|
||||
|
||||
Text
|
||||
{
|
||||
id: speedLabelSlower
|
||||
anchors.top: speedLabel.top
|
||||
anchors.left: resolutionSlider.left
|
||||
|
||||
text: catalog.i18nc("@label", "Slower")
|
||||
font: UM.Theme.getFont("default")
|
||||
color: UM.Theme.getColor("text")
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
}
|
||||
|
||||
Text
|
||||
{
|
||||
id: speedLabelFaster
|
||||
anchors.top: speedLabel.top
|
||||
anchors.right: resolutionSlider.right
|
||||
|
||||
text: catalog.i18nc("@label", "Faster")
|
||||
font: UM.Theme.getFont("default")
|
||||
color: UM.Theme.getColor("text")
|
||||
horizontalAlignment: Text.AlignRight
|
||||
}
|
||||
|
||||
Item
|
||||
{
|
||||
id: resolutionSlider
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: UM.Theme.getSize("default_margin").height / 2
|
||||
anchors.left: infillCellRight.left
|
||||
anchors.right: infillCellRight.right
|
||||
width: UM.Theme.getSize("sidebar").width * .55
|
||||
height: UM.Theme.getSize("quality_slider_bar").height * 30
|
||||
|
||||
property var model: Cura.ProfilesModel
|
||||
|
||||
Connections
|
||||
{
|
||||
target: Cura.ProfilesModel
|
||||
onItemsChanged:
|
||||
{
|
||||
resolutionSlider.updateCurrentQualityIndex();
|
||||
resolutionSlider.updateBar();
|
||||
}
|
||||
}
|
||||
|
||||
Connections
|
||||
{
|
||||
target: Cura.MachineManager
|
||||
onActiveQualityChanged:
|
||||
{
|
||||
resolutionSlider.updateCurrentQualityIndex();
|
||||
resolutionSlider.updateBar();
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted:
|
||||
{
|
||||
updateCurrentQualityIndex();
|
||||
updateBar();
|
||||
}
|
||||
|
||||
function updateCurrentQualityIndex()
|
||||
{
|
||||
for (var i = 0; i < resolutionSlider.model.rowCount(); ++i)
|
||||
{
|
||||
if (Cura.MachineManager.activeQualityId == resolutionSlider.model.getItem(i).id)
|
||||
{
|
||||
if (resolutionSlider.currentQualityIndex != i)
|
||||
{
|
||||
resolutionSlider.currentQualityIndex = i;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
resolutionSlider.currentQualityIndex = undefined;
|
||||
}
|
||||
|
||||
function updateBar()
|
||||
{
|
||||
fullRangeMax = Cura.ProfilesModel.rowCount();
|
||||
|
||||
// set avaiableMin
|
||||
var foundAvaiableMin = false;
|
||||
for (var i = 0; i < Cura.ProfilesModel.rowCount(); ++i)
|
||||
{
|
||||
if (Cura.ProfilesModel.getItem(i).available)
|
||||
{
|
||||
avaiableMin = i;
|
||||
foundAvaiableMin = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!foundAvaiableMin)
|
||||
{
|
||||
avaiableMin = undefined;
|
||||
}
|
||||
|
||||
var foundAvaiableMax = false;
|
||||
for (var i = Cura.ProfilesModel.rowCount() - 1; i >= 0; --i)
|
||||
{
|
||||
if (Cura.ProfilesModel.getItem(i).available)
|
||||
{
|
||||
avaiableMax = i;
|
||||
foundAvaiableMax = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!foundAvaiableMax)
|
||||
{
|
||||
avaiableMax = undefined;
|
||||
}
|
||||
|
||||
currentHover = undefined;
|
||||
backgroundBar.requestPaint();
|
||||
}
|
||||
|
||||
property var fullRangeMin: 0
|
||||
property var fullRangeMax: model.rowCount()
|
||||
|
||||
property var avaiableMin
|
||||
property var avaiableMax
|
||||
property var currentQualityIndex
|
||||
property var currentHover
|
||||
|
||||
//TODO: get from theme
|
||||
property var barLeftRightMargin: 5
|
||||
property var tickLeftRightMargin: 2
|
||||
property var tickMargin: 15
|
||||
property var tickThickness: 1
|
||||
property var tickWidth: 1
|
||||
property var tickHeight: 5
|
||||
property var tickTextHeight: 8
|
||||
property var totalTickCount: fullRangeMax - fullRangeMin
|
||||
property var selectedCircleDiameter: 10
|
||||
|
||||
property var showQualityText: false
|
||||
|
||||
property var tickStepSize: (width - (barLeftRightMargin + tickLeftRightMargin) * 2) / (totalTickCount > 1 ? totalTickCount - 1 : 1)
|
||||
property var tickAreaList:
|
||||
{
|
||||
var area_list = [];
|
||||
if (avaiableMin != undefined && avaiableMax != undefined)
|
||||
{
|
||||
for (var i = avaiableMin; i <= avaiableMax; ++i)
|
||||
{
|
||||
var start_x = (barLeftRightMargin + tickLeftRightMargin) + tickStepSize * (i - fullRangeMin);
|
||||
var diameter = tickStepSize * 0.9;
|
||||
start_x = start_x + tickWidth / 2 - (diameter / 2);
|
||||
var end_x = start_x + diameter;
|
||||
var start_y = height / 2 - diameter / 2;
|
||||
var end_y = start_y + diameter;
|
||||
|
||||
var area = {"id": i,
|
||||
"start_x": start_x, "end_x": end_x,
|
||||
"start_y": start_y, "end_y": end_y,
|
||||
};
|
||||
area_list.push(area);
|
||||
}
|
||||
}
|
||||
return area_list;
|
||||
}
|
||||
|
||||
onCurrentHoverChanged:
|
||||
{
|
||||
backgroundBar.requestPaint();
|
||||
}
|
||||
onCurrentQualityIndex:
|
||||
{
|
||||
backgroundBar.requestPaint();
|
||||
}
|
||||
|
||||
// background bar
|
||||
Canvas
|
||||
{
|
||||
id: backgroundBar
|
||||
anchors.fill: parent
|
||||
|
||||
Timer {
|
||||
interval: 16
|
||||
running: true
|
||||
repeat: true
|
||||
onTriggered: backgroundBar.requestPaint()
|
||||
}
|
||||
|
||||
onPaint:
|
||||
{
|
||||
var ctx = getContext("2d");
|
||||
ctx.reset();
|
||||
ctx.fillStyle = UM.Theme.getColor("quality_slider_unavailable");
|
||||
|
||||
const bar_left_right_margin = resolutionSlider.barLeftRightMargin;
|
||||
const tick_left_right_margin = resolutionSlider.tickLeftRightMargin;
|
||||
const tick_margin = resolutionSlider.tickMargin;
|
||||
const bar_thickness = resolutionSlider.tickThickness;
|
||||
const tick_width = resolutionSlider.tickWidth;
|
||||
const tick_height = resolutionSlider.tickHeight;
|
||||
const tick_text_height = resolutionSlider.tickTextHeight;
|
||||
const selected_circle_diameter = resolutionSlider.selectedCircleDiameter;
|
||||
|
||||
// draw unavailable bar
|
||||
const bar_top = parent.height / 2 - bar_thickness / 2;
|
||||
ctx.fillRect(bar_left_right_margin, bar_top, width - bar_left_right_margin * 2, bar_thickness);
|
||||
|
||||
// draw unavailable ticks
|
||||
var total_tick_count = resolutionSlider.totalTickCount;
|
||||
const step_size = resolutionSlider.tickStepSize;
|
||||
var current_start_x = bar_left_right_margin + tick_left_right_margin;
|
||||
|
||||
const tick_top = parent.height / 2 - tick_height / 2;
|
||||
|
||||
for (var i = 0; i < total_tick_count; ++i)
|
||||
{
|
||||
ctx.fillRect(current_start_x, tick_top, tick_width, tick_height);
|
||||
current_start_x += step_size;
|
||||
}
|
||||
|
||||
// draw available bar and ticks
|
||||
if (resolutionSlider.avaiableMin != undefined && resolutionSlider.avaiableMax != undefined)
|
||||
{
|
||||
current_start_x = (bar_left_right_margin + tick_left_right_margin) + step_size * (resolutionSlider.avaiableMin - resolutionSlider.fullRangeMin);
|
||||
ctx.fillStyle = UM.Theme.getColor("quality_slider_available");
|
||||
total_tick_count = resolutionSlider.avaiableMax - resolutionSlider.avaiableMin + 1;
|
||||
|
||||
const available_bar_width = step_size * (total_tick_count - 1);
|
||||
ctx.fillRect(current_start_x, bar_top, available_bar_width, bar_thickness);
|
||||
|
||||
for (var i = 0; i < total_tick_count; ++i)
|
||||
{
|
||||
ctx.fillRect(current_start_x, tick_top, tick_width, tick_height);
|
||||
current_start_x += step_size;
|
||||
}
|
||||
}
|
||||
|
||||
// print the selected circle
|
||||
if (resolutionSlider.currentQualityIndex != undefined)
|
||||
{
|
||||
var circle_start_x = (bar_left_right_margin + tick_left_right_margin) + step_size * (resolutionSlider.currentQualityIndex - resolutionSlider.fullRangeMin);
|
||||
circle_start_x = circle_start_x + tick_width / 2 - selected_circle_diameter / 2;
|
||||
var circle_start_y = height / 2 - selected_circle_diameter / 2;
|
||||
ctx.fillStyle = UM.Theme.getColor("quality_slider_handle");
|
||||
ctx.beginPath();
|
||||
ctx.ellipse(circle_start_x, circle_start_y, selected_circle_diameter, selected_circle_diameter);
|
||||
ctx.fill();
|
||||
ctx.closePath();
|
||||
}
|
||||
|
||||
// print the hovered circle
|
||||
if (resolutionSlider.currentHover != undefined && resolutionSlider.currentHover != resolutionSlider.currentQualityIndex)
|
||||
{
|
||||
var circle_start_x = (bar_left_right_margin + tick_left_right_margin) + step_size * (resolutionSlider.currentHover - resolutionSlider.fullRangeMin);
|
||||
circle_start_x = circle_start_x + tick_width / 2 - selected_circle_diameter / 2;
|
||||
var circle_start_y = height / 2 - selected_circle_diameter / 2;
|
||||
ctx.fillStyle = UM.Theme.getColor("quality_slider_handle_hover");
|
||||
ctx.beginPath();
|
||||
ctx.ellipse(circle_start_x, circle_start_y, selected_circle_diameter, selected_circle_diameter);
|
||||
ctx.fill();
|
||||
ctx.closePath();
|
||||
}
|
||||
|
||||
// print layer height texts
|
||||
total_tick_count = resolutionSlider.totalTickCount;
|
||||
const step_size = resolutionSlider.tickStepSize;
|
||||
current_start_x = bar_left_right_margin + tick_left_right_margin;
|
||||
for (var i = 0; i < total_tick_count; ++i)
|
||||
{
|
||||
const text_top = parent.height / 2 - tick_height - tick_text_height;
|
||||
ctx.fillStyle = UM.Theme.getColor("quality_slider_text");
|
||||
|
||||
ctx.font = "12px sans-serif";
|
||||
const string_length = resolutionSlider.model.getItem(i).layer_height_without_unit.length;
|
||||
const offset = string_length / 2 * 4;
|
||||
|
||||
var start_x = current_start_x - offset;
|
||||
if (i == 0)
|
||||
{
|
||||
start_x = 0;
|
||||
}
|
||||
else if (i == total_tick_count - 1)
|
||||
{
|
||||
start_x = current_start_x - offset * 2;
|
||||
}
|
||||
|
||||
ctx.fillText(resolutionSlider.model.getItem(i).layer_height_without_unit, start_x, text_top);
|
||||
current_start_x += step_size;
|
||||
}
|
||||
|
||||
// print currently selected quality text
|
||||
if (resolutionSlider.showQualityText && resolutionSlider.currentQualityIndex != undefine)
|
||||
{
|
||||
const text_top = parent.height / 2 + tick_height + tick_text_height * 2;
|
||||
total_tick_count = resolutionSlider.totalTickCount;
|
||||
const step_size = resolutionSlider.tickStepSize;
|
||||
current_start_x = (tick_left_right_margin) + step_size * (resolutionSlider.currentQualityIndex - resolutionSlider.fullRangeMin);
|
||||
ctx.fillStyle = UM.Theme.getColor("quality_slider_text");
|
||||
ctx.fillText(resolutionSlider.model.getItem(resolutionSlider.currentQualityIndex).name, current_start_x - 6, text_top);
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea
|
||||
{
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
|
||||
onClicked:
|
||||
{
|
||||
for (var i = 0; i < resolutionSlider.tickAreaList.length; ++i)
|
||||
{
|
||||
var area = resolutionSlider.tickAreaList[i];
|
||||
if (area.start_x <= mouseX && mouseX <= area.end_x && area.start_y <= mouseY && mouseY <= area.end_y)
|
||||
{
|
||||
resolutionSlider.currentHover = undefined;
|
||||
resolutionSlider.currentQualityIndex = area.id;
|
||||
|
||||
Cura.MachineManager.setActiveQuality(resolutionSlider.model.getItem(resolutionSlider.currentQualityIndex).id);
|
||||
return;
|
||||
}
|
||||
}
|
||||
resolutionSlider.currentHover = undefined;
|
||||
}
|
||||
onPositionChanged:
|
||||
{
|
||||
for (var i = 0; i < resolutionSlider.tickAreaList.length; ++i)
|
||||
{
|
||||
var area = resolutionSlider.tickAreaList[i];
|
||||
if (area.start_x <= mouseX && mouseX <= area.end_x && area.start_y <= mouseY && mouseY <= area.end_y)
|
||||
{
|
||||
resolutionSlider.currentHover = area.id;
|
||||
return;
|
||||
}
|
||||
}
|
||||
resolutionSlider.currentHover = undefined;
|
||||
}
|
||||
onExited:
|
||||
{
|
||||
resolutionSlider.currentHover = undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Infill
|
||||
//
|
||||
Item
|
||||
{
|
||||
id: infillCellLeft
|
||||
anchors.top: parent.top
|
||||
anchors.top: speedLabel.top
|
||||
anchors.topMargin: UM.Theme.getSize("sidebar_margin").height * 1.2
|
||||
anchors.left: parent.left
|
||||
anchors.topMargin: UM.Theme.getSize("sidebar_margin").height * 0.8
|
||||
width: UM.Theme.getSize("sidebar").width * .45 - UM.Theme.getSize("sidebar_margin").width
|
||||
height: childrenRect.height
|
||||
|
||||
|
|
@ -69,6 +444,7 @@ Item
|
|||
|
||||
anchors.left: infillCellLeft.right
|
||||
anchors.top: infillCellLeft.top
|
||||
anchors.topMargin: UM.Theme.getSize("sidebar_margin").height
|
||||
|
||||
Repeater
|
||||
{
|
||||
|
|
@ -390,6 +766,8 @@ Item
|
|||
visible: adhesionCheckBox.visible
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width
|
||||
anchors.right: infillCellLeft.right
|
||||
anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width
|
||||
anchors.verticalCenter: adhesionCheckBox.verticalCenter
|
||||
text: catalog.i18nc("@label", "Build Plate Adhesion");
|
||||
font: UM.Theme.getFont("default");
|
||||
|
|
@ -479,7 +857,7 @@ Item
|
|||
anchors.top: parent.top
|
||||
wrapMode: Text.WordWrap
|
||||
//: Tips label
|
||||
text: catalog.i18nc("@label", "Need help improving your prints?<br>Read the <a href='%1'>Ultimaker Troubleshooting Guides</a>").arg("https://ultimaker.com/en/troubleshooting") + "<img src='%1'></img>".arg(UM.Theme.getIcon("play"))
|
||||
text: catalog.i18nc("@label", "Need help improving your prints?<br>Read the <a href='%1'>Ultimaker Troubleshooting Guides</a>").arg("https://ultimaker.com/en/troubleshooting")
|
||||
font: UM.Theme.getFont("default");
|
||||
color: UM.Theme.getColor("text");
|
||||
linkColor: UM.Theme.getColor("text_link")
|
||||
|
|
|
|||
|
|
@ -65,8 +65,8 @@
|
|||
d="M62.1251127,1.03797468 C57.0530042,1.03797468 53.9746835,4.47968021 53.9746835,9.31992005 C53.9746835,14.1601599 57.0530042,17.6346436 62.1251127,17.6346436 L63.9217127,17.6346436 L63.9217127,13.297002 L62.1251127,13.297002 C59.5616713,13.2860759 58.3018603,11.4832778 58.3018603,9.3308461 C58.3018603,7.17841439 59.5616713,5.4083944 62.1251127,5.38654231 L66.2112822,5.38654231 L66.2112822,11.0680879 L66.2112822,13.297002 L66.2112822,17.6455696 L70.5822785,17.6455696 L70.5822785,17.3942705 L70.5822785,13.297002 L70.5822785,5.38654231 L70.5822785,1.80279813 L70.5822785,1.03797468 L62.1251127,1.03797468 Z"
|
||||
id="path8" />
|
||||
<path
|
||||
fill="white"
|
||||
d="M 41.518987,9.13915 V 17.646 h 4.36332 V 9.13915 c 0,-2.1053391 1.273557,-3.8366328 3.86497,-3.8580068 h 3.189432 V 1.038405 h -3.189432 c -5.127454,0 -8.22829,3.3664044 -8.22829,8.100745 z"
|
||||
id="path10"
|
||||
inkscape:connector-curvature="0"
|
||||
fill="white" />
|
||||
</svg>
|
||||
inkscape:connector-curvature="0" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
|
|
@ -128,14 +128,13 @@
|
|||
"progressbar_background": [255, 255, 255, 48],
|
||||
"progressbar_control": [255, 255, 255, 197],
|
||||
|
||||
"slider_groove": [39, 44, 48, 75],
|
||||
"slider_groove_border": [39, 44, 48, 0],
|
||||
"slider_groove_fill": [39, 44, 48, 182],
|
||||
"slider_groove": [245, 245, 245, 255],
|
||||
"slider_groove_border": [127, 127, 127, 255],
|
||||
"slider_groove_fill": [127, 127, 127, 255],
|
||||
"slider_handle": [255, 255, 255, 255],
|
||||
"slider_handle_hover": [77, 182, 226, 255],
|
||||
"slider_handle_border": [39, 44, 48, 255],
|
||||
"slider_handle_hover": [255, 255, 255, 255],
|
||||
"slider_handle_hover_border": [39, 44, 48, 255],
|
||||
"slider_text_background": [39, 44, 48, 255],
|
||||
"slider_text_background": [255, 255, 255, 255],
|
||||
|
||||
"checkbox": [43, 48, 52, 255],
|
||||
"checkbox_hover": [43, 48, 52, 255],
|
||||
|
|
@ -147,20 +146,10 @@
|
|||
"tooltip": [39, 44, 48, 255],
|
||||
"tooltip_text": [255, 255, 255, 204],
|
||||
|
||||
"message_background": [255, 255, 255, 200],
|
||||
"message_text": [0, 0, 0, 255],
|
||||
"message_border": [191, 191, 191, 200],
|
||||
"message_button": [255, 255, 255, 255],
|
||||
"message_button_hover": [12, 169, 227, 255],
|
||||
"message_button_active": [32, 166, 219, 255],
|
||||
"message_button_text": [24, 41, 77, 255],
|
||||
"message_button_text_hover": [255, 255, 255, 255],
|
||||
"message_button_text_active": [255, 255, 255, 255],
|
||||
"message_progressbar_background": [255, 255, 255, 255],
|
||||
"message_progressbar_control": [12, 169, 227, 255],
|
||||
|
||||
"tool_panel_background": [39, 44, 48, 255],
|
||||
|
||||
"tool_button_border": [255, 255, 255, 38],
|
||||
|
||||
"status_offline": [0, 0, 0, 255],
|
||||
"status_ready": [0, 205, 0, 255],
|
||||
"status_busy": [12, 169, 227, 255],
|
||||
|
|
@ -204,6 +193,19 @@
|
|||
"layerview_support_infill": [0, 255, 255, 255],
|
||||
"layerview_move_combing": [0, 0, 255, 255],
|
||||
"layerview_move_retraction": [128, 128, 255, 255],
|
||||
"layerview_support_interface": [64, 192, 255, 255]
|
||||
"layerview_support_interface": [64, 192, 255, 255],
|
||||
|
||||
"material_compatibility_warning": [255, 255, 255, 255],
|
||||
|
||||
"topbar_button_text_inactive": [255, 255, 255, 255],
|
||||
"topbar_button_text_active": [255, 255, 255, 255],
|
||||
"topbar_button_text_hovered": [255, 255, 255, 255],
|
||||
"topbar_background_color_monitoring": [39, 44, 48, 255],
|
||||
|
||||
"quality_slider_unavailable": [179, 179, 179, 255],
|
||||
"quality_slider_available": [255, 255, 255, 255],
|
||||
"quality_slider_handle": [255, 255, 255, 255],
|
||||
"quality_slider_handle_hover": [127, 127, 127, 255],
|
||||
"quality_slider_text": [255, 255, 255, 255]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -196,6 +196,12 @@
|
|||
"slider_handle_border": [39, 44, 48, 255],
|
||||
"slider_text_background": [255, 255, 255, 255],
|
||||
|
||||
"quality_slider_unavailable": [179, 179, 179, 255],
|
||||
"quality_slider_available": [0, 0, 0, 255],
|
||||
"quality_slider_handle": [0, 0, 0, 255],
|
||||
"quality_slider_handle_hover": [127, 127, 127, 255],
|
||||
"quality_slider_text": [0, 0, 0, 255],
|
||||
|
||||
"checkbox": [255, 255, 255, 255],
|
||||
"checkbox_hover": [255, 255, 255, 255],
|
||||
"checkbox_border": [64, 69, 72, 255],
|
||||
|
|
@ -215,7 +221,7 @@
|
|||
"tooltip": [68, 192, 255, 255],
|
||||
"tooltip_text": [255, 255, 255, 255],
|
||||
|
||||
"tool_button_border": [39, 44, 48, 255],
|
||||
"tool_button_border": [255, 255, 255, 0],
|
||||
|
||||
"message_background": [255, 255, 255, 255],
|
||||
"message_shadow": [0, 0, 0, 120],
|
||||
|
|
@ -332,12 +338,16 @@
|
|||
"button_tooltip": [1.0, 1.3],
|
||||
"button_tooltip_arrow": [0.25, 0.25],
|
||||
|
||||
"tool_button_border": [1.0, 0],
|
||||
|
||||
"progressbar": [26.0, 0.4],
|
||||
"progressbar_radius": [0, 0],
|
||||
"progressbar_control": [8.0, 0.4],
|
||||
|
||||
"scrollbar": [0.75, 0.5],
|
||||
|
||||
"quality_slider_bar": [1, 0.2],
|
||||
|
||||
"slider_groove": [0.3, 0.3],
|
||||
"slider_handle": [1.0, 1.0],
|
||||
"slider_layerview_size": [1.0, 22.0],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue