Merge branch 'master' into CURA-8055_export_all_materials_usb_redone

This commit is contained in:
Ghostkeeper 2021-07-23 15:11:07 +02:00
commit 82c7f19164
No known key found for this signature in database
GPG key ID: D2A8871EE34EC59A
487 changed files with 4988 additions and 2890 deletions

View file

@ -54,9 +54,10 @@ Item
id: accountWidget
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: signInButton.horizontalCenter
implicitHeight: UM.Theme.getSize("main_window_header").height
implicitWidth: UM.Theme.getSize("main_window_header").height
implicitHeight: Math.round(0.5 * UM.Theme.getSize("main_window_header").height)
implicitWidth: Math.round(0.5 * UM.Theme.getSize("main_window_header").height)
hoverEnabled: true
@ -68,8 +69,8 @@ Item
{
id: avatar
width: Math.round(0.8 * accountWidget.width)
height: Math.round(0.8 * accountWidget.height)
width: accountWidget.width
height: accountWidget.height
anchors.verticalCenter: accountWidget.verticalCenter
anchors.horizontalCenter: accountWidget.horizontalCenter
@ -86,7 +87,7 @@ Item
{
id: initialCircle
anchors.centerIn: parent
width: Math.min(parent.width, parent.height)
width: Math.min(accountWidget.width, accountWidget.height)
height: width
radius: width
color: accountWidget.hovered ? UM.Theme.getColor("primary_text") : "transparent"
@ -141,7 +142,7 @@ Item
borderColor: UM.Theme.getColor("lining")
borderWidth: UM.Theme.getSize("default_lining").width
target: Qt.point(width - (accountWidget.width / 2), -10)
target: Qt.point(width - (signInButton.width / 2), -10)
arrowSize: UM.Theme.getSize("default_arrow").width
}

View file

@ -52,7 +52,7 @@ Item
width: parent.width + 2
height: parent.height + 2
visible: hasAvatar
source: UM.Theme.getIcon("circle_outline")
source: UM.Theme.getIcon("CircleOutline")
sourceSize: Qt.size(parent.width, parent.height)
color: UM.Theme.getColor("account_widget_outline_active")
}

View file

@ -18,27 +18,27 @@ Row // Sync state icon + message
{
name: "idle"
when: syncState == Cura.AccountSyncState.IDLE
PropertyChanges { target: icon; source: UM.Theme.getIcon("update")}
PropertyChanges { target: icon; source: UM.Theme.getIcon("ArrowDoubleCircleRight")}
},
State
{
name: "syncing"
when: syncState == Cura.AccountSyncState.SYNCING
PropertyChanges { target: icon; source: UM.Theme.getIcon("update") }
PropertyChanges { target: icon; source: UM.Theme.getIcon("ArrowDoubleCircleRight") }
PropertyChanges { target: stateLabel; text: catalog.i18nc("@label", "Checking...")}
},
State
{
name: "up_to_date"
when: syncState == Cura.AccountSyncState.SUCCESS
PropertyChanges { target: icon; source: UM.Theme.getIcon("checked") }
PropertyChanges { target: icon; source: UM.Theme.getIcon("CheckCircle") }
PropertyChanges { target: stateLabel; text: catalog.i18nc("@label", "Account synced")}
},
State
{
name: "error"
when: syncState == Cura.AccountSyncState.ERROR
PropertyChanges { target: icon; source: UM.Theme.getIcon("warning_light") }
PropertyChanges { target: icon; source: UM.Theme.getIcon("Warning") }
PropertyChanges { target: stateLabel; text: catalog.i18nc("@label", "Something went wrong...")}
}
]

View file

@ -9,7 +9,7 @@ import Cura 1.1 as Cura
Column
{
spacing: UM.Theme.getSize("narrow_margin").height
spacing: UM.Theme.getSize("default_margin").height
topPadding: UM.Theme.getSize("default_margin").height
bottomPadding: UM.Theme.getSize("default_margin").height
width: childrenRect.width
@ -18,7 +18,7 @@ Column
{
id: accountInfo
width: childrenRect.width
height: childrenRect.height
height: accountSyncDetailsColumn.height
anchors.left: parent.left
anchors.leftMargin: UM.Theme.getSize("default_margin").width
AvatarImage
@ -56,6 +56,7 @@ Column
Column
{
id: accountSyncDetailsColumn
anchors.left: avatar.right
anchors.leftMargin: UM.Theme.getSize("default_margin").width
spacing: UM.Theme.getSize("narrow_margin").height

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.
import QtQuick 2.7
@ -18,19 +18,17 @@ Button
property alias textFont: buttonText.font
property alias cornerRadius: backgroundRect.radius
property alias tooltip: tooltip.tooltipText
property alias cornerSide: backgroundRect.cornerSide
property alias tooltipWidth: tooltip.width
property color color: UM.Theme.getColor("primary")
property color hoverColor: UM.Theme.getColor("primary_hover")
property color disabledColor: color
property color textColor: UM.Theme.getColor("button_text")
property color textHoverColor: textColor
property color textDisabledColor: textColor
property color textDisabledColor: disabledColor
property color outlineColor: color
property color outlineHoverColor: hoverColor
property color outlineDisabledColor: outlineColor
property alias shadowColor: shadow.color
property alias shadowEnabled: shadow.visible
property color outlineHoverColor: outlineColor
property color outlineDisabledColor: disabledColor
property alias busy: busyIndicator.visible
property bool underlineTextOnHover: false
@ -46,6 +44,49 @@ Button
// but it can exceed a maximum, then this value have to be set.
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
rightPadding: UM.Theme.getSize("default_margin").width
height: UM.Theme.getSize("action_button").height
@ -130,24 +171,13 @@ Button
background: Cura.RoundedRectangle
{
id: backgroundRect
cornerSide: Cura.RoundedRectangle.Direction.All
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.color: button.enabled ? (button.hovered ? button.outlineHoverColor : button.outlineColor) : button.outlineDisabledColor
}
DropShadow
{
id: shadow
// Don't blur the shadow
// 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.
radius: 0
anchors.fill: backgroundRect
source: backgroundRect
verticalOffset: 2
visible: false
// Should always be drawn behind the background.
z: backgroundRect.z - 1
cornerSide: Cura.RoundedRectangle.Direction.None
}
Cura.ToolTip
@ -189,4 +219,4 @@ Button
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.
import QtQuick 2.7
@ -23,7 +23,6 @@ Item
id: saveToButton
height: parent.height
fixedWidthMode: true
cornerSide: deviceSelectionMenu.visible ? Cura.RoundedRectangle.Direction.Left : Cura.RoundedRectangle.Direction.All
anchors
{
@ -43,15 +42,11 @@ Item
}
}
Cura.ActionButton
Cura.PrimaryButton
{
id: deviceSelectionMenu
height: parent.height
shadowEnabled: true
shadowColor: UM.Theme.getColor("primary_shadow")
cornerSide: Cura.RoundedRectangle.Direction.Right
anchors
{
top: parent.top
@ -60,8 +55,8 @@ Item
leftPadding: UM.Theme.getSize("narrow_margin").width //Need more space than usual here for wide text.
rightPadding: UM.Theme.getSize("narrow_margin").width
iconSource: popup.opened ? UM.Theme.getIcon("arrow_top") : UM.Theme.getIcon("arrow_bottom")
color: UM.Theme.getColor("action_panel_secondary")
iconSource: popup.opened ? UM.Theme.getIcon("ChevronSingleUp") : UM.Theme.getIcon("ChevronSingleDown")
color: popup.opened ? hoverColor : UM.Theme.getColor("action_panel_secondary")
visible: (devicesModel.deviceCount > 1)
onClicked: popup.opened ? popup.close() : popup.open()
@ -70,6 +65,7 @@ Item
{
id: popup
padding: 0
spacing: 0
y: -height
x: parent.width - width
@ -78,17 +74,16 @@ Item
contentItem: ColumnLayout
{
spacing: 0
Repeater
{
model: devicesModel
delegate: Cura.ActionButton
delegate: Cura.PrimaryButton
{
text: model.description
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
// 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.
@ -102,15 +97,8 @@ Item
}
}
}
background: Rectangle
{
opacity: visible ? 1 : 0
Behavior on opacity { NumberAnimation { duration: 100 } }
color: UM.Theme.getColor("action_panel_secondary")
}
}
}
UM.OutputDevicesModel { id: devicesModel }
}
}

View file

@ -57,7 +57,7 @@ Column
width: parent.width
text: preSlicedData ? catalog.i18nc("@label", "No time estimation available") : PrintInformation.currentPrintTime.getDisplayString(UM.DurationFormat.Long)
source: UM.Theme.getIcon("clock")
source: UM.Theme.getIcon("Clock")
font: UM.Theme.getFont("medium_bold")
}
@ -99,7 +99,7 @@ Column
}
return totalWeights + "g · " + totalLengths.toFixed(2) + "m"
}
source: UM.Theme.getIcon("spool")
source: UM.Theme.getIcon("Spool")
font: UM.Theme.getFont("default")
}
}
@ -142,4 +142,4 @@ Column
height: UM.Theme.getSize("action_button").height
}
}
}
}

