mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-30 07:44:22 +08:00
Fix merge conflicts with 4.0
This commit is contained in:
commit
17c93dea80
@ -2,6 +2,7 @@
|
|||||||
// Cura is released under the terms of the LGPLv3 or higher.
|
// Cura is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
import QtQuick 2.7
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Layouts 1.1
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
|
|
||||||
import UM 1.3 as UM
|
import UM 1.3 as UM
|
||||||
@ -19,12 +20,15 @@ Item
|
|||||||
name: "cura"
|
name: "cura"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Row
|
Row
|
||||||
{
|
{
|
||||||
id: stageMenuRow
|
id: stageMenuRow
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
height: parent.height
|
height: parent.height
|
||||||
|
width: childrenRect.width
|
||||||
|
|
||||||
|
// We want this row to have a preferred with equals to the 85% of the parent
|
||||||
|
property int preferredWidth: Math.round(0.85 * previewMenu.width)
|
||||||
|
|
||||||
Cura.ViewsSelector
|
Cura.ViewsSelector
|
||||||
{
|
{
|
||||||
@ -45,11 +49,12 @@ Item
|
|||||||
color: UM.Theme.getColor("lining")
|
color: UM.Theme.getColor("lining")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This component will grow freely up to complete the preferredWidth of the row.
|
||||||
Loader
|
Loader
|
||||||
{
|
{
|
||||||
id: viewPanel
|
id: viewPanel
|
||||||
height: parent.height
|
height: parent.height
|
||||||
width: childrenRect.width
|
width: source != "" ? (stageMenuRow.preferredWidth - viewsSelector.width - printSetupSelectorItem.width - 2 * UM.Theme.getSize("default_lining").width) : 0
|
||||||
source: UM.Controller.activeView != null && UM.Controller.activeView.stageMenuComponent != null ? UM.Controller.activeView.stageMenuComponent : ""
|
source: UM.Controller.activeView != null && UM.Controller.activeView.stageMenuComponent != null ? UM.Controller.activeView.stageMenuComponent : ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,6 @@ Cura.ExpandableComponent
|
|||||||
{
|
{
|
||||||
id: base
|
id: base
|
||||||
|
|
||||||
width: UM.Theme.getSize("layerview_menu_size").width
|
|
||||||
contentHeaderTitle: catalog.i18nc("@label", "Color scheme")
|
contentHeaderTitle: catalog.i18nc("@label", "Color scheme")
|
||||||
|
|
||||||
Connections
|
Connections
|
||||||
@ -35,14 +34,36 @@ Cura.ExpandableComponent
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
headerItem: Label
|
headerItem: Item
|
||||||
{
|
{
|
||||||
id: layerViewTypesLabel
|
Label
|
||||||
text: catalog.i18nc("@label", "Color scheme")
|
{
|
||||||
font: UM.Theme.getFont("default")
|
id: colorSchemeLabel
|
||||||
color: UM.Theme.getColor("setting_control_text")
|
text: catalog.i18nc("@label", "Color scheme")
|
||||||
height: base.height
|
verticalAlignment: Text.AlignVCenter
|
||||||
verticalAlignment: Text.AlignVCenter
|
height: parent.height
|
||||||
|
elide: Text.ElideRight
|
||||||
|
font: UM.Theme.getFont("default")
|
||||||
|
color: UM.Theme.getColor("text_medium")
|
||||||
|
renderType: Text.NativeRendering
|
||||||
|
}
|
||||||
|
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
text: layerTypeCombobox.currentText
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
anchors
|
||||||
|
{
|
||||||
|
left: colorSchemeLabel.right
|
||||||
|
leftMargin: UM.Theme.getSize("default_margin").width
|
||||||
|
right: parent.right
|
||||||
|
}
|
||||||
|
height: parent.height
|
||||||
|
elide: Text.ElideRight
|
||||||
|
font: UM.Theme.getFont("default")
|
||||||
|
color: UM.Theme.getColor("text")
|
||||||
|
renderType: Text.NativeRendering
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
contentItem: Column
|
contentItem: Column
|
||||||
@ -125,7 +146,7 @@ Cura.ExpandableComponent
|
|||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
id: compatibilityModeLabel
|
id: compatibilityModeLabel
|
||||||
text: catalog.i18nc("@label","Compatibility Mode")
|
text: catalog.i18nc("@label", "Compatibility Mode")
|
||||||
font: UM.Theme.getFont("default")
|
font: UM.Theme.getFont("default")
|
||||||
color: UM.Theme.getColor("text")
|
color: UM.Theme.getColor("text")
|
||||||
visible: UM.SimulationView.compatibilityMode
|
visible: UM.SimulationView.compatibilityMode
|
||||||
@ -136,7 +157,7 @@ Cura.ExpandableComponent
|
|||||||
|
|
||||||
Item // Spacer
|
Item // Spacer
|
||||||
{
|
{
|
||||||
height: Math.round(UM.Theme.getSize("default_margin").width / 2)
|
height: UM.Theme.getSize("narrow_margin").width
|
||||||
width: width
|
width: width
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -161,17 +182,16 @@ Cura.ExpandableComponent
|
|||||||
|
|
||||||
style: UM.Theme.styles.checkbox
|
style: UM.Theme.styles.checkbox
|
||||||
|
|
||||||
Rectangle
|
|
||||||
|
UM.RecolorImage
|
||||||
{
|
{
|
||||||
|
id: swatch
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.right: extrudersModelCheckBox.right
|
anchors.right: extrudersModelCheckBox.right
|
||||||
width: UM.Theme.getSize("layerview_legend_size").width
|
width: UM.Theme.getSize("layerview_legend_size").width
|
||||||
height: UM.Theme.getSize("layerview_legend_size").height
|
height: UM.Theme.getSize("layerview_legend_size").height
|
||||||
|
source: UM.Theme.getIcon("extruder_button")
|
||||||
color: model.color
|
color: model.color
|
||||||
radius: Math.round(width / 2)
|
|
||||||
border.width: UM.Theme.getSize("default_lining").width
|
|
||||||
border.color: UM.Theme.getColor("lining")
|
|
||||||
visible: !viewSettings.show_legend && !viewSettings.show_gradient
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Label
|
Label
|
||||||
@ -201,25 +221,25 @@ Cura.ExpandableComponent
|
|||||||
Component.onCompleted:
|
Component.onCompleted:
|
||||||
{
|
{
|
||||||
typesLegendModel.append({
|
typesLegendModel.append({
|
||||||
label: catalog.i18nc("@label", "Show Travels"),
|
label: catalog.i18nc("@label", "Travels"),
|
||||||
initialValue: viewSettings.show_travel_moves,
|
initialValue: viewSettings.show_travel_moves,
|
||||||
preference: "layerview/show_travel_moves",
|
preference: "layerview/show_travel_moves",
|
||||||
colorId: "layerview_move_combing"
|
colorId: "layerview_move_combing"
|
||||||
});
|
});
|
||||||
typesLegendModel.append({
|
typesLegendModel.append({
|
||||||
label: catalog.i18nc("@label", "Show Helpers"),
|
label: catalog.i18nc("@label", "Helpers"),
|
||||||
initialValue: viewSettings.show_helpers,
|
initialValue: viewSettings.show_helpers,
|
||||||
preference: "layerview/show_helpers",
|
preference: "layerview/show_helpers",
|
||||||
colorId: "layerview_support"
|
colorId: "layerview_support"
|
||||||
});
|
});
|
||||||
typesLegendModel.append({
|
typesLegendModel.append({
|
||||||
label: catalog.i18nc("@label", "Show Shell"),
|
label: catalog.i18nc("@label", "Shell"),
|
||||||
initialValue: viewSettings.show_skin,
|
initialValue: viewSettings.show_skin,
|
||||||
preference: "layerview/show_skin",
|
preference: "layerview/show_skin",
|
||||||
colorId: "layerview_inset_0"
|
colorId: "layerview_inset_0"
|
||||||
});
|
});
|
||||||
typesLegendModel.append({
|
typesLegendModel.append({
|
||||||
label: catalog.i18nc("@label", "Show Infill"),
|
label: catalog.i18nc("@label", "Infill"),
|
||||||
initialValue: viewSettings.show_infill,
|
initialValue: viewSettings.show_infill,
|
||||||
preference: "layerview/show_infill",
|
preference: "layerview/show_infill",
|
||||||
colorId: "layerview_infill"
|
colorId: "layerview_infill"
|
||||||
|
@ -2,21 +2,23 @@
|
|||||||
// Toolbox is released under the terms of the LGPLv3 or higher.
|
// Toolbox is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
import QtQuick 2.10
|
import QtQuick 2.10
|
||||||
import QtQuick.Controls 1.4
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Controls.Styles 1.4
|
|
||||||
import UM 1.1 as UM
|
import UM 1.1 as UM
|
||||||
|
import Cura 1.0 as Cura
|
||||||
|
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
id: footer
|
id: footer
|
||||||
width: parent.width
|
width: parent.width
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
height: visible ? Math.floor(UM.Theme.getSize("toolbox_footer").height) : 0
|
height: visible ? UM.Theme.getSize("toolbox_footer").height : 0
|
||||||
|
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
text: catalog.i18nc("@info", "You will need to restart Cura before changes in packages have effect.")
|
text: catalog.i18nc("@info", "You will need to restart Cura before changes in packages have effect.")
|
||||||
color: UM.Theme.getColor("text")
|
color: UM.Theme.getColor("text")
|
||||||
height: Math.floor(UM.Theme.getSize("toolbox_footer_button").height)
|
height: UM.Theme.getSize("toolbox_footer_button").height
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
anchors
|
anchors
|
||||||
{
|
{
|
||||||
@ -28,10 +30,10 @@ Item
|
|||||||
}
|
}
|
||||||
renderType: Text.NativeRendering
|
renderType: Text.NativeRendering
|
||||||
}
|
}
|
||||||
Button
|
|
||||||
|
Cura.PrimaryButton
|
||||||
{
|
{
|
||||||
id: restartButton
|
id: restartButton
|
||||||
text: catalog.i18nc("@info:button", "Quit Cura")
|
|
||||||
anchors
|
anchors
|
||||||
{
|
{
|
||||||
top: parent.top
|
top: parent.top
|
||||||
@ -39,27 +41,11 @@ Item
|
|||||||
right: parent.right
|
right: parent.right
|
||||||
rightMargin: UM.Theme.getSize("wide_margin").width
|
rightMargin: UM.Theme.getSize("wide_margin").width
|
||||||
}
|
}
|
||||||
iconName: "dialog-restart"
|
height: UM.Theme.getSize("toolbox_footer_button").height
|
||||||
|
text: catalog.i18nc("@info:button", "Quit Cura")
|
||||||
onClicked: toolbox.restart()
|
onClicked: toolbox.restart()
|
||||||
style: ButtonStyle
|
|
||||||
{
|
|
||||||
background: Rectangle
|
|
||||||
{
|
|
||||||
implicitWidth: UM.Theme.getSize("toolbox_footer_button").width
|
|
||||||
implicitHeight: Math.floor(UM.Theme.getSize("toolbox_footer_button").height)
|
|
||||||
color: control.hovered ? UM.Theme.getColor("primary_hover") : UM.Theme.getColor("primary")
|
|
||||||
}
|
|
||||||
label: Label
|
|
||||||
{
|
|
||||||
color: UM.Theme.getColor("button_text")
|
|
||||||
font: UM.Theme.getFont("default_bold")
|
|
||||||
text: control.text
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
|
||||||
horizontalAlignment: Text.AlignHCenter
|
|
||||||
renderType: Text.NativeRendering
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolboxShadow
|
ToolboxShadow
|
||||||
{
|
{
|
||||||
visible: footer.visible
|
visible: footer.visible
|
||||||
|
@ -43,7 +43,7 @@ Cura.ExpandablePopup
|
|||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
id: title
|
id: title
|
||||||
text: catalog.i18nc("@button", "View types")
|
text: catalog.i18nc("@label", "View types")
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
height: parent.height
|
height: parent.height
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
|
@ -177,8 +177,8 @@ QtObject
|
|||||||
{
|
{
|
||||||
background: Item
|
background: Item
|
||||||
{
|
{
|
||||||
implicitWidth: Theme.getSize("button").width;
|
implicitWidth: Theme.getSize("button").width
|
||||||
implicitHeight: Theme.getSize("button").height;
|
implicitHeight: Theme.getSize("button").height
|
||||||
|
|
||||||
UM.PointingRectangle
|
UM.PointingRectangle
|
||||||
{
|
{
|
||||||
@ -205,20 +205,20 @@ QtObject
|
|||||||
id: button_tip
|
id: button_tip
|
||||||
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
anchors.verticalCenter: parent.verticalCenter;
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
||||||
text: control.text;
|
text: control.text;
|
||||||
font: Theme.getFont("button_tooltip");
|
font: Theme.getFont("button_tooltip")
|
||||||
color: Theme.getColor("tooltip_text");
|
color: Theme.getColor("tooltip_text")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle
|
Rectangle
|
||||||
{
|
{
|
||||||
id: buttonFace;
|
id: buttonFace
|
||||||
|
|
||||||
anchors.fill: parent;
|
anchors.fill: parent
|
||||||
property bool down: control.pressed || (control.checkable && control.checked);
|
property bool down: control.pressed || (control.checkable && control.checked)
|
||||||
|
|
||||||
color:
|
color:
|
||||||
{
|
{
|
||||||
@ -228,58 +228,22 @@ QtObject
|
|||||||
}
|
}
|
||||||
else if(control.checkable && control.checked && control.hovered)
|
else if(control.checkable && control.checked && control.hovered)
|
||||||
{
|
{
|
||||||
return Theme.getColor("button_active_hover");
|
return Theme.getColor("toolbar_button_active_hover")
|
||||||
}
|
}
|
||||||
else if(control.pressed || (control.checkable && control.checked))
|
else if(control.pressed || (control.checkable && control.checked))
|
||||||
{
|
{
|
||||||
return Theme.getColor("button_active");
|
return Theme.getColor("toolbar_button_active")
|
||||||
}
|
}
|
||||||
else if(control.hovered)
|
else if(control.hovered)
|
||||||
{
|
{
|
||||||
return Theme.getColor("button_hover");
|
return Theme.getColor("toolbar_button_hover")
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return Theme.getColor("button");
|
|
||||||
}
|
}
|
||||||
|
return Theme.getColor("toolbar_background")
|
||||||
}
|
}
|
||||||
Behavior on color { ColorAnimation { duration: 50; } }
|
Behavior on color { ColorAnimation { duration: 50; } }
|
||||||
|
|
||||||
border.width: (control.hasOwnProperty("needBorder") && control.needBorder) ? 2 * screenScaleFactor : 0
|
border.width: (control.hasOwnProperty("needBorder") && control.needBorder) ? Theme.getSize("default_lining").width : 0
|
||||||
border.color: Theme.getColor("tool_button_border")
|
border.color: Theme.getColor("lining")
|
||||||
|
|
||||||
UM.RecolorImage
|
|
||||||
{
|
|
||||||
id: tool_button_arrow
|
|
||||||
anchors.right: parent.right;
|
|
||||||
anchors.rightMargin: Theme.getSize("button").width - Math.round(Theme.getSize("button_icon").width / 4)
|
|
||||||
anchors.bottom: parent.bottom;
|
|
||||||
anchors.bottomMargin: Theme.getSize("button").height - Math.round(Theme.getSize("button_icon").height / 4)
|
|
||||||
width: Theme.getSize("standard_arrow").width
|
|
||||||
height: Theme.getSize("standard_arrow").height
|
|
||||||
sourceSize.height: width
|
|
||||||
visible: control.menu != null;
|
|
||||||
color:
|
|
||||||
{
|
|
||||||
if(control.checkable && control.checked && control.hovered)
|
|
||||||
{
|
|
||||||
return Theme.getColor("button_text_active_hover");
|
|
||||||
}
|
|
||||||
else if(control.pressed || (control.checkable && control.checked))
|
|
||||||
{
|
|
||||||
return Theme.getColor("button_text_active");
|
|
||||||
}
|
|
||||||
else if(control.hovered)
|
|
||||||
{
|
|
||||||
return Theme.getColor("button_text_hover");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return Theme.getColor("button_text");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
source: Theme.getIcon("arrow_bottom")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -287,30 +251,12 @@ QtObject
|
|||||||
{
|
{
|
||||||
UM.RecolorImage
|
UM.RecolorImage
|
||||||
{
|
{
|
||||||
anchors.centerIn: parent;
|
anchors.centerIn: parent
|
||||||
opacity: !control.enabled ? 0.2 : 1.0
|
opacity: control.enabled ? 1.0 : 0.2
|
||||||
source: control.iconSource;
|
source: control.iconSource
|
||||||
width: Theme.getSize("button_icon").width;
|
width: Theme.getSize("button_icon").width
|
||||||
height: Theme.getSize("button_icon").height;
|
height: Theme.getSize("button_icon").height
|
||||||
color:
|
color: Theme.getColor("toolbar_button_text")
|
||||||
{
|
|
||||||
if(control.checkable && control.checked && control.hovered)
|
|
||||||
{
|
|
||||||
return Theme.getColor("button_text_active_hover");
|
|
||||||
}
|
|
||||||
else if(control.pressed || (control.checkable && control.checked))
|
|
||||||
{
|
|
||||||
return Theme.getColor("button_text_active");
|
|
||||||
}
|
|
||||||
else if(control.hovered)
|
|
||||||
{
|
|
||||||
return Theme.getColor("button_text_hover");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return Theme.getColor("button_text");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
sourceSize: Theme.getSize("button_icon")
|
sourceSize: Theme.getSize("button_icon")
|
||||||
}
|
}
|
||||||
|
@ -243,8 +243,6 @@
|
|||||||
"tooltip": [68, 192, 255, 255],
|
"tooltip": [68, 192, 255, 255],
|
||||||
"tooltip_text": [255, 255, 255, 255],
|
"tooltip_text": [255, 255, 255, 255],
|
||||||
|
|
||||||
"tool_button_border": [255, 255, 255, 0],
|
|
||||||
|
|
||||||
"message_background": [255, 255, 255, 255],
|
"message_background": [255, 255, 255, 255],
|
||||||
"message_shadow": [0, 0, 0, 120],
|
"message_shadow": [0, 0, 0, 120],
|
||||||
"message_border": [192, 193, 194, 255],
|
"message_border": [192, 193, 194, 255],
|
||||||
@ -380,7 +378,7 @@
|
|||||||
"machine_selector_widget_content": [25.0, 32.0],
|
"machine_selector_widget_content": [25.0, 32.0],
|
||||||
"machine_selector_icon": [2.66, 2.66],
|
"machine_selector_icon": [2.66, 2.66],
|
||||||
|
|
||||||
"views_selector": [16.0, 4.5],
|
"views_selector": [23.0, 4.0],
|
||||||
|
|
||||||
"printer_type_label": [3.5, 1.5],
|
"printer_type_label": [3.5, 1.5],
|
||||||
|
|
||||||
@ -450,7 +448,7 @@
|
|||||||
"slider_handle": [1.5, 1.5],
|
"slider_handle": [1.5, 1.5],
|
||||||
"slider_layerview_size": [1.0, 26.0],
|
"slider_layerview_size": [1.0, 26.0],
|
||||||
|
|
||||||
"layerview_menu_size": [15, 20],
|
"layerview_menu_size": [16.0, 4.0],
|
||||||
"layerview_legend_size": [1.0, 1.0],
|
"layerview_legend_size": [1.0, 1.0],
|
||||||
"layerview_row": [11.0, 1.5],
|
"layerview_row": [11.0, 1.5],
|
||||||
"layerview_row_spacing": [0.0, 0.5],
|
"layerview_row_spacing": [0.0, 0.5],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user