mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 15:35:54 +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
|
||||
property bool verticalTooltip: true
|
||||
property bool activity: Printer.getPlatformActivity;
|
||||
|
||||
enabled: viewModeButton.activity
|
||||
anchors
|
||||
{
|
||||
top: parent.top;
|
||||
@ -389,12 +392,13 @@ UM.MainWindow
|
||||
id: viewMenu;
|
||||
Instantiator
|
||||
{
|
||||
id: viewMenuInstantiator
|
||||
model: UM.ViewModel { }
|
||||
MenuItem
|
||||
{
|
||||
text: model.name;
|
||||
text: model.name
|
||||
checkable: true;
|
||||
checked: model.active;
|
||||
checked: model.active
|
||||
exclusiveGroup: viewMenuGroup;
|
||||
onTriggered: UM.Controller.setActiveView(model.id);
|
||||
}
|
||||
|
@ -19,7 +19,8 @@ Item{
|
||||
anchors.top: base.top
|
||||
width: base.width
|
||||
height: UM.Theme.sizes.sidebar_setup.height
|
||||
visible: UM.MachineManager.hasVariants;
|
||||
//visible: UM.MachineManager.hasVariants;
|
||||
visible: true
|
||||
|
||||
Label{
|
||||
id: variantLabel
|
||||
|
@ -110,6 +110,7 @@ Rectangle {
|
||||
implicitWidth: base.width
|
||||
implicitHeight: UM.Theme.sizes.sidebar_specs_bar.height
|
||||
anchors.top: printJobRow.bottom
|
||||
visible: base.progress > 0.99 && base.activity == true
|
||||
Item{
|
||||
id: time
|
||||
width: childrenRect.width;
|
||||
@ -193,7 +194,18 @@ Rectangle {
|
||||
|
||||
style: ButtonStyle {
|
||||
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; } }
|
||||
width: {
|
||||
var w = 0;
|
||||
@ -205,17 +217,17 @@ Rectangle {
|
||||
saveToButton.resizedWidth = 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) {
|
||||
w = base.width * 0.55;
|
||||
}
|
||||
|
||||
return w;
|
||||
}
|
||||
Label {
|
||||
id: actualLabel
|
||||
opacity: control.enabled ? 1.0 : 0.4
|
||||
//Behavior on opacity { NumberAnimation { duration: 50; } }
|
||||
anchors.centerIn: parent
|
||||
color: UM.Theme.colors.load_save_button_text
|
||||
color: UM.Theme.colors.load_save_button_text
|
||||
font: UM.Theme.fonts.default
|
||||
text: control.text;
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ Item {
|
||||
width: buttons.width;
|
||||
height: buttons.height
|
||||
property int activeY
|
||||
property bool activity: Printer.getPlatformActivity;
|
||||
|
||||
ColumnLayout {
|
||||
id: buttons;
|
||||
@ -33,6 +34,7 @@ Item {
|
||||
|
||||
checkable: true;
|
||||
checked: model.active;
|
||||
enabled: base.activity
|
||||
|
||||
style: UM.Theme.styles.tool_button;
|
||||
|
||||
@ -41,9 +43,10 @@ Item {
|
||||
MouseArea {
|
||||
anchors.fill: parent;
|
||||
onClicked: {
|
||||
parent.checked ? UM.Controller.setActiveTool(null) : UM.Controller.setActiveTool(model.id);
|
||||
base.activeY = parent.y
|
||||
|
||||
if (base.activity){
|
||||
parent.checked ? UM.Controller.setActiveTool(null) : UM.Controller.setActiveTool(model.id);
|
||||
base.activeY = parent.y
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -65,7 +68,14 @@ Item {
|
||||
anchors.left: parent.right;
|
||||
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;
|
||||
|
||||
opacity: panel.item ? 1 : 0
|
||||
|
@ -139,13 +139,10 @@ QtObject {
|
||||
id: buttonFace;
|
||||
|
||||
anchors.fill: parent;
|
||||
|
||||
property bool down: control.pressed || (control.checkable && control.checked);
|
||||
|
||||
color: {
|
||||
if(!control.enabled) {
|
||||
return UM.Theme.colors.button_disabled;
|
||||
} else if(control.checkable && control.checked && control.hovered) {
|
||||
if(control.checkable && control.checked && control.hovered) {
|
||||
return UM.Theme.colors.button_active_hover;
|
||||
} else if(control.pressed || (control.checkable && control.checked)) {
|
||||
return UM.Theme.colors.button_active;
|
||||
@ -159,6 +156,7 @@ QtObject {
|
||||
|
||||
Label {
|
||||
id: tool_button_arrow
|
||||
opacity: !control.enabled ? 0.4 : 1.0
|
||||
anchors.right: parent.right;
|
||||
anchors.rightMargin: (UM.Theme.sizes.button.width - UM.Theme.sizes.button_icon.width - tool_button_arrow.width) / 2
|
||||
anchors.verticalCenter: parent.verticalCenter;
|
||||
@ -173,7 +171,7 @@ QtObject {
|
||||
label: Item {
|
||||
Image {
|
||||
anchors.centerIn: parent;
|
||||
|
||||
opacity: !control.enabled ? 0.4 : 1.0
|
||||
source: control.iconSource;
|
||||
width: UM.Theme.sizes.button_icon.width;
|
||||
height: UM.Theme.sizes.button_icon.height;
|
||||
|
@ -71,7 +71,7 @@
|
||||
"button_active": [32, 166, 219, 255],
|
||||
"button_active_hover": [77, 184, 226, 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],
|
||||
|
||||
"toggle_active": [255, 255, 255, 255],
|
||||
@ -82,7 +82,8 @@
|
||||
"load_save_button": [0, 0, 0, 255],
|
||||
"load_save_button_text": [255, 255, 255, 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_handle": [12, 159, 227, 255],
|
||||
@ -127,16 +128,6 @@
|
||||
|
||||
"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_text": [32, 166, 219, 255],
|
||||
"message_dismiss": [139, 143, 153, 255],
|
||||
|
Loading…
x
Reference in New Issue
Block a user