View file

@ -11,7 +11,7 @@ UM.RecolorImage
{
id: widget
source: UM.Theme.getIcon("info")
source: UM.Theme.getIcon("Information")
width: visible ? UM.Theme.getSize("section_icon").width : 0
height: UM.Theme.getSize("section_icon").height
@ -58,4 +58,4 @@ UM.RecolorImage
arrowSize: UM.Theme.getSize("default_arrow").width
}
}
}
}

View file

@ -65,7 +65,7 @@ Column
visible: widget.backendState == UM.Backend.Error
text: catalog.i18nc("@label:PrintjobStatus", "Unable to slice")
source: UM.Theme.getIcon("warning")
source: UM.Theme.getIcon("Warning")
iconColor: UM.Theme.getColor("warning")
}

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.
pragma Singleton
@ -122,7 +122,15 @@ Item
Action
{
id: quitAction
text: catalog.i18nc("@action:inmenu menubar:file","&Quit")
//On MacOS, don't translate the "Quit" word.
//Qt moves the "quit" entry to a different place, and if it got renamed can't find it again when it attempts to
//delete the item upon closing the application, causing a crash.
//In the new location, these items are translated automatically according to the system's language.
//For more information, see:
//- https://doc.qt.io/qt-5/macos-issues.html#menu-bar
//- https://doc.qt.io/qt-5/qmenubar.html#qmenubar-as-a-global-menu-bar
text: (Qt.platform.os == "osx") ? "&Quit" : catalog.i18nc("@action:inmenu menubar:file", "&Quit")
iconName: "application-exit"
shortcut: StandardKey.Quit
}
@ -172,7 +180,14 @@ Item
Action
{
id: preferencesAction
text: catalog.i18nc("@action:inmenu", "Configure Cura...")
//On MacOS, don't translate the "Configure" word.
//Qt moves the "configure" entry to a different place, and if it got renamed can't find it again when it
//attempts to delete the item upon closing the application, causing a crash.
//In the new location, these items are translated automatically according to the system's language.
//For more information, see:
//- https://doc.qt.io/qt-5/macos-issues.html#menu-bar
//- https://doc.qt.io/qt-5/qmenubar.html#qmenubar-as-a-global-menu-bar
text: (Qt.platform.os == "osx") ? "Configure Cura..." : catalog.i18nc("@action:inmenu", "Configure Cura...")
iconName: "configure"
}
@ -263,7 +278,15 @@ Item
Action
{
id: aboutAction;
text: catalog.i18nc("@action:inmenu menubar:help", "About...");
//On MacOS, don't translate the "About" word.
//Qt moves the "about" entry to a different place, and if it got renamed can't find it again when it
//attempts to delete the item upon closing the application, causing a crash.
//In the new location, these items are translated automatically according to the system's language.
//For more information, see:
//- https://doc.qt.io/qt-5/macos-issues.html#menu-bar
//- https://doc.qt.io/qt-5/qmenubar.html#qmenubar-as-a-global-menu-bar
text: (Qt.platform.os == "osx") ? "About..." : catalog.i18nc("@action:inmenu menubar:help", "About...");
iconName: "help-about";
}

View file

@ -32,7 +32,7 @@ CheckBox
height: Math.round(parent.height / 2.5)
sourceSize.height: width
color: UM.Theme.getColor("checkbox_mark")
source: UM.Theme.getIcon("check")
source: UM.Theme.getIcon("Check")
opacity: checkbox.checked
Behavior on opacity { NumberAnimation { duration: 100; } }
}

View file

@ -417,6 +417,7 @@ UM.MainWindow
Cura.PrimaryButton
{
text: model.name
iconSource: UM.Theme.getIcon(model.icon)
height: UM.Theme.getSize("message_action_button").height
}
}
@ -426,6 +427,23 @@ UM.MainWindow
Cura.SecondaryButton
{
text: model.name
iconSource: UM.Theme.getIcon(model.icon)
height: UM.Theme.getSize("message_action_button").height
}
}
link: Component
{
Cura.TertiaryButton
{
text: model.name
iconSource:
{
if (model.icon == null || model.icon == "")
{
return UM.Theme.getIcon("LinkExternal")
}
return UM.Theme.getIcon(model.icon)
}
height: UM.Theme.getSize("message_action_button").height
}
}

View file

@ -7,8 +7,6 @@ import QtQuick.Controls 2.3
import UM 1.2 as UM
import Cura 1.0 as Cura
import QtGraphicalEffects 1.0 // For the dropshadow
// The expandable component has 2 major sub components:
// * The headerItem; Always visible and should hold some info about what happens if the component is expanded
// * The contentItem; The content that needs to be shown if the component is expanded.
@ -56,6 +54,11 @@ Item
// How much padding is needed around the header & button
property alias headerPadding: background.padding
property alias headerBackgroundBorder: background.border
// Whether or not to show the background border
property bool enableHeaderBackgroundBorder: true
// What icon should be displayed on the right.
property alias iconSource: collapseButton.source
@ -73,11 +76,7 @@ Item
// On what side should the header corners be shown? 1 is down, 2 is left, 3 is up and 4 is right.
property alias headerCornerSide: background.cornerSide
property alias headerShadowColor: shadow.color
property alias enableHeaderShadow: shadow.visible
property int shadowOffset: 2
property int popupOffset: 2
// Prefix used for the dragged position preferences. Preferences not used if empty. Don't translate!
property string dragPreferencesNamePrefix: ""
@ -120,6 +119,9 @@ Item
id: background
property real padding: UM.Theme.getSize("default_margin").width
border.width: base.enableHeaderBackgroundBorder ? UM.Theme.getSize("default_lining").width : 0
border.color: UM.Theme.getColor("lining")
color: base.enabled ? (base.expanded ? headerActiveColor : headerBackgroundColor) : UM.Theme.getColor("disabled")
anchors.fill: parent
@ -165,7 +167,7 @@ Item
verticalCenter: parent.verticalCenter
margins: background.padding
}
source: UM.Theme.getIcon("pencil")
source: UM.Theme.getIcon("ChevronSingleDown")
visible: source != ""
width: UM.Theme.getSize("standard_arrow").width
height: UM.Theme.getSize("standard_arrow").height
@ -184,20 +186,6 @@ Item
}
}
DropShadow
{
id: shadow
// Don't blur the shadow
radius: 0
anchors.fill: background
source: background
verticalOffset: base.shadowOffset
visible: true
color: UM.Theme.getColor("action_button_shadow")
// Should always be drawn behind the background.
z: background.z - 1
}
Cura.RoundedRectangle
{
id: contentContainer
@ -209,7 +197,7 @@ Item
height: childrenRect.height
// Ensure that the content is located directly below the headerItem
y: dragPreferencesNamePrefix === "" ? (background.height + base.shadowOffset + base.contentSpacingY) : UM.Preferences.getValue(dragPreferencesNamePrefix + dragPreferencesNameY)
y: dragPreferencesNamePrefix === "" ? (background.height + base.popupOffset + base.contentSpacingY) : UM.Preferences.getValue(dragPreferencesNamePrefix + dragPreferencesNameY)
// Make the content aligned with the rest, using the property contentAlignment to decide whether is right or left.
// In case of right alignment, the 3x padding is due to left, right and padding between the button & text.
@ -228,7 +216,7 @@ Item
var maxPt = base.mapFromItem(null,
CuraApplication.appWidth() - (contentContainer.width + margin.width),
CuraApplication.appHeight() - (contentContainer.height + margin.height));
var initialY = background.height + base.shadowOffset + margin.height;
var initialY = background.height + base.popupOffset + margin.height;
contentContainer.x = Math.max(minPt.x, Math.min(maxPt.x, posNewX));
contentContainer.y = Math.max(initialY, Math.min(maxPt.y, posNewY));

View file

@ -59,11 +59,11 @@ Cura.RoundedRectangle
anchors.fill: parent
sourceSize.width: width
color: closeButton.hovered ? UM.Theme.getColor("small_button_text_hover") : UM.Theme.getColor("small_button_text")
source: UM.Theme.getIcon("cross1")
source: UM.Theme.getIcon("Cancel")
}
background: Item {}
onClicked: toggleContent() // Will hide the popup item
}
}
}

View file

@ -7,8 +7,6 @@ import QtQuick.Controls 2.3
import UM 1.2 as UM
import Cura 1.0 as Cura
import QtGraphicalEffects 1.0 // For the dropshadow
// The expandable component has 2 major sub components:
// * The headerItem; Always visible and should hold some info about what happens if the component is expanded
// * The contentItem; The content that needs to be shown if the component is expanded.
@ -50,6 +48,11 @@ Item
// How much padding is needed around the header & button
property alias headerPadding: background.padding
property alias headerBackgroundBorder: background.border
// Whether or not to show the background border
property bool enableHeaderBackgroundBorder: true
// What icon should be displayed on the right.
property alias iconSource: collapseButton.source
@ -72,11 +75,7 @@ Item
// Change the contentItem close behaviour
property alias contentClosePolicy : content.closePolicy
property alias headerShadowColor: shadow.color
property alias enableHeaderShadow: shadow.visible
property int shadowOffset: 2
property int popupOffset: 2
onEnabledChanged:
{
@ -114,6 +113,9 @@ Item
id: background
property real padding: UM.Theme.getSize("default_margin").width
border.width: base.enableHeaderBackgroundBorder ? UM.Theme.getSize("default_lining").width : 0
border.color: UM.Theme.getColor("lining")
color: base.enabled ? headerBackgroundColor : UM.Theme.getColor("disabled")
anchors.fill: parent
@ -178,7 +180,7 @@ Item
verticalCenter: parent.verticalCenter
margins: background.padding
}
source: expanded ? UM.Theme.getIcon("arrow_bottom") : UM.Theme.getIcon("arrow_left")
source: UM.Theme.getIcon("ChevronSingleDown")
visible: source != ""
width: UM.Theme.getSize("standard_arrow").width
height: UM.Theme.getSize("standard_arrow").height
@ -188,26 +190,12 @@ Item
}
DropShadow
{
id: shadow
// Don't blur the shadow
radius: 0
anchors.fill: background
source: background
verticalOffset: base.shadowOffset
visible: true
color: UM.Theme.getColor("action_button_shadow")
// Should always be drawn behind the background.
z: background.z - 1
}
Popup
{
id: content
// Ensure that the content is located directly below the headerItem
y: background.height + base.shadowOffset
y: background.height + base.popupOffset
// Make the content aligned with the rest, using the property contentAlignment to decide whether is right or left.
// In case of right alignment, the 3x padding is due to left, right and padding between the button & text.

View file

@ -22,6 +22,7 @@ Cura.ToolbarButton
{
materialColor: extruder.color
extruderEnabled: extruder.stack.isEnabled
iconVariant: "default"
property int index: extruder.index
}

View file

@ -1,7 +1,7 @@
// Copyright (c) 2018 Ultimaker B.V.
// Copyright (c) 2021 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.7
import QtQuick 2.11
import QtQuick.Controls 1.1
import UM 1.2 as UM
@ -16,31 +16,30 @@ Item
property color materialColor
property alias textColor: extruderNumberText.color
property bool extruderEnabled: true
property alias iconSize: mainIcon.sourceSize
property string iconVariant: "medium"
UM.RecolorImage
Item
{
id: mainIcon
opacity: extruderEnabled ? 1 : UM.Theme.getColor("extruder_disabled").a
anchors.fill: parent
source: UM.Theme.getIcon("extruder_button")
color: extruderEnabled ? materialColor: UM.Theme.getColor("disabled")
}
Rectangle
{
id: extruderNumberCircle
width: height
height: Math.round(parent.height / 2)
radius: Math.round(width / 2)
color: UM.Theme.getColor("toolbar_background")
anchors
UM.RecolorImage
{
horizontalCenter: parent.horizontalCenter
top: parent.top
// The circle needs to be slightly off center (so it sits in the middle of the square bit of the icon)
topMargin: (parent.height - height) / 2 - 0.1 * parent.height
anchors.fill: parent
sourceSize: mainIcon.sourceSize
source: UM.Theme.getIcon("ExtruderColor", iconVariant)
color: materialColor
}
UM.RecolorImage
{
id: mainIcon
anchors.fill: parent
sourceSize: UM.Theme.getSize("extruder_icon")
source: UM.Theme.getIcon("Extruder", iconVariant)
color: extruderNumberText.color
}
Label
@ -48,25 +47,13 @@ Item
id: extruderNumberText
anchors.centerIn: parent
text: index + 1
font: UM.Theme.getFont("small")
font: UM.Theme.getFont("small_emphasis")
color: UM.Theme.getColor("text")
width: contentWidth
height: contentHeight
visible: extruderEnabled
renderType: Text.NativeRendering
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
UM.RecolorImage
{
id: disabledIcon
anchors.fill: parent
anchors.margins: UM.Theme.getSize("thick_lining").width
sourceSize.height: width
source: UM.Theme.getIcon("cross1")
visible: !extruderEnabled
color: UM.Theme.getColor("text")
}
}
}
}

View file

@ -66,7 +66,7 @@ Item
sourceSize.width: width
sourceSize.height: width
color: control.hovered ? UM.Theme.getColor("small_button_text_hover") : UM.Theme.getColor("small_button_text")
source: UM.Theme.getIcon("pencil")
source: UM.Theme.getIcon("Pen")
}
}
}

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.
import QtQuick 2.7
@ -48,7 +48,17 @@ Item
ViewMenu { title: catalog.i18nc("@title:menu menubar:toplevel", "&View") }
SettingsMenu { title: catalog.i18nc("@title:menu menubar:toplevel", "&Settings") }
SettingsMenu
{
//On MacOS, don't translate the "Settings" word.
//Qt moves the "settings" entry to a different place, and if it got renamed can't find it again when it
//attempts to delete the item upon closing the application, causing a crash.
//In the new location, these items are translated automatically according to the system's language.
//For more information, see:
//- https://doc.qt.io/qt-5/macos-issues.html#menu-bar
//- https://doc.qt.io/qt-5/qmenubar.html#qmenubar-as-a-global-menu-bar
title: (Qt.platform.os == "osx") ? "&Settings" : catalog.i18nc("@title:menu menubar:toplevel", "&Settings")
}
Menu
{
@ -91,7 +101,15 @@ Item
Menu
{
id: preferencesMenu
title: catalog.i18nc("@title:menu menubar:toplevel", "P&references")
//On MacOS, don't translate the "Preferences" word.
//Qt moves the "preferences" entry to a different place, and if it got renamed can't find it again when it
//attempts to delete the item upon closing the application, causing a crash.
//In the new location, these items are translated automatically according to the system's language.
//For more information, see:
//- https://doc.qt.io/qt-5/macos-issues.html#menu-bar
//- https://doc.qt.io/qt-5/qmenubar.html#qmenubar-as-a-global-menu-bar
title: (Qt.platform.os == "osx") ? "&Preferences" : catalog.i18nc("@title:menu menubar:toplevel", "P&references")
MenuItem { action: Cura.Actions.preferences }
}

View file

@ -8,7 +8,6 @@ import QtQuick.Controls.Styles 1.1
import UM 1.4 as UM
import Cura 1.0 as Cura
import QtGraphicalEffects 1.0
import "../Account"
@ -63,7 +62,7 @@ Item
anchors.verticalCenter: parent.verticalCenter
exclusiveGroup: mainWindowHeaderMenuGroup
style: UM.Theme.styles.main_window_header_tab
height: UM.Theme.getSize("main_window_header_button").height
height: Math.round(0.5 * UM.Theme.getSize("main_window_header").height)
iconSource: model.stage.iconSource
property color overlayColor: "transparent"

View file

@ -93,7 +93,7 @@ Button
id: icon
anchors.verticalCenter: unknownMaterialMessage.verticalCenter
source: UM.Theme.getIcon("warning")
source: UM.Theme.getIcon("Warning")
color: UM.Theme.getColor("warning")
width: UM.Theme.getSize("section_icon").width
height: width

View file

@ -39,7 +39,7 @@ Item
anchors.left: parent.left
anchors.verticalCenter: label.verticalCenter
source: UM.Theme.getIcon("warning")
source: UM.Theme.getIcon("Warning")
color: UM.Theme.getColor("warning")
width: UM.Theme.getSize("section_icon").width
height: width

View file

@ -56,51 +56,76 @@ Cura.ExpandablePopup
id: extruderIcon
materialColor: model.color
extruderEnabled: model.enabled
height: parent.height
width: height
anchors.verticalCenter: parent.verticalCenter
}
// Label for the brand of the material
Label
ColumnLayout
{
id: typeAndBrandNameLabel
text: model.material_brand + " " + model.material
elide: Text.ElideRight
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
renderType: Text.NativeRendering
anchors
{
top: extruderIcon.top
left: extruderIcon.right
leftMargin: UM.Theme.getSize("default_margin").width
right: parent.right
rightMargin: UM.Theme.getSize("default_margin").width
}
}
// Label that shows the name of the variant
Label
{
id: variantLabel
visible: Cura.MachineManager.activeMachine ? Cura.MachineManager.activeMachine.hasVariants : false
text: model.variant
elide: Text.ElideRight
font: UM.Theme.getFont("default_bold")
color: UM.Theme.getColor("text")
renderType: Text.NativeRendering
opacity: model.enabled ? 1 : UM.Theme.getColor("extruder_disabled").a
spacing: 0
anchors
{
left: extruderIcon.right
leftMargin: UM.Theme.getSize("default_margin").width
top: typeAndBrandNameLabel.bottom
verticalCenter: parent.verticalCenter
right: parent.right
rightMargin: UM.Theme.getSize("default_margin").width
}
// Label for the brand of the material
Label
{
id: materialBrandColorTypeLabel
text: model.material_brand == model.color_name ? model.color_name + " " + model.material_type : model.material_brand + " " + model.color_name + " " + model.material_type
elide: Text.ElideRight
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
renderType: Text.NativeRendering
width: parent.width
visible: !truncated
}
Label
{
id: materialColorTypeLabel
text: model.color_name + " " + model.material_type
elide: Text.ElideRight
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
renderType: Text.NativeRendering
width: parent.width
visible: !materialBrandColorTypeLabel.visible && !truncated
}
Label
{
id: materialTypeLabel
text: model.material_type
elide: Text.ElideRight
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
renderType: Text.NativeRendering
width: parent.width
visible: !materialBrandColorTypeLabel.visible && !materialColorTypeLabel.visible
}
// Label that shows the name of the variant
Label
{
id: variantLabel
visible: Cura.MachineManager.activeMachine ? Cura.MachineManager.activeMachine.hasVariants : false
text: model.variant
elide: Text.ElideRight
font: UM.Theme.getFont("default_bold")
color: UM.Theme.getColor("text")
renderType: Text.NativeRendering
width: parent.width
}
}
}
}
@ -206,7 +231,7 @@ Cura.ExpandablePopup
anchors.right: parent.right
iconSource: UM.Theme.getIcon("arrow_right")
iconSource: UM.Theme.getIcon("ChevronSingleRight")
isIconOnRightSide: true
onClicked:
@ -222,7 +247,7 @@ Cura.ExpandablePopup
visible: popupItem.configuration_method == ConfigurationMenu.ConfigurationMethod.Custom
text: catalog.i18nc("@label", "Configurations")
iconSource: UM.Theme.getIcon("arrow_left")
iconSource: UM.Theme.getIcon("ChevronSingleLeft")
onClicked:
{

View file

@ -302,19 +302,19 @@ 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
Button
{
id: instructionButton
hoverEnabled: true
contentItem: Item {}
height: 0.5 * materialSelection.height
width: height
height: UM.Theme.getSize("small_button").height
width: UM.Theme.getSize("small_button").width
anchors.centerIn: parent
background: UM.RecolorImage
{
source: UM.Theme.getIcon("printing_guideline")
source: UM.Theme.getIcon("Guide")
color: instructionButton.hovered ? UM.Theme.getColor("primary") : UM.Theme.getColor("icon")
}
visible: selectors.instructionLink != ""
@ -388,7 +388,7 @@ Item
{
id: warningImage
anchors.left: parent.left
source: UM.Theme.getIcon("warning")
source: UM.Theme.getIcon("Warning")
width: UM.Theme.getSize("section_icon").width
height: UM.Theme.getSize("section_icon").height
sourceSize.width: width

View file

@ -13,8 +13,6 @@ Button
width: parent.width
height: UM.Theme.getSize("action_button").height
leftPadding: UM.Theme.getSize("thin_margin").width
rightPadding: perObjectSettingsInfo.visible ? UM.Theme.getSize("default_lining").width : UM.Theme.getSize("thin_margin").width
checkable: true
hoverEnabled: true
@ -46,14 +44,14 @@ Button
width: objectItemButton.width - objectItemButton.leftPadding
height: UM.Theme.getSize("action_button").height
UM.RecolorImage
Rectangle
{
id: swatch
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
width: height
height: parent.height - UM.Theme.getSize("narrow_margin").height
source: UM.Theme.getIcon("extruder_button")
width: UM.Theme.getSize("standard_arrow").height
height: UM.Theme.getSize("standard_arrow").height
radius: Math.round(width / 2)
color: extruderColor
visible: showExtruderSwatches && extruderColor != ""
}
@ -168,12 +166,12 @@ Button
{
switch (meshType) {
case "support_mesh":
return UM.Theme.getIcon("pos_print_as_support");
return UM.Theme.getIcon("MeshTypeSupport");
case "cutting_mesh":
case "infill_mesh":
return UM.Theme.getIcon("pos_modify_overlaps");
return UM.Theme.getIcon("MeshTypeIntersect");
case "anti_overhang_mesh":
return UM.Theme.getIcon("pos_modify_dont_support_overlap");
return UM.Theme.getIcon("BlockSupportOverlaps");
}
return "";
}

View file

@ -48,7 +48,7 @@ Item
sourceSize.width: width
anchors.left: parent.left
color: openCloseButton.hovered ? UM.Theme.getColor("small_button_text_hover") : UM.Theme.getColor("small_button_text")
source: objectSelector.opened ? UM.Theme.getIcon("arrow_bottom") : UM.Theme.getIcon("arrow_top")
source: objectSelector.opened ? UM.Theme.getIcon("ChevronSingleDown") : UM.Theme.getIcon("ChevronSingleUp")
}
Label

View file

@ -66,7 +66,7 @@ Item
width: UM.Theme.getSize("standard_arrow").width
height: UM.Theme.getSize("standard_arrow").height
color: "black"
source: brand_section.expanded ? UM.Theme.getIcon("arrow_bottom") : UM.Theme.getIcon("arrow_left")
source: brand_section.expanded ? UM.Theme.getIcon("ChevronSingleDown") : UM.Theme.getIcon("ChevronSingleLeft")
}
}
}
@ -144,4 +144,4 @@ Item
expanded = materialList.expandedBrands.indexOf(sectionName) > -1
}
}
}
}

View file

@ -122,7 +122,7 @@ Rectangle
}
}
}
source: materialSlot.is_favorite ? UM.Theme.getIcon("favorites_star_full") : UM.Theme.getIcon("favorites_star_empty")
source: materialSlot.is_favorite ? UM.Theme.getIcon("StarFilled") : UM.Theme.getIcon("Star")
}
}
}
}

View file

@ -78,7 +78,7 @@ Item
width: UM.Theme.getSize("standard_arrow").width
height: UM.Theme.getSize("standard_arrow").height
color: "black"
source: material_type_section.expanded ? UM.Theme.getIcon("arrow_bottom") : UM.Theme.getIcon("arrow_left")
source: material_type_section.expanded ? UM.Theme.getIcon("ChevronSingleDown") : UM.Theme.getIcon("ChevronSingleLeft")
}
}
@ -134,4 +134,4 @@ Item
expanded = materialList.expandedTypes.indexOf(materialBrand + "_" + materialName) > -1
}
}
}
}

View file

@ -95,7 +95,7 @@ UM.PreferencesPage
placeholderText: catalog.i18nc("@label:textbox", "Filter...")
onTextChanged: definitionsModel.filter = {"i18n_label": "*" + text}
onTextChanged: definitionsModel.filter = {"i18n_label|i18n_description": "*" + text}
}
NewControls.ComboBox

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.
import QtQuick 2.2
@ -9,8 +9,6 @@ import Cura 1.1 as Cura
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")
textColor: UM.Theme.getColor("primary_button_text")
outlineColor: "transparent"

View file

@ -158,7 +158,7 @@ Item
anchors.rightMargin: UM.Theme.getSize("default_margin").width
color: hovered ? UM.Theme.getColor("setting_control_button_hover") : UM.Theme.getColor("setting_control_button");
iconSource: UM.Theme.getIcon("star")
iconSource: UM.Theme.getIcon("StarFilled")
onClicked:
{
@ -176,7 +176,7 @@ Item
{
id: downArrow
source: UM.Theme.getIcon("arrow_bottom")
source: UM.Theme.getIcon("ChevronSingleDown")
width: UM.Theme.getSize("standard_arrow").width
height: UM.Theme.getSize("standard_arrow").height
@ -226,9 +226,12 @@ Item
{
Cura.ExtruderIcon
{
anchors.horizontalCenter: parent.horizontalCenter
anchors.centerIn: parent
materialColor: model.color
extruderEnabled: model.enabled
iconVariant: "default"
height: parent.height
width: height
}
}
onClicked:

View file

@ -18,7 +18,7 @@ Item
UM.RecolorImage
{
source: UM.Theme.getIcon("info")
source: UM.Theme.getIcon("Information")
color: UM.Theme.getColor("icon")
anchors.fill: parent
}
@ -33,4 +33,4 @@ Item
}
onExited: base.hideTooltip()
}
}
}

