mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-12-11 16:00:47 -07:00
Merge branch 'CURA-8011_Replace_extruder_icons' into CURA-8247_badge_background_colour
This commit is contained in:
commit
43237c91c6
39 changed files with 257 additions and 214 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
@ -58,6 +56,9 @@ Item
|
|||
|
||||
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
|
||||
|
||||
|
|
@ -75,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: ""
|
||||
|
|
@ -122,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
|
||||
|
||||
|
|
@ -167,7 +167,7 @@ Item
|
|||
verticalCenter: parent.verticalCenter
|
||||
margins: background.padding
|
||||
}
|
||||
source: UM.Theme.getIcon("Pen")
|
||||
source: expanded ? UM.Theme.getIcon("ChevronSingleDown") : UM.Theme.getIcon("ChevronSingleLeft")
|
||||
visible: source != ""
|
||||
width: UM.Theme.getSize("standard_arrow").width
|
||||
height: UM.Theme.getSize("standard_arrow").height
|
||||
|
|
@ -186,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
|
||||
|
|
@ -211,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.
|
||||
|
|
@ -230,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));
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
@ -52,6 +50,9 @@ Item
|
|||
|
||||
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
|
||||
|
||||
|
|
@ -74,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:
|
||||
{
|
||||
|
|
@ -116,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
|
||||
|
||||
|
|
@ -190,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.
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ Cura.ToolbarButton
|
|||
{
|
||||
materialColor: extruder.color
|
||||
extruderEnabled: extruder.stack.isEnabled
|
||||
iconVariant: "default"
|
||||
property int index: extruder.index
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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,30 +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", "medium")
|
||||
color: extruderEnabled ? materialColor: UM.Theme.getColor("disabled")
|
||||
}
|
||||
|
||||
Rectangle
|
||||
{
|
||||
id: extruderNumberCircle
|
||||
|
||||
width: height
|
||||
height: Math.round(parent.height / 2)
|
||||
radius: Math.round(width)
|
||||
color: UM.Theme.getColor("toolbar_background")
|
||||
|
||||
anchors
|
||||
UM.RecolorImage
|
||||
{
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
top: parent.top
|
||||
topMargin: (parent.height - height) / 2
|
||||
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
|
||||
|
|
@ -47,25 +47,13 @@ Item
|
|||
id: extruderNumberText
|
||||
anchors.centerIn: parent
|
||||
text: index + 1
|
||||
font: UM.Theme.getFont("small")
|
||||
font: UM.Theme.getFont("small_black")
|
||||
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("Cancel")
|
||||
visible: !extruderEnabled
|
||||
color: UM.Theme.getColor("text")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,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"
|
||||
|
|
|
|||
|
|
@ -56,13 +56,13 @@ Cura.ExpandablePopup
|
|||
id: extruderIcon
|
||||
materialColor: model.color
|
||||
extruderEnabled: model.enabled
|
||||
width: UM.Theme.getSize("button_icon").width
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Item
|
||||
{
|
||||
height: childrenRect.height
|
||||
opacity: model.enabled ? 1 : UM.Theme.getColor("extruder_disabled").a
|
||||
anchors
|
||||
{
|
||||
left: extruderIcon.right
|
||||
|
|
|
|||
|
|
@ -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", "medium")
|
||||
width: UM.Theme.getSize("standard_arrow").height
|
||||
height: UM.Theme.getSize("standard_arrow").height
|
||||
radius: Math.round(width / 2)
|
||||
color: extruderColor
|
||||
visible: showExtruderSwatches && extruderColor != ""
|
||||
}
|
||||
|
|
|
|||
|
|
@ -229,6 +229,9 @@ Item
|
|||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
materialColor: model.color
|
||||
extruderEnabled: model.enabled
|
||||
iconVariant: "default"
|
||||
width: UM.Theme.getSize("medium_button_icon").width
|
||||
height: UM.Theme.getSize("medium_button_icon").height
|
||||
}
|
||||
}
|
||||
onClicked:
|
||||
|
|
|
|||
|
|
@ -17,9 +17,6 @@ Cura.ExpandableComponent
|
|||
|
||||
contentPadding: UM.Theme.getSize("default_lining").width
|
||||
contentHeaderTitle: catalog.i18nc("@label", "Print settings")
|
||||
enableHeaderShadow: false
|
||||
headerBackgroundBorder.width: UM.Theme.getSize("default_lining").width
|
||||
headerBackgroundBorder.color: UM.Theme.getColor("lining")
|
||||
enabled: !preSlicedData
|
||||
disabledText: catalog.i18nc("@label shown when we load a Gcode file", "Print setup disabled. G-code file can not be modified.")
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,8 @@ RowLayout
|
|||
|
||||
Cura.IconWithText
|
||||
{
|
||||
source: UM.Theme.getIcon("PrintQuality")
|
||||
source: UM.Theme.getIcon("Sliders", "medium")
|
||||
iconSize: UM.Theme.getSize("button_icon").width
|
||||
text:
|
||||
{
|
||||
if (Cura.MachineManager.activeStack)
|
||||
|
|
@ -53,6 +54,7 @@ RowLayout
|
|||
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
|
||||
{
|
||||
|
|
@ -68,6 +70,7 @@ RowLayout
|
|||
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
|
||||
{
|
||||
|
|
@ -83,6 +86,7 @@ RowLayout
|
|||
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
|
||||
{
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ Item
|
|||
text: catalog.i18nc("@label", "Adhesion")
|
||||
font: UM.Theme.getFont("medium")
|
||||
width: labelColumnWidth
|
||||
iconSize: UM.Theme.getSize("medium_button_icon").width
|
||||
}
|
||||
|
||||
Item
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ Item
|
|||
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
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ Item
|
|||
text: catalog.i18nc("@label", "Profiles")
|
||||
font: UM.Theme.getFont("medium")
|
||||
width: labelColumnWidth
|
||||
iconSize: UM.Theme.getSize("medium_button_icon").width
|
||||
}
|
||||
UM.SimpleButton
|
||||
{
|
||||
|
|
@ -91,6 +92,7 @@ Item
|
|||
{
|
||||
left: profileLabel.right
|
||||
right: parent.right
|
||||
verticalCenter: profileLabel.verticalCenter
|
||||
}
|
||||
|
||||
model: Cura.QualityProfilesDropDownMenuModel
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ Item
|
|||
text: catalog.i18nc("@label", "Support")
|
||||
font: UM.Theme.getFont("medium")
|
||||
width: labelColumnWidth
|
||||
iconSize: UM.Theme.getSize("medium_button_icon").width
|
||||
}
|
||||
|
||||
Item
|
||||
|
|
@ -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", "medium")
|
||||
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", "medium")
|
||||
color: supportExtruderCombobox.model.getItem(index).color
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,11 +93,11 @@ Cura.ExpandablePopup
|
|||
{
|
||||
if (isGroup)
|
||||
{
|
||||
return UM.Theme.getIcon("PrinterTriple")
|
||||
return UM.Theme.getIcon("PrinterTriple", "medium")
|
||||
}
|
||||
else if (isNetworkPrinter || isCloudRegistered)
|
||||
{
|
||||
return UM.Theme.getIcon("Printer")
|
||||
return UM.Theme.getIcon("Printer", "medium")
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -114,8 +114,9 @@ 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:
|
||||
|
|
|
|||
|
|
@ -146,6 +146,7 @@ Item
|
|||
}
|
||||
radius: Math.round(width / 2)
|
||||
color: activeColor
|
||||
border.color: defaultItemColor
|
||||
visible: checkbox.checked
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
@ -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
|
||||
{
|
||||
|
|
@ -184,7 +187,7 @@ Button
|
|||
return false
|
||||
}
|
||||
|
||||
height: Math.round(parent.height / 2)
|
||||
height: UM.Theme.getSize("small_button_icon").height
|
||||
width: height
|
||||
|
||||
onClicked:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -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", "medium")
|
||||
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", "medium")
|
||||
color: control.model.getItem(index).color
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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,6 +174,7 @@ 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")
|
||||
|
|
@ -203,6 +204,7 @@ 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")
|
||||
|
|
@ -286,6 +288,7 @@ Item
|
|||
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
height: UM.Theme.getSize("small_button_icon").height
|
||||
width: height
|
||||
|
||||
onClicked:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -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", "medium")
|
||||
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", "medium")
|
||||
color: control.model.getItem(index).color
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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("Magnifier") +"'>" + "<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
|
||||
{
|
||||
|
|
@ -188,8 +194,8 @@ 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")
|
||||
|
|
|
|||
|
|
@ -68,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: Math.round(UM.Theme.getSize("button") / 2)
|
||||
sourceSize.height: Math.round(UM.Theme.getSize("button").height / 2)
|
||||
sourceSize.width: Math.round(UM.Theme.getSize("button").width / 2)
|
||||
}
|
||||
|
||||
onCheckedChanged:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue