Merge branch 'master' into CURA-8247_badge_background_colour

This commit is contained in:
Ghostkeeper 2021-07-07 15:12:31 +02:00
commit 920e220bdb
No known key found for this signature in database
GPG Key ID: D2A8871EE34EC59A
31 changed files with 312 additions and 165 deletions

View File

@ -23,16 +23,14 @@ Item
{ {
left: parent.left left: parent.left
right: parent.right right: parent.right
leftMargin: UM.Theme.getSize("wide_margin").width leftMargin: UM.Theme.getSize("wide_margin").width * 2
rightMargin: UM.Theme.getSize("wide_margin").width rightMargin: UM.Theme.getSize("wide_margin").width * 2
} }
// Item to ensure that all of the buttons are nicely centered. // Item to ensure that all of the buttons are nicely centered.
Item Item
{ {
anchors.horizontalCenter: parent.horizontalCenter anchors.fill: parent
width: parent.width - 2 * UM.Theme.getSize("wide_margin").width
height: parent.height
RowLayout RowLayout
{ {

View File

@ -24,17 +24,15 @@ Item
{ {
left: parent.left left: parent.left
right: parent.right right: parent.right
leftMargin: UM.Theme.getSize("wide_margin").width leftMargin: UM.Theme.getSize("wide_margin").width * 2
rightMargin: UM.Theme.getSize("wide_margin").width rightMargin: UM.Theme.getSize("wide_margin").width * 2
} }
Row Row
{ {
id: stageMenuRow id: stageMenuRow
anchors.horizontalCenter: parent.horizontalCenter anchors.fill: parent
width: parent.width - 2 * UM.Theme.getSize("wide_margin").width
height: parent.height
// This is a trick to make sure that the borders of the two adjacent buttons' borders overlap. Otherwise // This is a trick to make sure that the borders of the two adjacent buttons' borders overlap. Otherwise
// there will be double border (one from each button) // there will be double border (one from each button)
spacing: -UM.Theme.getSize("default_lining").width spacing: -UM.Theme.getSize("default_lining").width
@ -52,7 +50,7 @@ Item
{ {
id: viewPanel id: viewPanel
height: parent.height height: parent.height
width: source != "" ? (previewMenu.width - viewsSelector.width - printSetupSelectorItem.width) : 0 width: source != "" ? (parent.width - viewsSelector.width - printSetupSelectorItem.width) : 0
source: UM.Controller.activeView != null && UM.Controller.activeView.stageMenuComponent != null ? UM.Controller.activeView.stageMenuComponent : "" source: UM.Controller.activeView != null && UM.Controller.activeView.stageMenuComponent != null ? UM.Controller.activeView.stageMenuComponent : ""
} }

View File

@ -1,23 +1,26 @@
// Copyright (c) 2019 Ultimaker B.V. // Copyright (c) 2021 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher. // Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.3 import QtQuick 2.3
import QtQuick.Controls 1.4 import QtQuick.Controls 2.4
import QtQuick.Controls.Styles 1.3 import QtQuick.Controls.Styles 1.3
import UM 1.3 as UM import UM 1.3 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
Rectangle Button
{ {
id: base
property var enabled: true
property var iconSource: null property var iconSource: null
color: enabled ? UM.Theme.getColor("monitor_icon_primary") : UM.Theme.getColor("monitor_icon_disabled") width: UM.Theme.getSize("button").width * 0.75 //Matching the size of the content of tool buttons.
height: width height: UM.Theme.getSize("button").height * 0.75
radius: Math.round(0.5 * width)
width: 24 * screenScaleFactor hoverEnabled: true
background: Rectangle
{
anchors.fill: parent
radius: 0.5 * width
color: parent.enabled ? (parent.hovered ? UM.Theme.getColor("monitor_secondary_button_hover") : "transparent") : UM.Theme.getColor("monitor_icon_disabled")
}
UM.RecolorImage UM.RecolorImage
{ {
@ -27,30 +30,21 @@ Rectangle
horizontalCenter: parent.horizontalCenter horizontalCenter: parent.horizontalCenter
verticalCenter: parent.verticalCenter verticalCenter: parent.verticalCenter
} }
color: UM.Theme.getColor("monitor_icon_accent") color: UM.Theme.getColor("primary")
height: width height: width
source: iconSource source: iconSource
width: Math.round(parent.width / 2) width: Math.round(parent.width / 2)
} }
MouseArea onClicked:
{ {
id: clickArea if (OutputDevice.activeCameraUrl != "")
anchors.fill: parent
hoverEnabled: base.enabled
onClicked:
{ {
if (base.enabled) OutputDevice.setActiveCameraUrl("")
{ }
if (OutputDevice.activeCameraUrl != "") else
{ {
OutputDevice.setActiveCameraUrl("") OutputDevice.setActiveCameraUrl(modelData.cameraUrl)
}
else
{
OutputDevice.setActiveCameraUrl(modelData.cameraUrl)
}
}
} }
} }
} }

View File

@ -0,0 +1,32 @@
{
"version": 2,
"name": "Creasee CS20",
"inherits": "fdmprinter",
"metadata": {
"visible": true,
"manufacturer": "Creasee",
"machine_extruder_trains":
{
"0": "creasee_extruder_0"
}
},
"overrides": {
"machine_name": { "default_value": "Creasee CS20" },
"machine_width": {
"default_value": 220
},
"machine_depth": {
"default_value": 220
},
"machine_height": {
"default_value": 250
},
"machine_start_gcode": {
"default_value": "G28 ;Home\nG1 Z15.0 F2000 ;Move the platform"
},
"machine_end_gcode": {
"default_value": "M104 S0\nM140 S0\nG92 E0\nG1 E-10 F2000\nG28 X0 Y0\nM84"
}
}
}

View File

@ -0,0 +1,32 @@
{
"version": 2,
"name": "Creasee CS30",
"inherits": "fdmprinter",
"metadata": {
"visible": true,
"manufacturer": "Creasee",
"machine_extruder_trains":
{
"0": "creasee_extruder_1"
}
},
"overrides": {
"machine_name": { "default_value": "Creasee CS30" },
"machine_width": {
"default_value": 300
},
"machine_depth": {
"default_value": 300
},
"machine_height": {
"default_value": 400
},
"machine_start_gcode": {
"default_value": "G28 ;Home\nG1 Z15.0 F2000 ;Move the platform"
},
"machine_end_gcode": {
"default_value": "M104 S0\nM140 S0\nG92 E0\nG1 E-10 F2000\nG28 X0 Y0\nM84"
}
}
}

View File

@ -73,6 +73,7 @@
"machine_steps_per_mm_x": { "default_value": 80 }, "machine_steps_per_mm_x": { "default_value": 80 },
"machine_steps_per_mm_y": { "default_value": 80 }, "machine_steps_per_mm_y": { "default_value": 80 },
"machine_steps_per_mm_z": { "default_value": 2560 }, "machine_steps_per_mm_z": { "default_value": 2560 },
"machine_steps_per_mm_e": { "default_value": 98 } "machine_steps_per_mm_e": { "default_value": 98 },
"speed_z_hop": {"default_value": 4}
} }
} }

View File

@ -96,7 +96,6 @@
"speed_travel": {"value": 150}, "speed_travel": {"value": 150},
"speed_layer_0": {"value": 10}, "speed_layer_0": {"value": 10},
"speed_travel_layer_0": {"value": 50}, "speed_travel_layer_0": {"value": 50},
"machine_max_feedrate_z": {"value": 0},
"speed_slowdown_layers": {"value": 2}, "speed_slowdown_layers": {"value": 2},
"speed_equalize_flow_enabled": {"value": false }, "speed_equalize_flow_enabled": {"value": false },
"acceleration_enabled": {"value": false }, "acceleration_enabled": {"value": false },

View File

@ -80,6 +80,7 @@
"retraction_amount" : { "default_value": 4.5}, "retraction_amount" : { "default_value": 4.5},
"retraction_speed" : { "default_value": 40}, "retraction_speed" : { "default_value": 40},
"coasting_enable": { "default_value": true }, "coasting_enable": { "default_value": true },
"prime_tower_enable": { "default_value": false} "prime_tower_enable": { "default_value": false},
"speed_z_hop": {"default_value": 1.5}
} }
} }

View File

@ -0,0 +1,45 @@
{
"version": 2,
"name": "PBR 3D Gen-I",
"inherits": "fdmprinter",
"metadata": {
"visible": true,
"author": "Kapil H. Sonone, Prof. Bahubali P. Fuladi",
"manufacturer": "PBR Research",
"file_formats": "text/x-gcode",
"platform": "pbr3d_g1_buildplate.stl",
"platform_offset": [0, -5, 0],
"machine_extruder_trains":
{
"0": "pbr3d_g1_extruder_0"
}
},
"overrides": {
"machine_name": { "default_value": "PBR 3D Gen-I" },
"machine_heated_bed": {
"default_value": true
},
"machine_width": {
"default_value": 200
},
"machine_height": {
"default_value": 200
},
"machine_depth": {
"default_value": 200
},
"machine_center_is_zero": {
"default_value": false
},
"gantry_height": {
"value": "200"
},
"machine_start_gcode": {
"default_value": "G28 ;Home\nG1 Z15.0 F6000 ;Move the Platform down 15mm\n;Prime the extruder\nG92 E0\nG1 F200 E3\nG92 E0"
},
"machine_end_gcode": {
"default_value": "M104 S0\nM140 S0\n;Retract the Filament\nG92 E1\nG1 E-1 F300\nG28 X0 Y0\nM84"
}
}
}

View File