View file

@ -142,7 +142,7 @@ Item
leftPadding: UM.Theme.getSize("default_margin").width
rightPadding: UM.Theme.getSize("default_margin").width
text: catalog.i18nc("@button", "Recommended")
iconSource: UM.Theme.getIcon("arrow_left")
iconSource: UM.Theme.getIcon("ChevronSingleLeft")
visible: currentModeIndex == PrintSetupSelectorContents.Mode.Custom
onClicked: currentModeIndex = PrintSetupSelectorContents.Mode.Recommended
}
@ -156,7 +156,7 @@ Item
leftPadding: UM.Theme.getSize("default_margin").width
rightPadding: UM.Theme.getSize("default_margin").width
text: catalog.i18nc("@button", "Custom")
iconSource: UM.Theme.getIcon("arrow_right")
iconSource: UM.Theme.getIcon("ChevronSingleRight")
isIconOnRightSide: true
visible: currentModeIndex == PrintSetupSelectorContents.Mode.Recommended
onClicked:
@ -233,10 +233,10 @@ Item
height: UM.Theme.getSize("drag_icon").height
anchors.centerIn: parent
source: UM.Theme.getIcon("resize")
source: UM.Theme.getIcon("ThreeDots")
color: UM.Theme.getColor("small_button_text")
}
}
}
}
}
}

View file

@ -15,7 +15,8 @@ RowLayout
Cura.IconWithText
{
source: UM.Theme.getIcon("category_layer_height")
source: UM.Theme.getIcon("Sliders", "medium")
iconSize: UM.Theme.getSize("button_icon").width
text:
{
if (Cura.MachineManager.activeStack)
@ -50,9 +51,10 @@ RowLayout
Cura.IconWithText
{
source: UM.Theme.getIcon("category_infill")
source: UM.Theme.getIcon("Infill1")
text: Cura.MachineManager.activeStack ? parseInt(infillDensity.properties.value) + "%" : "0%"
font: UM.Theme.getFont("medium")
iconSize: UM.Theme.getSize("medium_button_icon").width
UM.SettingPropertyProvider
{
@ -65,9 +67,10 @@ RowLayout
Cura.IconWithText
{
source: UM.Theme.getIcon("category_support")
source: UM.Theme.getIcon("Support")
text: supportEnabled.properties.value == "True" ? enabledText : disabledText
font: UM.Theme.getFont("medium")
iconSize: UM.Theme.getSize("medium_button_icon").width
UM.SettingPropertyProvider
{
@ -80,9 +83,10 @@ RowLayout
Cura.IconWithText
{
source: UM.Theme.getIcon("category_adhesion")
source: UM.Theme.getIcon("Adhesion")
text: platformAdhesionType.properties.value != "skirt" && platformAdhesionType.properties.value != "none" ? enabledText : disabledText
font: UM.Theme.getFont("medium")
iconSize: UM.Theme.getSize("medium_button_icon").width
UM.SettingPropertyProvider
{
@ -92,4 +96,4 @@ RowLayout
watchedProperties: [ "value"]
}
}
}
}

View file

@ -25,10 +25,11 @@ Item
id: enableAdhesionRowTitle
anchors.top: parent.top
anchors.left: parent.left
source: UM.Theme.getIcon("category_adhesion")
source: UM.Theme.getIcon("Adhesion")
text: catalog.i18nc("@label", "Adhesion")
font: UM.Theme.getFont("medium")
width: labelColumnWidth
iconSize: UM.Theme.getSize("medium_button_icon").width
}
Item
@ -87,4 +88,4 @@ Item
watchedProperties: [ "value", "resolve", "enabled" ]
storeIndex: 0
}
}
}

View file

@ -29,21 +29,21 @@ Item
var density = parseInt(infillDensity.properties.value)
if (parseInt(infillSteps.properties.value) != 0)
{
return UM.Theme.getIcon("gradual")
return UM.Theme.getIcon("InfillGradual")
}
if (density <= 0)
{
return UM.Theme.getIcon("hollow")
return UM.Theme.getIcon("Infill0")
}
if (density < 40)
{
return UM.Theme.getIcon("sparse")
return UM.Theme.getIcon("Infill3")
}
if (density < 90)
{
return UM.Theme.getIcon("dense")
return UM.Theme.getIcon("Infill2")
}
return UM.Theme.getIcon("solid")
return UM.Theme.getIcon("Infill100")
}
}
@ -61,10 +61,11 @@ Item
id: infillRowTitle
anchors.top: parent.top
anchors.left: parent.left
source: UM.Theme.getIcon("category_infill")
source: UM.Theme.getIcon("Infill1")
text: catalog.i18nc("@label", "Infill") + " (%)"
font: UM.Theme.getFont("medium")
width: labelColumnWidth
iconSize: UM.Theme.getSize("medium_button_icon").width
}
Item
@ -119,6 +120,8 @@ Item
implicitWidth: UM.Theme.getSize("print_setup_slider_handle").width
implicitHeight: implicitWidth
radius: Math.round(implicitWidth / 2)
border.color: UM.Theme.getColor("slider_groove_fill")
border.width: UM.Theme.getSize("default_lining").height
}
tickmarks: Repeater
@ -252,4 +255,4 @@ Item
watchedProperties: ["value", "enabled"]
storeIndex: 0
}
}
}

View file

@ -48,10 +48,11 @@ Item
Cura.IconWithText
{
id: profileLabel
source: UM.Theme.getIcon("category_layer_height")
source: UM.Theme.getIcon("PrintQuality")
text: catalog.i18nc("@label", "Profiles")
font: UM.Theme.getFont("medium")
width: labelColumnWidth
iconSize: UM.Theme.getSize("medium_button_icon").width
}
UM.SimpleButton
{
@ -69,7 +70,7 @@ Item
}
color: hovered ? UM.Theme.getColor("setting_control_button_hover") : UM.Theme.getColor("setting_control_button")
iconSource: UM.Theme.getIcon("reset")
iconSource: UM.Theme.getIcon("ArrowReset")
onClicked:
{
@ -91,6 +92,7 @@ Item
{
left: profileLabel.right
right: parent.right
verticalCenter: profileLabel.verticalCenter
}
model: Cura.QualityProfilesDropDownMenuModel
@ -198,4 +200,4 @@ Item
}
}
}
}

View file

@ -26,10 +26,11 @@ Item
anchors.top: parent.top
anchors.left: parent.left
visible: enableSupportCheckBox.visible
source: UM.Theme.getIcon("category_support")
source: UM.Theme.getIcon("Support")
text: catalog.i18nc("@label", "Support")
font: UM.Theme.getFont("medium")
width: labelColumnWidth
iconSize: UM.Theme.getSize("medium_button_icon").width
}
Item
@ -162,7 +163,7 @@ Item
x: supportExtruderCombobox.width - width - supportExtruderCombobox.rightPadding
y: supportExtruderCombobox.topPadding + Math.round((supportExtruderCombobox.availableHeight - height) / 2)
source: UM.Theme.getIcon("arrow_bottom")
source: UM.Theme.getIcon("ChevronSingleDown")
width: UM.Theme.getSize("standard_arrow").width
height: UM.Theme.getSize("standard_arrow").height
sourceSize.width: width + 5 * screenScaleFactor
@ -218,18 +219,16 @@ Item
elide: Text.ElideLeft
verticalAlignment: Text.AlignVCenter
background: UM.RecolorImage
background: Rectangle
{
id: swatch
height: Math.round(parent.height / 2)
width: height
radius: Math.round(width / 2)
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
anchors.rightMargin: UM.Theme.getSize("thin_margin").width
sourceSize.width: width
sourceSize.height: height
source: UM.Theme.getIcon("extruder_button")
color: supportExtruderCombobox.color
}
}
@ -288,18 +287,16 @@ Item
verticalAlignment: Text.AlignVCenter
rightPadding: swatch.width + UM.Theme.getSize("setting_unit_margin").width
background: UM.RecolorImage
background: Rectangle
{
id: swatch
height: Math.round(parent.height / 2)
width: height
radius: Math.round(width / 2)
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
anchors.rightMargin: UM.Theme.getSize("thin_margin").width
sourceSize.width: width
sourceSize.height: height
source: UM.Theme.getIcon("extruder_button")
color: supportExtruderCombobox.model.getItem(index).color
}
}
@ -342,4 +339,4 @@ Item
watchedProperties: ["value"]
storeIndex: 0
}
}
}

View file

@ -102,7 +102,7 @@ Item
Layout.column: 1
Layout.preferredWidth: width
Layout.preferredHeight: height
iconSource: UM.Theme.getIcon("arrow_top");
iconSource: UM.Theme.getIcon("ChevronSingleUp");
style: UM.Theme.styles.monitor_button_style
width: height
height: UM.Theme.getSize("setting_control").height
@ -119,7 +119,7 @@ Item
Layout.column: 0
Layout.preferredWidth: width
Layout.preferredHeight: height
iconSource: UM.Theme.getIcon("arrow_left");
iconSource: UM.Theme.getIcon("ChevronSingleLeft");
style: UM.Theme.styles.monitor_button_style
width: height
height: UM.Theme.getSize("setting_control").height
@ -136,7 +136,7 @@ Item
Layout.column: 2
Layout.preferredWidth: width
Layout.preferredHeight: height
iconSource: UM.Theme.getIcon("arrow_right");
iconSource: UM.Theme.getIcon("ChevronSingleRight");
style: UM.Theme.styles.monitor_button_style
width: height
height: UM.Theme.getSize("setting_control").height
@ -153,7 +153,7 @@ Item
Layout.column: 1
Layout.preferredWidth: width
Layout.preferredHeight: height
iconSource: UM.Theme.getIcon("arrow_bottom");
iconSource: UM.Theme.getIcon("ChevronSingleDown");
style: UM.Theme.styles.monitor_button_style
width: height
height: UM.Theme.getSize("setting_control").height
@ -170,7 +170,7 @@ Item
Layout.column: 1
Layout.preferredWidth: width
Layout.preferredHeight: height
iconSource: UM.Theme.getIcon("home");
iconSource: UM.Theme.getIcon("House");
style: UM.Theme.styles.monitor_button_style
width: height
height: UM.Theme.getSize("setting_control").height
@ -200,7 +200,7 @@ Item
Button
{
iconSource: UM.Theme.getIcon("arrow_top");
iconSource: UM.Theme.getIcon("ChevronSingleUp");
style: UM.Theme.styles.monitor_button_style
width: height
height: UM.Theme.getSize("setting_control").height
@ -213,7 +213,7 @@ Item
Button
{
iconSource: UM.Theme.getIcon("home");
iconSource: UM.Theme.getIcon("House");
style: UM.Theme.styles.monitor_button_style
width: height
height: UM.Theme.getSize("setting_control").height
@ -226,7 +226,7 @@ Item
Button
{
iconSource: UM.Theme.getIcon("arrow_bottom");
iconSource: UM.Theme.getIcon("ChevronSingleDown");
style: UM.Theme.styles.monitor_button_style
width: height
height: UM.Theme.getSize("setting_control").height

View file

@ -93,11 +93,11 @@ Cura.ExpandablePopup
{
if (isGroup)
{
return UM.Theme.getIcon("printer_group")
return UM.Theme.getIcon("PrinterTriple", "medium")
}
else if (isNetworkPrinter || isCloudRegistered)
{
return UM.Theme.getIcon("printer_single")
return UM.Theme.getIcon("Printer", "medium")
}
else
{
@ -114,11 +114,26 @@ Cura.ExpandablePopup
anchors
{
bottom: parent.bottom
bottomMargin: - height * 1 / 6
left: parent.left
leftMargin: UM.Theme.getSize("thick_margin").width
leftMargin: iconSize - width * 5 / 6
}
source: UM.Theme.getIcon(connectionStatus)
source:
{
if (connectionStatus == "printer_connected")
{
return UM.Theme.getIcon("CheckBlueBG", "low")
}
else if (connectionStatus == "printer_cloud_connected" || connectionStatus == "printer_cloud_not_available")
{
return UM.Theme.getIcon("CloudBadge", "low")
}
else
{
return ""
}
}
width: UM.Theme.getSize("printer_status_icon").width
height: UM.Theme.getSize("printer_status_icon").height
@ -132,11 +147,10 @@ Cura.ExpandablePopup
{
id: iconBackground
anchors.centerIn: parent
// Make it a bit bigger so there is an outline
width: parent.width + 2 * UM.Theme.getSize("default_lining").width
height: parent.height + 2 * UM.Theme.getSize("default_lining").height
radius: Math.round(width / 2)
color: UM.Theme.getColor("main_background")
width: parent.width - 1.5 //1.5 pixels smaller, (at least sqrt(2), regardless of screen pixel scale) so that the circle doesn't show up behind the icon due to anti-aliasing.
height: parent.height - 1.5
radius: width / 2
color: UM.Theme.getColor("connection_badge_background")
z: parent.z - 1
}

View file

@ -146,6 +146,7 @@ Item
}
radius: Math.round(width / 2)
color: activeColor
border.color: defaultItemColor
visible: checkbox.checked
}
}

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.
import QtQuick 2.2
@ -9,11 +9,9 @@ import Cura 1.1 as Cura
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")
textColor: UM.Theme.getColor("secondary_button_text")
outlineColor: "transparent"
outlineColor: UM.Theme.getColor("secondary_button_text")
disabledColor: UM.Theme.getColor("action_button_disabled")
textDisabledColor: UM.Theme.getColor("action_button_disabled_text")
hoverColor: UM.Theme.getColor("secondary_button_hover")

View file

@ -16,10 +16,13 @@ Button
anchors.rightMargin: 2 * UM.Theme.getSize("thin_margin").width
hoverEnabled: true
height: UM.Theme.getSize("section_icon_column").height
background: Rectangle
{
id: backgroundRectangle
height: UM.Theme.getSize("section").height
anchors.verticalCenter: parent.verticalCenter
color:
{
if (!base.enabled)
@ -93,7 +96,7 @@ Button
height: UM.Theme.getSize("standard_arrow").height
sourceSize.height: width
color: UM.Theme.getColor("setting_control_button")
source: definition.expanded ? UM.Theme.getIcon("arrow_bottom") : UM.Theme.getIcon("arrow_left")
source: definition.expanded ? UM.Theme.getIcon("ChevronSingleDown") : UM.Theme.getIcon("ChevronSingleLeft")
}
}
@ -107,8 +110,8 @@ Button
source: UM.Theme.getIcon(definition.icon)
width: UM.Theme.getSize("section_icon").width
height: UM.Theme.getSize("section_icon").height
sourceSize.width: width + 15 * screenScaleFactor
sourceSize.height: width + 15 * screenScaleFactor
sourceSize.width: width
sourceSize.height: width
}
onClicked:
@ -141,8 +144,8 @@ Button
id: settingsButton
visible: base.hovered || settingsButton.hovered
height: Math.round(base.height * 0.6)
width: Math.round(base.height * 0.6)
height: UM.Theme.getSize("small_button_icon").height
width: height
anchors
{
@ -154,7 +157,7 @@ Button
color: UM.Theme.getColor("setting_control_button")
hoverColor: UM.Theme.getColor("setting_control_button_hover")
iconSource: UM.Theme.getIcon("settings")
iconSource: UM.Theme.getIcon("Sliders")
onClicked: Cura.Actions.configureSettingVisibility.trigger(definition)
}
@ -184,7 +187,7 @@ Button
return false
}
height: Math.round(parent.height / 2)
height: UM.Theme.getSize("small_button_icon").height
width: height
onClicked:
@ -195,7 +198,7 @@ Button
color: UM.Theme.getColor("setting_control_button")
hoverColor: UM.Theme.getColor("setting_control_button_hover")
iconSource: UM.Theme.getIcon("notice")
iconSource: UM.Theme.getIcon("Information")
onEntered: base.showTooltip(catalog.i18nc("@label","Some hidden settings use values different from their normal calculated value.\n\nClick to make these settings visible."))

View file

@ -151,7 +151,7 @@ SettingItem
height: Math.round(parent.height / 2.5)
sourceSize.height: width
color: !enabled ? UM.Theme.getColor("setting_control_disabled_text") : UM.Theme.getColor("setting_control_text");
source: UM.Theme.getIcon("check")
source: UM.Theme.getIcon("Check")
opacity: control.checked ? 1 : 0
Behavior on opacity { NumberAnimation { duration: 100; } }
}

View file

