mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 23:15:52 +08:00
Merge branch '15.10' of https://github.com/Ultimaker/Cura into 15.10
This commit is contained in:
commit
b29f4176a7
@ -373,6 +373,9 @@ UM.MainWindow
|
|||||||
{
|
{
|
||||||
id: viewModeButton
|
id: viewModeButton
|
||||||
property bool verticalTooltip: true
|
property bool verticalTooltip: true
|
||||||
|
property bool activity: Printer.getPlatformActivity;
|
||||||
|
|
||||||
|
enabled: viewModeButton.activity
|
||||||
anchors
|
anchors
|
||||||
{
|
{
|
||||||
top: parent.top;
|
top: parent.top;
|
||||||
@ -389,12 +392,13 @@ UM.MainWindow
|
|||||||
id: viewMenu;
|
id: viewMenu;
|
||||||
Instantiator
|
Instantiator
|
||||||
{
|
{
|
||||||
|
id: viewMenuInstantiator
|
||||||
model: UM.ViewModel { }
|
model: UM.ViewModel { }
|
||||||
MenuItem
|
MenuItem
|
||||||
{
|
{
|
||||||
text: model.name;
|
text: model.name
|
||||||
checkable: true;
|
checkable: true;
|
||||||
checked: model.active;
|
checked: model.active
|
||||||
exclusiveGroup: viewMenuGroup;
|
exclusiveGroup: viewMenuGroup;
|
||||||
onTriggered: UM.Controller.setActiveView(model.id);
|
onTriggered: UM.Controller.setActiveView(model.id);
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,8 @@ Item{
|
|||||||
anchors.top: base.top
|
anchors.top: base.top
|
||||||
width: base.width
|
width: base.width
|
||||||
height: UM.Theme.sizes.sidebar_setup.height
|
height: UM.Theme.sizes.sidebar_setup.height
|
||||||
visible: UM.MachineManager.hasVariants;
|
//visible: UM.MachineManager.hasVariants;
|
||||||
|
visible: true
|
||||||
|
|
||||||
Label{
|
Label{
|
||||||
id: variantLabel
|
id: variantLabel
|
||||||
|
@ -110,6 +110,7 @@ Rectangle {
|
|||||||
implicitWidth: base.width
|
implicitWidth: base.width
|
||||||
implicitHeight: UM.Theme.sizes.sidebar_specs_bar.height
|
implicitHeight: UM.Theme.sizes.sidebar_specs_bar.height
|
||||||
anchors.top: printJobRow.bottom
|
anchors.top: printJobRow.bottom
|
||||||
|
visible: base.progress > 0.99 && base.activity == true
|
||||||
Item{
|
Item{
|
||||||
id: time
|
id: time
|
||||||
width: childrenRect.width;
|
width: childrenRect.width;
|
||||||
@ -193,7 +194,18 @@ Rectangle {
|
|||||||
|
|
||||||
style: ButtonStyle {
|
style: ButtonStyle {
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
color: control.hovered ? UM.Theme.colors.load_save_button_hover : UM.Theme.colors.load_save_button
|
//opacity: control.enabled ? 1.0 : 0.5
|
||||||
|
//Behavior on opacity { NumberAnimation { duration: 50; } }
|
||||||
|
color: {
|
||||||
|
if(!control.enabled){
|
||||||
|
return UM.Theme.colors.button;
|
||||||
|
}
|
||||||
|
else if(control.enabled && control.hovered) {
|
||||||
|
return UM.Theme.colors.load_save_button_hover
|
||||||
|
} else {
|
||||||
|
return UM.Theme.colors.load_save_button
|
||||||
|
}
|
||||||
|
}
|
||||||
Behavior on color { ColorAnimation { duration: 50; } }
|
Behavior on color { ColorAnimation { duration: 50; } }
|
||||||
width: {
|
width: {
|
||||||
var w = 0;
|
var w = 0;
|
||||||
@ -205,17 +217,17 @@ Rectangle {
|
|||||||
saveToButton.resizedWidth = actualLabel.width + (UM.Theme.sizes.default_margin.width * 2)
|
saveToButton.resizedWidth = actualLabel.width + (UM.Theme.sizes.default_margin.width * 2)
|
||||||
w = actualLabel.width + (UM.Theme.sizes.default_margin.width * 2)
|
w = actualLabel.width + (UM.Theme.sizes.default_margin.width * 2)
|
||||||
}
|
}
|
||||||
|
|
||||||
if(w < base.width * 0.55) {
|
if(w < base.width * 0.55) {
|
||||||
w = base.width * 0.55;
|
w = base.width * 0.55;
|
||||||
}
|
}
|
||||||
|
|
||||||
return w;
|
return w;
|
||||||
}
|
}
|
||||||
Label {
|
Label {
|
||||||
id: actualLabel
|
id: actualLabel
|
||||||
|
opacity: control.enabled ? 1.0 : 0.4
|
||||||
|
//Behavior on opacity { NumberAnimation { duration: 50; } }
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
color: UM.Theme.colors.load_save_button_text
|
color: UM.Theme.colors.load_save_button_text
|
||||||
font: UM.Theme.fonts.default
|
font: UM.Theme.fonts.default
|
||||||
text: control.text;
|
text: control.text;
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,7 @@ Item {
|
|||||||
width: buttons.width;
|
width: buttons.width;
|
||||||
height: buttons.height
|
height: buttons.height
|
||||||
property int activeY
|
property int activeY
|
||||||
|
property bool activity: Printer.getPlatformActivity;
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: buttons;
|
id: buttons;
|
||||||
@ -33,6 +34,7 @@ Item {
|
|||||||
|
|
||||||
checkable: true;
|
checkable: true;
|
||||||
checked: model.active;
|
checked: model.active;
|
||||||
|
enabled: base.activity
|
||||||
|
|
||||||
style: UM.Theme.styles.tool_button;
|
style: UM.Theme.styles.tool_button;
|
||||||
|
|
||||||
@ -41,9 +43,10 @@ Item {
|
|||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
onClicked: {
|
onClicked: {
|
||||||
parent.checked ? UM.Controller.setActiveTool(null) : UM.Controller.setActiveTool(model.id);
|
if (base.activity){
|
||||||
base.activeY = parent.y
|
parent.checked ? UM.Controller.setActiveTool(null) : UM.Controller.setActiveTool(model.id);
|
||||||
|
base.activeY = parent.y
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -65,7 +68,14 @@ Item {
|
|||||||
anchors.left: parent.right;
|
anchors.left: parent.right;
|
||||||
y: base.activeY
|
y: base.activeY
|
||||||
|
|
||||||
width: panel.item ? Math.max(panel.width + 2 * UM.Theme.sizes.default_margin.width) : 0;
|
width: {
|
||||||
|
if (panel.item && panel.width > 0){
|
||||||
|
return Math.max(panel.width + 2 * UM.Theme.sizes.default_margin.width)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
}
|
||||||
height: panel.item ? panel.height + 2 * UM.Theme.sizes.default_margin.height : 0;
|
height: panel.item ? panel.height + 2 * UM.Theme.sizes.default_margin.height : 0;
|
||||||
|
|
||||||
opacity: panel.item ? 1 : 0
|
opacity: panel.item ? 1 : 0
|
||||||
|
@ -139,13 +139,10 @@ QtObject {
|
|||||||
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: {
|
||||||
if(!control.enabled) {
|
if(control.checkable && control.checked && control.hovered) {
|
||||||
return UM.Theme.colors.button_disabled;
|
|
||||||
} else if(control.checkable && control.checked && control.hovered) {
|
|
||||||
return UM.Theme.colors.button_active_hover;
|
return UM.Theme.colors.button_active_hover;
|
||||||
} else if(control.pressed || (control.checkable && control.checked)) {
|
} else if(control.pressed || (control.checkable && control.checked)) {
|
||||||
return UM.Theme.colors.button_active;
|
return UM.Theme.colors.button_active;
|
||||||
@ -159,6 +156,7 @@ QtObject {
|
|||||||
|
|
||||||
Label {
|
Label {
|
||||||
id: tool_button_arrow
|
id: tool_button_arrow
|
||||||
|
opacity: !control.enabled ? 0.4 : 1.0
|
||||||
anchors.right: parent.right;
|
anchors.right: parent.right;
|
||||||
anchors.rightMargin: (UM.Theme.sizes.button.width - UM.Theme.sizes.button_icon.width - tool_button_arrow.width) / 2
|
anchors.rightMargin: (UM.Theme.sizes.button.width - UM.Theme.sizes.button_icon.width - tool_button_arrow.width) / 2
|
||||||
anchors.verticalCenter: parent.verticalCenter;
|
anchors.verticalCenter: parent.verticalCenter;
|
||||||
@ -173,7 +171,7 @@ QtObject {
|
|||||||
label: Item {
|
label: Item {
|
||||||
Image {
|
Image {
|
||||||
anchors.centerIn: parent;
|
anchors.centerIn: parent;
|
||||||
|
opacity: !control.enabled ? 0.4 : 1.0
|
||||||
source: control.iconSource;
|
source: control.iconSource;
|
||||||
width: UM.Theme.sizes.button_icon.width;
|
width: UM.Theme.sizes.button_icon.width;
|
||||||
height: UM.Theme.sizes.button_icon.height;
|
height: UM.Theme.sizes.button_icon.height;
|
||||||
|
@ -71,7 +71,7 @@
|
|||||||
"button_active": [32, 166, 219, 255],
|
"button_active": [32, 166, 219, 255],
|
||||||
"button_active_hover": [77, 184, 226, 255],
|
"button_active_hover": [77, 184, 226, 255],
|
||||||
"button_text": [255, 255, 255, 255],
|
"button_text": [255, 255, 255, 255],
|
||||||
"button_disabled": [245, 245, 245, 255],
|
"button_disabled": [0, 0, 0, 255],
|
||||||
"button_tooltip_text": [35, 35, 35, 255],
|
"button_tooltip_text": [35, 35, 35, 255],
|
||||||
|
|
||||||
"toggle_active": [255, 255, 255, 255],
|
"toggle_active": [255, 255, 255, 255],
|
||||||
@ -82,7 +82,8 @@
|
|||||||
"load_save_button": [0, 0, 0, 255],
|
"load_save_button": [0, 0, 0, 255],
|
||||||
"load_save_button_text": [255, 255, 255, 255],
|
"load_save_button_text": [255, 255, 255, 255],
|
||||||
"load_save_button_hover": [43, 45, 46, 255],
|
"load_save_button_hover": [43, 45, 46, 255],
|
||||||
"load_save_button_active": [43, 45, 46, 255],
|
"load_save_button_inactive": [176, 184, 191, 255],
|
||||||
|
"load_save_button_inactive_text": [209, 214, 219, 255],
|
||||||
|
|
||||||
"scrollbar_background": [245, 245, 245, 255],
|
"scrollbar_background": [245, 245, 245, 255],
|
||||||
"scrollbar_handle": [12, 159, 227, 255],
|
"scrollbar_handle": [12, 159, 227, 255],
|
||||||
@ -127,16 +128,6 @@
|
|||||||
|
|
||||||
"tooltip": [255, 225, 146, 255],
|
"tooltip": [255, 225, 146, 255],
|
||||||
|
|
||||||
"save_button_border": [205, 202, 201, 255],
|
|
||||||
"save_button_inactive": [205, 202, 201, 255],
|
|
||||||
"save_button_active": [12, 159, 227, 255],
|
|
||||||
"save_button_active_hover": [34, 150, 190, 255],
|
|
||||||
"save_button_safe_to_text": [255, 255, 255, 255],
|
|
||||||
"save_button_estimated_text": [140, 144, 154, 255],
|
|
||||||
"save_button_estimated_text_background": [255, 255, 255, 255],
|
|
||||||
"save_button_printtime_text": [12, 169, 227, 255],
|
|
||||||
"save_button_background": [249, 249, 249, 255],
|
|
||||||
|
|
||||||
"message_background": [255, 255, 255, 255],
|
"message_background": [255, 255, 255, 255],
|
||||||
"message_text": [32, 166, 219, 255],
|
"message_text": [32, 166, 219, 255],
|
||||||
"message_dismiss": [139, 143, 153, 255],
|
"message_dismiss": [139, 143, 153, 255],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user