@ -45,6 +45,7 @@
}, },
"machine_end_gcode": { "machine_end_gcode": {
"default_value": "M104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+0.5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\nM84 ;steppers off\nG90 ;absolute positioning" "default_value": "M104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+0.5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\nM84 ;steppers off\nG90 ;absolute positioning"
} },
"speed_z_hop": {"default_value": 5}
} }
} }

View File

@ -146,7 +146,8 @@
"adaptive_layer_height_variation_step": { "value": 0.04 }, "adaptive_layer_height_variation_step": { "value": 0.04 },
"top_bottom_thickness": {"value": "layer_height_0 + layer_height * 3" }, "top_bottom_thickness": {"value": "layer_height_0 + layer_height * 3" },
"wall_thickness": {"value": "line_width * 2" } "wall_thickness": {"value": "line_width * 2" },
"speed_z_hop": {"default_value": 8}
} }
} }

View File

@ -47,6 +47,7 @@
"machine_max_acceleration_y": { "default_value": 2650 }, "machine_max_acceleration_y": { "default_value": 2650 },
"acceleration_print": { "default_value": 2650 }, "acceleration_print": { "default_value": 2650 },
"machine_start_gcode": { "default_value": "G21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 X0 Y0 ;move X/Y to min endstops\nG28 Z0 ;move Z to min endstops\nG1 Z15.0 F9000 ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E3 ;extrude 3mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F9000\n;Put printing message on LCD screen\nM117 Printing..." }, "machine_start_gcode": { "default_value": "G21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 X0 Y0 ;move X/Y to min endstops\nG28 Z0 ;move Z to min endstops\nG1 Z15.0 F9000 ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E3 ;extrude 3mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F9000\n;Put printing message on LCD screen\nM117 Printing..." },
"machine_end_gcode": { "default_value": "M104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+0.5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more\nG90 ;absolute positioning\nG1 X0 Y200 F3600 ;move extruder out of the way by moving the baseplate to the front for easier access to printed object\nM84 ;steppers off" } "machine_end_gcode": { "default_value": "M104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+0.5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more\nG90 ;absolute positioning\nG1 X0 Y200 F3600 ;move extruder out of the way by moving the baseplate to the front for easier access to printed object\nM84 ;steppers off" },
"speed_z_hop": {"default_value": 3}
} }
} }

View File

@ -0,0 +1,15 @@
{
"version": 2,
"name": "Extruder 1",
"inherits": "fdmextruder",
"metadata": {
"machine": "creasee_cs20",
"position": "0"
},
"overrides": {
"extruder_nr": { "default_value": 0 },
"machine_nozzle_size": { "default_value": 0.4 },
"material_diameter": { "default_value": 1.75 }
}
}

View File

@ -0,0 +1,15 @@
{
"version": 2,
"name": "Extruder 1",
"inherits": "fdmextruder",
"metadata": {
"machine": "creasee_cs30",
"position": "0"
},
"overrides": {
"extruder_nr": { "default_value": 0 },
"machine_nozzle_size": { "default_value": 0.4 },
"material_diameter": { "default_value": 1.75 }
}
}

View File

@ -0,0 +1,15 @@
{
"version": 2,
"name": "Extruder 1",
"inherits": "fdmextruder",
"metadata": {
"machine": "pbr3d_g1",
"position": "0"
},
"overrides": {
"extruder_nr": { "default_value": 0 },
"machine_nozzle_size": { "default_value": 0.4 },
"material_diameter": { "default_value": 1.75 }
}
}

Binary file not shown.

View File