@ -77,7 +77,7 @@ SettingItem
currentIndex: propertyProvider.properties.value !== undefined ? propertyProvider.properties.value : 0
property string color: "#fff"
property string color: "transparent"
Binding
{
@ -85,7 +85,7 @@ SettingItem
// explicit binding here otherwise we do not handle value changes after the model changes.
target: control
property: "color"
value: control.currentText != "" ? control.model.getItem(control.currentIndex).color : ""
value: control.currentText != "" ? control.model.getItem(control.currentIndex).color : "transparent"
}
Binding
@ -104,7 +104,7 @@ SettingItem
x: control.width - width - control.rightPadding
y: control.topPadding + Math.round((control.availableHeight - height) / 2)
source: UM.Theme.getIcon("arrow_bottom")
source: UM.Theme.getIcon("ChevronSingleDown")
width: UM.Theme.getSize("standard_arrow").width
height: UM.Theme.getSize("standard_arrow").height
sourceSize.width: width + 5 * screenScaleFactor
@ -160,18 +160,16 @@ SettingItem
elide: Text.ElideLeft
verticalAlignment: Text.AlignVCenter
background: UM.RecolorImage
background: Rectangle
{
id: swatch
height: Math.round(parent.height / 2)
width: height
radius: Math.round(width / 2)
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
anchors.rightMargin: UM.Theme.getSize("thin_margin").width
sourceSize.width: width
sourceSize.height: height
source: UM.Theme.getIcon("extruder_button")
color: control.color
}
}
@ -229,18 +227,16 @@ SettingItem
verticalAlignment: Text.AlignVCenter
rightPadding: swatch.width + UM.Theme.getSize("setting_unit_margin").width
background: UM.RecolorImage
background: Rectangle
{
id: swatch
height: Math.round(parent.height / 2)
width: height
radius: Math.round(width / 2)
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
anchors.rightMargin: UM.Theme.getSize("thin_margin").width
sourceSize.width: width
sourceSize.height: height
source: UM.Theme.getIcon("extruder_button")
color: control.model.getItem(index).color
}
}

View file

@ -156,7 +156,7 @@ Item
{
id: settingControls
height: UM.Theme.getSize("section_control").height
height: UM.Theme.getSize("small_button_icon").height
spacing: Math.round(UM.Theme.getSize("thick_margin").height / 2)
anchors
@ -174,12 +174,13 @@ Item
anchors.top: parent.top
anchors.bottom: parent.bottom
height: UM.Theme.getSize("small_button_icon").height
width: height
color: UM.Theme.getColor("setting_control_button")
hoverColor: UM.Theme.getColor("setting_control_button")
iconSource: UM.Theme.getIcon("link")
iconSource: UM.Theme.getIcon("Link")
onEntered:
{
@ -203,12 +204,13 @@ Item
anchors.top: parent.top
anchors.bottom: parent.bottom
height: UM.Theme.getSize("small_button_icon").height
width: height
color: UM.Theme.getColor("setting_control_button")
hoverColor: UM.Theme.getColor("setting_control_button_hover")
iconSource: UM.Theme.getIcon("reset")
iconSource: UM.Theme.getIcon("ArrowReset")
onClicked:
{
@ -286,6 +288,7 @@ Item
anchors.top: parent.top
anchors.bottom: parent.bottom
height: UM.Theme.getSize("small_button_icon").height
width: height
onClicked:
@ -324,7 +327,7 @@ Item
color: UM.Theme.getColor("setting_control_button")
hoverColor: UM.Theme.getColor("setting_control_button_hover")
iconSource: UM.Theme.getIcon("formula")
iconSource: UM.Theme.getIcon("Function")
onEntered: { hoverTimer.stop(); base.showTooltip(catalog.i18nc("@label", "This setting is normally calculated, but it currently has an absolute value set.\n\nClick to restore the calculated value.")) }
onExited: base.showTooltip(base.createTooltipText())

View file

@ -88,7 +88,7 @@ SettingItem
when: control.model.items.length > 0
}
property string color: "#fff"
property string color: "transparent"
Binding
{
@ -96,7 +96,7 @@ SettingItem
// explicit binding here otherwise we do not handle value changes after the model changes.
target: control
property: "color"
value: control.currentText != "" ? control.model.getItem(control.currentIndex).color : ""
value: control.currentText != "" ? control.model.getItem(control.currentIndex).color : "transparent"
}
indicator: UM.RecolorImage
@ -105,7 +105,7 @@ SettingItem
x: control.width - width - control.rightPadding
y: control.topPadding + Math.round((control.availableHeight - height) / 2)
source: UM.Theme.getIcon("arrow_bottom")
source: UM.Theme.getIcon("ChevronSingleDown")
width: UM.Theme.getSize("standard_arrow").width
height: UM.Theme.getSize("standard_arrow").height
sourceSize.width: width + 5 * screenScaleFactor
@ -161,18 +161,16 @@ SettingItem
elide: Text.ElideRight
verticalAlignment: Text.AlignVCenter
background: UM.RecolorImage
background: Rectangle
{
id: swatch
height: Math.round(parent.height / 2)
width: height
radius: Math.round(width / 2)
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
anchors.rightMargin: UM.Theme.getSize("thin_margin").width
sourceSize.width: width
sourceSize.height: height
source: UM.Theme.getIcon("extruder_button")
color: control.color
}
}
@ -226,18 +224,16 @@ SettingItem
verticalAlignment: Text.AlignVCenter
rightPadding: swatch.width + UM.Theme.getSize("setting_unit_margin").width
background: UM.RecolorImage
background: Rectangle
{
id: swatch
height: Math.round(parent.height / 2)
width: height
radius: Math.round(width / 2)
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
anchors.rightMargin: UM.Theme.getSize("thin_margin").width
sourceSize.width: width
sourceSize.height: height
source: UM.Theme.getIcon("extruder_button")
color: control.model.getItem(index).color
}
}

View file