@ -1,4 +1,4 @@
// Copyright (c) 2020 Ultimaker B.V. // Copyright (c) 2021 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher. // Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.7 import QtQuick 2.7
@ -18,19 +18,16 @@ Button
property alias textFont: buttonText.font property alias textFont: buttonText.font
property alias cornerRadius: backgroundRect.radius property alias cornerRadius: backgroundRect.radius
property alias tooltip: tooltip.tooltipText property alias tooltip: tooltip.tooltipText
property alias cornerSide: backgroundRect.cornerSide
property color color: UM.Theme.getColor("primary") property color color: UM.Theme.getColor("primary")
property color hoverColor: UM.Theme.getColor("primary_hover") property color hoverColor: UM.Theme.getColor("primary_hover")
property color disabledColor: color property color disabledColor: color
property color textColor: UM.Theme.getColor("button_text") property color textColor: UM.Theme.getColor("button_text")
property color textHoverColor: textColor property color textHoverColor: textColor
property color textDisabledColor: textColor property color textDisabledColor: disabledColor
property color outlineColor: color property color outlineColor: color
property color outlineHoverColor: hoverColor property color outlineHoverColor: outlineColor
property color outlineDisabledColor: outlineColor property color outlineDisabledColor: disabledColor
property alias shadowColor: shadow.color
property alias shadowEnabled: shadow.visible
property alias busy: busyIndicator.visible property alias busy: busyIndicator.visible
property bool underlineTextOnHover: false property bool underlineTextOnHover: false
@ -46,6 +43,49 @@ Button
// but it can exceed a maximum, then this value have to be set. // but it can exceed a maximum, then this value have to be set.
property int maximumWidth: 0 property int maximumWidth: 0
// These properties are deprecated.
// To (maybe) prevent a major SDK upgrade, mark them as deprecated instead of just outright removing them.
// Note, if you still want rounded corners, use (something based on) Cura.RoundedRectangle.
property alias cornerSide: deprecatedProperties.cornerSide
property alias shadowColor: deprecatedProperties.shadowColor
property alias shadowEnabled: deprecatedProperties.shadowEnabled
Item
{
id: deprecatedProperties
visible: false
enabled: false
width: 0
height: 0
property var cornerSide: null
property var shadowColor: null
property var shadowEnabled: null
onCornerSideChanged:
{
if (cornerSide != null)
{
CuraApplication.writeToLog("w", "'ActionButton.cornerSide' is deprecated since 4.11. Rounded corners can still be made with 'Cura.RoundedRectangle'.");
}
}
onShadowColorChanged:
{
if (shadowColor != null)
{
CuraApplication.writeToLog("w", "'ActionButton.shadowColor' is deprecated since 4.11.")
}
}
onShadowEnabledChanged:
{
if (shadowEnabled != null)
{
CuraApplication.writeToLog("w", "'ActionButton.shadowEnabled' is deprecated since 4.11.")
}
}
}
leftPadding: UM.Theme.getSize("default_margin").width leftPadding: UM.Theme.getSize("default_margin").width
rightPadding: UM.Theme.getSize("default_margin").width rightPadding: UM.Theme.getSize("default_margin").width
height: UM.Theme.getSize("action_button").height height: UM.Theme.getSize("action_button").height
@ -130,24 +170,13 @@ Button
background: Cura.RoundedRectangle background: Cura.RoundedRectangle
{ {
id: backgroundRect id: backgroundRect
cornerSide: Cura.RoundedRectangle.Direction.All
color: button.enabled ? (button.hovered ? button.hoverColor : button.color) : button.disabledColor color: button.enabled ? (button.hovered ? button.hoverColor : button.color) : button.disabledColor
radius: UM.Theme.getSize("action_button_radius").width
border.width: UM.Theme.getSize("default_lining").width border.width: UM.Theme.getSize("default_lining").width
border.color: button.enabled ? (button.hovered ? button.outlineHoverColor : button.outlineColor) : button.outlineDisabledColor border.color: button.enabled ? (button.hovered ? button.outlineHoverColor : button.outlineColor) : button.outlineDisabledColor
}
DropShadow // Disable the rounded-ness of this rectangle. We can't use a normal Rectangle here yet, as the API/SDK has only just been deprecated.
{
id: shadow
// Don't blur the shadow
radius: 0 radius: 0
anchors.fill: backgroundRect cornerSide: Cura.RoundedRectangle.Direction.None
source: backgroundRect
verticalOffset: 2
visible: false
// Should always be drawn behind the background.
z: backgroundRect.z - 1
} }
Cura.ToolTip Cura.ToolTip
@ -189,4 +218,4 @@ Button
duration: 2500 duration: 2500
} }
} }
} }

View File

@ -1,4 +1,4 @@
// Copyright (c) 2018 Ultimaker B.V. // Copyright (c) 2021 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher. // Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.7 import QtQuick 2.7
@ -23,7 +23,6 @@ Item
id: saveToButton id: saveToButton
height: parent.height height: parent.height
fixedWidthMode: true fixedWidthMode: true
cornerSide: deviceSelectionMenu.visible ? Cura.RoundedRectangle.Direction.Left : Cura.RoundedRectangle.Direction.All
anchors anchors
{ {
@ -43,15 +42,11 @@ Item
} }
} }
Cura.ActionButton Cura.PrimaryButton
{ {
id: deviceSelectionMenu id: deviceSelectionMenu
height: parent.height height: parent.height
shadowEnabled: true
shadowColor: UM.Theme.getColor("primary_shadow")
cornerSide: Cura.RoundedRectangle.Direction.Right
anchors anchors
{ {
top: parent.top top: parent.top
@ -61,7 +56,7 @@ Item
leftPadding: UM.Theme.getSize("narrow_margin").width //Need more space than usual here for wide text. leftPadding: UM.Theme.getSize("narrow_margin").width //Need more space than usual here for wide text.
rightPadding: UM.Theme.getSize("narrow_margin").width rightPadding: UM.Theme.getSize("narrow_margin").width
iconSource: popup.opened ? UM.Theme.getIcon("ChevronSingleUp") : UM.Theme.getIcon("ChevronSingleDown") iconSource: popup.opened ? UM.Theme.getIcon("ChevronSingleUp") : UM.Theme.getIcon("ChevronSingleDown")
color: UM.Theme.getColor("action_panel_secondary") color: popup.opened ? hoverColor : UM.Theme.getColor("action_panel_secondary")
visible: (devicesModel.deviceCount > 1) visible: (devicesModel.deviceCount > 1)
onClicked: popup.opened ? popup.close() : popup.open() onClicked: popup.opened ? popup.close() : popup.open()
@ -70,6 +65,7 @@ Item
{ {
id: popup id: popup
padding: 0 padding: 0
spacing: 0
y: -height y: -height
x: parent.width - width x: parent.width - width
@ -78,17 +74,16 @@ Item
contentItem: ColumnLayout contentItem: ColumnLayout
{ {
spacing: 0
Repeater Repeater
{ {
model: devicesModel model: devicesModel
delegate: Cura.ActionButton delegate: Cura.PrimaryButton
{ {
text: model.description text: model.description
visible: model.id != UM.OutputDeviceManager.activeDevice // Don't show the active device in the list visible: model.id != UM.OutputDeviceManager.activeDevice // Don't show the active device in the list
color: "transparent"
cornerRadius: 0
hoverColor: UM.Theme.getColor("primary")
Layout.fillWidth: true Layout.fillWidth: true
// The total width of the popup should be defined by the largest button. By stating that each // The total width of the popup should be defined by the largest button. By stating that each
// button should be minimally the size of it's content (aka; implicitWidth) we can ensure that. // button should be minimally the size of it's content (aka; implicitWidth) we can ensure that.
@ -102,13 +97,6 @@ Item
} }
} }
} }
background: Rectangle
{
opacity: visible ? 1 : 0
Behavior on opacity { NumberAnimation { duration: 100 } }
color: UM.Theme.getColor("action_panel_secondary")
}
} }
} }

View File

@ -429,6 +429,14 @@ UM.MainWindow
height: UM.Theme.getSize("message_action_button").height height: UM.Theme.getSize("message_action_button").height
} }
} }
link: Component
{
Cura.TertiaryButton
{
text: model.name
height: UM.Theme.getSize("message_action_button").height
}
}
} }
} }

View File

@ -47,7 +47,7 @@ Item
id: extruderNumberText id: extruderNumberText
anchors.centerIn: parent anchors.centerIn: parent
text: index + 1 text: index + 1
font: UM.Theme.getFont("small_black") font: UM.Theme.getFont("small_emphasis")
color: UM.Theme.getColor("text") color: UM.Theme.getColor("text")
width: contentWidth width: contentWidth
height: contentHeight height: contentHeight

View File

@ -59,10 +59,10 @@ Cura.ExpandablePopup
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
} }
Item ColumnLayout
{ {
height: childrenRect.height
opacity: model.enabled ? 1 : UM.Theme.getColor("extruder_disabled").a opacity: model.enabled ? 1 : UM.Theme.getColor("extruder_disabled").a
spacing: 0
anchors anchors
{ {
left: extruderIcon.right left: extruderIcon.right
@ -81,13 +81,8 @@ Cura.ExpandablePopup
font: UM.Theme.getFont("default") font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text") color: UM.Theme.getColor("text")
renderType: Text.NativeRendering renderType: Text.NativeRendering
width: parent.width
anchors
{
top: parent.top
left: parent.left
right: parent.right
}
visible: !truncated visible: !truncated
} }
@ -100,13 +95,7 @@ Cura.ExpandablePopup
font: UM.Theme.getFont("default") font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text") color: UM.Theme.getColor("text")
renderType: Text.NativeRendering renderType: Text.NativeRendering
width: parent.width
anchors
{
top: parent.top
left: parent.left
right: parent.right
}
visible: !materialBrandColorTypeLabel.visible && !truncated visible: !materialBrandColorTypeLabel.visible && !truncated
} }
@ -120,13 +109,7 @@ Cura.ExpandablePopup
font: UM.Theme.getFont("default") font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text") color: UM.Theme.getColor("text")
renderType: Text.NativeRendering renderType: Text.NativeRendering
width: parent.width
anchors
{
top: parent.top
left: parent.left
right: parent.right
}
visible: !materialBrandColorTypeLabel.visible && !materialColorTypeLabel.visible visible: !materialBrandColorTypeLabel.visible && !materialColorTypeLabel.visible
} }
// Label that shows the name of the variant // Label that shows the name of the variant
@ -141,13 +124,7 @@ Cura.ExpandablePopup
font: UM.Theme.getFont("default_bold") font: UM.Theme.getFont("default_bold")
color: UM.Theme.getColor("text") color: UM.Theme.getColor("text")
renderType: Text.NativeRendering renderType: Text.NativeRendering
width: parent.width
anchors
{
left: parent.left
top: materialBrandColorTypeLabel.bottom
right: parent.right
}
} }
} }
} }

View File