@ -65,7 +65,13 @@ Item
anchors.right: clearFilterButton.left
anchors.rightMargin: Math.round(UM.Theme.getSize("thick_margin").width)
placeholderText: "<img align='middle' src='"+ UM.Theme.getIcon("search") +"'>" + "<div vertical-align=bottom>" + catalog.i18nc("@label:textbox", "Search settings")
placeholderText:
{
var imageSize = "width='" + UM.Theme.getSize("small_button_icon").width + "' height='" + UM.Theme.getSize("small_button_icon").height
var imageSource = "' src='"+ UM.Theme.getIcon("Magnifier")
var searchPlaceholder = catalog.i18nc("@label:textbox", "Search settings")
return "<img align='middle' " + imageSize + imageSource +"'>" + "<div vertical-align=bottom>" + searchPlaceholder
}
style: TextFieldStyle
{
@ -133,7 +139,7 @@ Item
UM.SimpleButton
{
id: clearFilterButton
iconSource: UM.Theme.getIcon("cross1")
iconSource: UM.Theme.getIcon("Cancel")
visible: findingSettings
height: Math.round(parent.height * 0.4)
@ -188,12 +194,12 @@ Item
{
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
width: UM.Theme.getSize("standard_arrow").width
height: UM.Theme.getSize("standard_arrow").height
width: UM.Theme.getSize("medium_button_icon").width
height: UM.Theme.getSize("medium_button_icon").height
sourceSize.width: width
sourceSize.height: height
color: control.hovered ? UM.Theme.getColor("small_button_text_hover") : UM.Theme.getColor("small_button_text")
source: UM.Theme.getIcon("menu")
source: UM.Theme.getIcon("Hamburger")
}
}
label: Label {}

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.
import QtQuick 2.2
@ -9,8 +9,6 @@ import Cura 1.1 as Cura
Cura.ActionButton
{
shadowEnabled: true
shadowColor: enabled ? UM.Theme.getColor("secondary_button_shadow"): UM.Theme.getColor("action_button_disabled_shadow")
color: "transparent"
textColor: UM.Theme.getColor("text_link")
outlineColor: "transparent"

View file

@ -44,7 +44,6 @@ Item
anchors.top: parent.top
anchors.right: parent.right
spacing: UM.Theme.getSize("default_lining").height
Repeater
{
@ -69,7 +68,8 @@ Item
source: UM.Theme.getIcon(model.icon) != "" ? UM.Theme.getIcon(model.icon) : "file:///" + model.location + "/" + model.icon
color: UM.Theme.getColor("icon")
sourceSize: UM.Theme.getSize("button_icon")
sourceSize.height: Math.round(UM.Theme.getSize("button").height / 2)
sourceSize.width: Math.round(UM.Theme.getSize("button").width / 2)
}
onCheckedChanged:
@ -131,7 +131,6 @@ Item
anchors.topMargin: UM.Theme.getSize("default_margin").height
anchors.top: toolButtons.bottom
anchors.right: parent.right
spacing: UM.Theme.getSize("default_lining").height
Repeater
{

View file

@ -25,22 +25,7 @@ Button
{
implicitWidth: UM.Theme.getSize("button").width
implicitHeight: UM.Theme.getSize("button").height
color:
{
if (base.checked && base.hovered)
{
return UM.Theme.getColor("toolbar_button_active_hover")
}
else if (base.checked)
{
return UM.Theme.getColor("toolbar_button_active")
}
else if(base.hovered)
{
return UM.Theme.getColor("toolbar_button_hover")
}
return UM.Theme.getColor("toolbar_background")
}
color: UM.Theme.getColor("toolbar_background")
radius: UM.Theme.getSize("default_radius").width
Rectangle
@ -84,16 +69,35 @@ Button
color: parent.color
}
}
contentItem: Item
contentItem: Rectangle
{
opacity: parent.enabled ? 1.0 : 0.2
implicitWidth: Math.round(UM.Theme.getSize("button").width * 0.75)
implicitHeight: Math.round(UM.Theme.getSize("button").height * 0.75)
radius: Math.round(width * 0.5)
color:
{
if (base.checked && base.hovered)
{
return UM.Theme.getColor("toolbar_button_active_hover")
}
else if (base.checked)
{
return UM.Theme.getColor("toolbar_button_active")
}
else if(base.hovered)
{
return UM.Theme.getColor("toolbar_button_hover")
}
return UM.Theme.getColor("toolbar_background")
}
Loader
{
id: contentItemLoader
anchors.centerIn: parent
width: UM.Theme.getSize("button_icon").width
height: UM.Theme.getSize("button_icon").height
width: Math.round(UM.Theme.getSize("button").width / 2)
height: Math.round(UM.Theme.getSize("button").height / 2)
}
}

View file

@ -11,5 +11,4 @@ UM.SimpleButton
height: UM.Theme.getSize("small_button").height
hoverColor: UM.Theme.getColor("small_button_text_hover")
color: UM.Theme.getColor("small_button_text")
iconMargin: UM.Theme.getSize("thick_lining").width
}

View file

@ -18,7 +18,7 @@ Row
ViewOrientationButton
{
iconSource: UM.Theme.getIcon("view_3d")
iconSource: UM.Theme.getIcon("View3D")
onClicked: Cura.Actions.view3DCamera.trigger()
UM.TooltipArea
@ -31,7 +31,7 @@ Row
ViewOrientationButton
{
iconSource: UM.Theme.getIcon("view_front")
iconSource: UM.Theme.getIcon("ViewFront")
onClicked: Cura.Actions.viewFrontCamera.trigger()
UM.TooltipArea
@ -44,7 +44,7 @@ Row
ViewOrientationButton
{
iconSource: UM.Theme.getIcon("view_top")
iconSource: UM.Theme.getIcon("ViewTop")
onClicked: Cura.Actions.viewTopCamera.trigger()
UM.TooltipArea
@ -57,7 +57,7 @@ Row
ViewOrientationButton
{
iconSource: UM.Theme.getIcon("view_left")
iconSource: UM.Theme.getIcon("ViewLeft")
onClicked: Cura.Actions.viewLeftSideCamera.trigger()
UM.TooltipArea
@ -70,7 +70,7 @@ Row
ViewOrientationButton
{
iconSource: UM.Theme.getIcon("view_right")
iconSource: UM.Theme.getIcon("ViewRight")
onClicked: Cura.Actions.viewRightSideCamera.trigger()
UM.TooltipArea

View file

@ -143,7 +143,7 @@ Item
sourceSize.width: width
sourceSize.height: height
color: UM.Theme.getColor("text")
source: base.currentSection == section ? UM.Theme.getIcon("arrow_bottom") : UM.Theme.getIcon("arrow_right")
source: base.currentSection == section ? UM.Theme.getIcon("ChevronSingleDown") : UM.Theme.getIcon("ChevronSingleRight")
}
Label

View file

@ -54,7 +54,7 @@ Item
{
id: networkPrinterScrollView
maxItemCountAtOnce: 10 // show at max 10 items at once, otherwise you need to scroll.
maxItemCountAtOnce: 9 // show at max 9 items at once, otherwise you need to scroll.
onRefreshButtonClicked:
{

View file

@ -1,4 +1,4 @@
// Copyright (c) 2019 Ultimaker B.V.
// Copyright (c) 2021 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.10
@ -214,22 +214,22 @@ Item
id: troubleshootingButton
anchors.right: parent.right
anchors.rightMargin: UM.Theme.getSize("default_margin").width
anchors.rightMargin: UM.Theme.getSize("thin_margin").width
anchors.verticalCenter: parent.verticalCenter
height: troubleshootingLinkIcon.height
width: troubleshootingLinkIcon.width + troubleshootingLabel.width + UM.Theme.getSize("default_margin").width
width: troubleshootingLinkIcon.width + troubleshootingLabel.width + UM.Theme.getSize("thin_margin").width
UM.RecolorImage
{
id: troubleshootingLinkIcon
anchors.right: troubleshootingLabel.left
anchors.rightMargin: UM.Theme.getSize("default_margin").width
anchors.rightMargin: UM.Theme.getSize("thin_margin").width
anchors.verticalCenter: parent.verticalCenter
height: troubleshootingLabel.height
width: height
sourceSize.height: width
color: UM.Theme.getColor("text_link")
source: UM.Theme.getIcon("external_link")
source: UM.Theme.getIcon("LinkExternal")
}
Label

View file

@ -112,7 +112,7 @@ Item
anchors.horizontalCenter: parent.horizontalCenter
fillMode: Image.PreserveAspectFit
width: UM.Theme.getSize("welcome_wizard_cloud_content_image").width
source: UM.Theme.getIcon("package")
source: UM.Theme.getIcon("Plugin")
sourceSize.width: width
sourceSize.height: height
}
@ -142,7 +142,7 @@ Item
anchors.horizontalCenter: parent.horizontalCenter
fillMode: Image.PreserveAspectFit
width: UM.Theme.getSize("welcome_wizard_cloud_content_image").width
source: UM.Theme.getIcon("material_spool")
source: UM.Theme.getIcon("Spool")
sourceSize.width: width
sourceSize.height: height
}
@ -172,7 +172,7 @@ Item
anchors.horizontalCenter: communityColumn.horizontalCenter
fillMode: Image.PreserveAspectFit
width: UM.Theme.getSize("welcome_wizard_cloud_content_image").width
source: UM.Theme.getIcon("group")
source: UM.Theme.getIcon("PrinterTriple", "medium")
sourceSize.width: width
sourceSize.height: height
}

View file

@ -27,7 +27,7 @@ Cura.RoundedRectangle
cornerSide: contentShown ? Cura.RoundedRectangle.Direction.Up : Cura.RoundedRectangle.Direction.All
property string title: ""
property url rightIconSource: UM.Theme.getIcon("arrow_bottom")
property url rightIconSource: UM.Theme.getIcon("ChevronSingleDown")
// If the tab is under hovering state
property bool hovered: false

View file

@ -49,7 +49,7 @@ Item
anchors.left: parent.left
anchors.right: parent.right
height: UM.Theme.getSize("expandable_component_content_header").height
rightIconSource: contentShown ? UM.Theme.getIcon("arrow_bottom") : UM.Theme.getIcon("arrow_left")
rightIconSource: contentShown ? UM.Theme.getIcon("ChevronSingleDown") : UM.Theme.getIcon("ChevronSingleLeft")
contentShown: base.contentShown
}

View file

@ -58,7 +58,7 @@ CheckBox
height: Math.round(parent.height / 2.5)
sourceSize.height: width
color: !enabled ? UM.Theme.getColor("setting_control_disabled_text") : UM.Theme.getColor("setting_control_text")
source: UM.Theme.getIcon("check")
source: UM.Theme.getIcon("Check")
opacity: control.checked ? 1 : 0
Behavior on opacity { NumberAnimation { duration: 100; } }
}

View file

@ -62,7 +62,7 @@ ComboBox
x: control.width - width - control.rightPadding
y: control.topPadding + Math.round((control.availableHeight - height) / 2)
source: UM.Theme.getIcon("arrow_bottom")
source: UM.Theme.getIcon("ChevronSingleDown")
width: UM.Theme.getSize("standard_arrow").width
height: UM.Theme.getSize("standard_arrow").height
sourceSize.width: width + 5 * screenScaleFactor

View file

@ -1,4 +1,4 @@
// Copyright (c) 2019 Ultimaker B.V.
// Copyright (c) 2021 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.10
@ -15,6 +15,8 @@ TextField
{
id: textField
property alias leftIcon: iconLeft.source
UM.I18nCatalog { id: catalog; name: "cura" }
hoverEnabled: true
@ -22,6 +24,7 @@ TextField
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
renderType: Text.NativeRendering
leftPadding: iconLeft.visible ? iconLeft.width + UM.Theme.getSize("default_margin").width * 2 : UM.Theme.getSize("thin_margin").width
states: [
State
@ -52,7 +55,6 @@ TextField
color: UM.Theme.getColor("main_background")
anchors.margins: Math.round(UM.Theme.getSize("default_lining").width)
radius: UM.Theme.getSize("setting_control_radius").width
border.color:
@ -67,5 +69,23 @@ TextField
}
return UM.Theme.getColor("setting_control_border")
}
//Optional icon added on the left hand side.
UM.RecolorImage
{
id: iconLeft
anchors
{
verticalCenter: parent.verticalCenter
left: parent.left
leftMargin: UM.Theme.getSize("default_margin").width
}
visible: source != ""
height: UM.Theme.getSize("small_button_icon").height
width: visible ? height : 0
color: textField.color
}
}
}