@ -302,15 +302,15 @@ Item
} }
Item Item
{ {
width: instructionButton.width + 2 * UM.Theme.getSize("default_margin").width width: instructionButton.width + 2 * UM.Theme.getSize("narrow_margin").width
height: instructionButton.visible ? materialSelection.height: 0 height: instructionButton.visible ? materialSelection.height: 0
Button Button
{ {
id: instructionButton id: instructionButton
hoverEnabled: true hoverEnabled: true
contentItem: Item {} contentItem: Item {}
height: 0.5 * materialSelection.height height: UM.Theme.getSize("small_button").height
width: height width: UM.Theme.getSize("small_button").width
anchors.centerIn: parent anchors.centerIn: parent
background: UM.RecolorImage background: UM.RecolorImage
{ {

View File

@ -1,4 +1,4 @@
// Copyright (c) 2018 Ultimaker B.V. // Copyright (c) 2021 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher. // Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.2 import QtQuick 2.2
@ -9,8 +9,6 @@ import Cura 1.1 as Cura
Cura.ActionButton Cura.ActionButton
{ {
shadowEnabled: true
shadowColor: enabled ? UM.Theme.getColor("primary_button_shadow"): UM.Theme.getColor("action_button_disabled_shadow")
color: UM.Theme.getColor("primary_button") color: UM.Theme.getColor("primary_button")
textColor: UM.Theme.getColor("primary_button_text") textColor: UM.Theme.getColor("primary_button_text")
outlineColor: "transparent" outlineColor: "transparent"

View File

@ -226,12 +226,12 @@ Item
{ {
Cura.ExtruderIcon Cura.ExtruderIcon
{ {
anchors.horizontalCenter: parent.horizontalCenter anchors.centerIn: parent
materialColor: model.color materialColor: model.color
extruderEnabled: model.enabled extruderEnabled: model.enabled
iconVariant: "default" iconVariant: "default"
width: UM.Theme.getSize("medium_button_icon").width height: parent.height
height: UM.Theme.getSize("medium_button_icon").height width: height
} }
} }
onClicked: onClicked:

View File

@ -43,7 +43,7 @@ Item
{ {
return UM.Theme.getIcon("Infill2") return UM.Theme.getIcon("Infill2")
} }
return UM.Theme.getIcon("Solid") return UM.Theme.getIcon("Infill100")
} }
} }

View File

@ -1,4 +1,4 @@
// Copyright (c) 2018 Ultimaker B.V. // Copyright (c) 2021 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher. // Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.2 import QtQuick 2.2
@ -9,11 +9,9 @@ import Cura 1.1 as Cura
Cura.ActionButton Cura.ActionButton
{ {
shadowEnabled: true
shadowColor: enabled ? UM.Theme.getColor("secondary_button_shadow"): UM.Theme.getColor("action_button_disabled_shadow")
color: UM.Theme.getColor("secondary_button") color: UM.Theme.getColor("secondary_button")
textColor: UM.Theme.getColor("secondary_button_text") textColor: UM.Theme.getColor("secondary_button_text")
outlineColor: "transparent" outlineColor: UM.Theme.getColor("secondary_button_text")
disabledColor: UM.Theme.getColor("action_button_disabled") disabledColor: UM.Theme.getColor("action_button_disabled")
textDisabledColor: UM.Theme.getColor("action_button_disabled_text") textDisabledColor: UM.Theme.getColor("action_button_disabled_text")
hoverColor: UM.Theme.getColor("secondary_button_hover") hoverColor: UM.Theme.getColor("secondary_button_hover")

View File

@ -1,4 +1,4 @@
// Copyright (c) 2020 Ultimaker B.V. // Copyright (c) 2021 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher. // Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.2 import QtQuick 2.2
@ -9,8 +9,6 @@ import Cura 1.1 as Cura
Cura.ActionButton Cura.ActionButton
{ {
shadowEnabled: true
shadowColor: enabled ? UM.Theme.getColor("secondary_button_shadow"): UM.Theme.getColor("action_button_disabled_shadow")
color: "transparent" color: "transparent"
textColor: UM.Theme.getColor("text_link") textColor: UM.Theme.getColor("text_link")
outlineColor: "transparent" outlineColor: "transparent"

View File

@ -16,13 +16,20 @@
"primary_text": [255, 255, 255, 204], "primary_text": [255, 255, 255, 204],
"secondary": [95, 95, 95, 255], "secondary": [95, 95, 95, 255],
"icon": [204, 204, 204, 255], "secondary_button": [0, 0, 0, 0],
"secondary_button_hover": [85, 85, 87, 255],
"secondary_button_text": [255, 255, 255, 255],
"icon": [255, 255, 255, 255],
"toolbar_background": [39, 44, 48, 255], "toolbar_background": [39, 44, 48, 255],
"toolbar_button_active": [95, 95, 95, 255], "toolbar_button_active": [57, 57, 58, 255],
"toolbar_button_hover": [95, 95, 95, 255], "toolbar_button_hover": [57, 57, 58, 255],
"toolbar_button_active_hover": [95, 95, 95, 255], "toolbar_button_active_hover": [57, 57, 58, 255],
"main_window_header_button_text_inactive": [128, 128, 128, 255], "main_window_header_button_text_inactive": [128, 128, 128, 255],
"main_window_header_background": [14, 14, 14, 255],
"main_window_header_background_gradient": [32, 32, 32, 255],
"main_window_header_button_background_hovered": [46, 46, 46, 255],
"account_sync_state_icon": [255, 255, 255, 204], "account_sync_state_icon": [255, 255, 255, 204],
@ -32,7 +39,7 @@
"text": [255, 255, 255, 204], "text": [255, 255, 255, 204],
"text_detail": [255, 255, 255, 172], "text_detail": [255, 255, 255, 172],
"text_link": [255, 255, 255, 127], "text_link": [25, 110, 240, 255],
"text_inactive": [255, 255, 255, 88], "text_inactive": [255, 255, 255, 88],
"text_hover": [255, 255, 255, 204], "text_hover": [255, 255, 255, 204],
"text_pressed": [255, 255, 255, 204], "text_pressed": [255, 255, 255, 204],
@ -87,8 +94,8 @@
"action_button_active": [39, 44, 48, 30], "action_button_active": [39, 44, 48, 30],
"action_button_active_text": [255, 255, 255, 255], "action_button_active_text": [255, 255, 255, 255],
"action_button_active_border": [255, 255, 255, 100], "action_button_active_border": [255, 255, 255, 100],
"action_button_disabled": [19, 24, 28, 255], "action_button_disabled": [85, 85, 87, 255],
"action_button_disabled_text": [200, 200, 200, 80], "action_button_disabled_text": [103, 103, 104, 255],
"action_button_disabled_border": [255, 255, 255, 30], "action_button_disabled_border": [255, 255, 255, 30],
"scrollbar_background": [39, 44, 48, 0], "scrollbar_background": [39, 44, 48, 0],

View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<rect x="3" y="3" width="18" height="18" rx="3" />
</svg>

After

Width:  |  Height:  |  Size: 118 B

View File

@ -1,10 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-282 405.9 30 30"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path d="M-280.4 407.1l-.4.4v1.8l2.2-2.2zm2.2 0l-2.6 2.6v1.8l4.4-4.4zm2.2 0l-4.8 4.8v1.8l6.6-6.6zm2.2 0l-7 6.9v1.8l8.8-8.7zm2.1 0l-9.1 9.1v1.8l10.9-10.9zm2.2 0l-11.3 11.3v1.8l13.1-13.1zm2.2 0l-13.5 13.5v1.8l15.3-15.3zm2.2 0l-15.7 15.7v1.8l17.5-17.5zm2.2 0l-17.9 17.9v1.8l19.7-19.7zm2.2 0l-20.1 20.1v1.8l21.9-21.9zm2.2 0l-22.3 22.3v1.8l24.1-24.1zm2.2 0l-24.5 24.5v1.8l26.3-26.3zM-282 435zm28.8-27.9h-.9l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-.3.3.9.9 1.2-1.2zm2.2 0l-.3.3.9.9 1.2-1.2zm2.1 0l-.3.3.9.9 1.2-1.2zm2.2 0l-.3.3.9.9 1.2-1.2zm2.2 0l-.3.3.9.9 1.2-1.2zm2.2 0l-.3.3.9.9 1.2-1.2zm2.2 0l-.3.3.9.9 1.2-1.2zm2.2 0l-.3.3.9.9 1.2-1.2zm2.2 0l-.3.3.9.9 1.2-1.2zm2.2 0l-.3.3.9.9 1.2-1.2zm2.2 0l-.3.3.9.9 1.2-1.2zm2.2 0l-.3.3.9.9 1.2-1.2zm-26.6 1.2h.9l-.9-.9zm0-1.2v.3l.3-.3zm.9 1.2h.3v-.3z" />
<path d="M-280.8 434.7h-.9l-.3.3.9.9.3-.3zm27.6 0h1.2v1.2h-1.2z" />
</svg>

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 111 B

View File

@ -148,22 +148,22 @@
"weight": 50, "weight": 50,
"family": "Noto Sans" "family": "Noto Sans"
}, },
"small_black": { "small_emphasis": {
"size": 0.9, "size": 0.9,
"weight": 100, "weight": 100,
"family": "Noto Sans" "family": "Noto Sans"
}, },
"small_black_ja_JP": { "small_emphasis_ja_JP": {
"size": 0.9, "size": 0.9,
"weight": 100, "weight": 100,
"family": "Noto Sans" "family": "Noto Sans"
}, },
"small_black_zh_CN": { "small_emphasis_zh_CN": {
"size": 0.9, "size": 0.9,
"weight": 100, "weight": 100,
"family": "Noto Sans" "family": "Noto Sans"
}, },
"small_black_zh_TW": { "small_emphasis_zh_TW": {
"size": 0.9, "size": 0.9,
"weight": 100, "weight": 100,
"family": "Noto Sans" "family": "Noto Sans"
@ -188,15 +188,15 @@
"icon": [8, 7, 63, 255], "icon": [8, 7, 63, 255],
"primary_button": [38, 113, 231, 255], "primary_button": [25, 110, 240, 255],
"primary_button_shadow": [27, 95, 202, 255], "primary_button_shadow": [27, 95, 202, 255],
"primary_button_hover": [81, 145, 247, 255], "primary_button_hover": [16, 70, 156, 255],
"primary_button_text": [255, 255, 255, 255], "primary_button_text": [255, 255, 255, 255],
"secondary_button": [240, 240, 240, 255], "secondary_button": [255, 255, 255, 0],
"secondary_button_shadow": [216, 216, 216, 255], "secondary_button_shadow": [216, 216, 216, 255],
"secondary_button_hover": [228, 228, 228, 255], "secondary_button_hover": [232, 240, 253, 255],
"secondary_button_text": [30, 102, 215, 255], "secondary_button_text": [25, 110, 240, 255],
"main_window_header_background": [8, 7, 63, 255], "main_window_header_background": [8, 7, 63, 255],
"main_window_header_background_gradient": [25, 23, 91, 255], "main_window_header_background_gradient": [25, 23, 91, 255],
@ -216,7 +216,7 @@
"machine_selector_text_active": [255, 255, 255, 255], "machine_selector_text_active": [255, 255, 255, 255],
"machine_selector_printer_icon": [8, 7, 63, 255], "machine_selector_printer_icon": [8, 7, 63, 255],
"action_panel_secondary": [27, 95, 202, 255], "action_panel_secondary": [25, 110, 240, 255],
"first_run_shadow": [50, 50, 50, 255], "first_run_shadow": [50, 50, 50, 255],
@ -230,7 +230,7 @@
"text": [25, 25, 25, 255], "text": [25, 25, 25, 255],
"text_detail": [174, 174, 174, 128], "text_detail": [174, 174, 174, 128],
"text_link": [50, 130, 255, 255], "text_link": [25, 110, 240, 255],
"text_inactive": [174, 174, 174, 255], "text_inactive": [174, 174, 174, 255],
"text_pressed": [50, 130, 255, 255], "text_pressed": [50, 130, 255, 255],
"text_subtext": [0, 0, 0, 255], "text_subtext": [0, 0, 0, 255],
@ -287,8 +287,8 @@
"action_button_active_text": [0, 0, 0, 255], "action_button_active_text": [0, 0, 0, 255],
"action_button_active_border": [50, 130, 255, 255], "action_button_active_border": [50, 130, 255, 255],
"action_button_disabled": [245, 245, 245, 255], "action_button_disabled": [245, 245, 245, 255],
"action_button_disabled_text": [127, 127, 127, 255], "action_button_disabled_text": [196, 196, 196, 255],
"action_button_disabled_border": [245, 245, 245, 255], "action_button_disabled_border": [196, 196, 196, 255],
"action_button_shadow": [223, 223, 223, 255], "action_button_shadow": [223, 223, 223, 255],
"action_button_disabled_shadow": [228, 228, 228, 255], "action_button_disabled_shadow": [228, 228, 228, 255],
@ -350,7 +350,7 @@
"checkbox_hover": [255, 255, 255, 255], "checkbox_hover": [255, 255, 255, 255],
"checkbox_border": [199, 199, 199, 255], "checkbox_border": [199, 199, 199, 255],
"checkbox_border_hover": [50, 130, 255, 255], "checkbox_border_hover": [50, 130, 255, 255],
"checkbox_mark": [50, 130, 255, 255], "checkbox_mark": [35, 35, 35, 255],
"checkbox_disabled": [223, 223, 223, 255], "checkbox_disabled": [223, 223, 223, 255],
"checkbox_text": [35, 35, 35, 255], "checkbox_text": [35, 35, 35, 255],
@ -437,7 +437,7 @@
"monitor_icon_accent": [255, 255, 255, 255], "monitor_icon_accent": [255, 255, 255, 255],
"monitor_icon_disabled": [238, 238, 238, 255], "monitor_icon_disabled": [238, 238, 238, 255],
"monitor_secondary_button_hover": [228, 228, 228, 255], "monitor_secondary_button_hover": [232, 242, 252, 255],
"monitor_secondary_button": [240, 240, 240, 255], "monitor_secondary_button": [240, 240, 240, 255],
"monitor_secondary_button_text": [30, 102, 215, 255], "monitor_secondary_button_text": [30, 102, 215, 255],
"monitor_secondary_button_shadow": [216, 216, 216, 255], "monitor_secondary_button_shadow": [216, 216, 216, 255],
@ -614,7 +614,7 @@
"message": [30.0, 5.0], "message": [30.0, 5.0],
"message_close": [1, 1], "message_close": [1, 1],
"message_radius": [0.25, 0.25], "message_radius": [0.25, 0.25],
"message_action_button": [0, 2.0], "message_action_button": [0, 2.5],
"message_image": [15.0, 5.0], "message_image": [15.0, 5.0],
"infill_button_margin": [0.5, 0.5], "infill_button_margin": [0.5, 0.5],