Remove "specs" from Save Button

Restyle Save Button
Tweak Simple mode
This commit is contained in:
fieldOfView 2015-11-12 08:16:34 +01:00
parent 64bd41e611
commit 211b45d9fb
5 changed files with 71 additions and 62 deletions

View File

@ -14,7 +14,7 @@ Rectangle {
property real progress: UM.Backend.progress; property real progress: UM.Backend.progress;
property bool activity: Printer.getPlatformActivity; property bool activity: Printer.getPlatformActivity;
Behavior on progress { NumberAnimation { duration: 250; } } Behavior on progress { NumberAnimation { duration: 250; } }
property int totalHeight: childrenRect.height property int totalHeight: childrenRect.height + UM.Theme.sizes.default_margin.height*1.5
property string fileBaseName property string fileBaseName
property variant activeMachineInstance: UM.MachineManager.activeMachineInstance property variant activeMachineInstance: UM.MachineManager.activeMachineInstance
@ -48,7 +48,7 @@ Rectangle {
} }
} }
} }
printJobTextfield.text = abbrMachine + '_' + base.fileBaseName //printJobTextfield.text = abbrMachine + '_' + base.fileBaseName
} }
Connections { Connections {
@ -67,7 +67,7 @@ Rectangle {
base.createFileName() base.createFileName()
} }
} }
/*
Rectangle{ Rectangle{
id: printJobRow id: printJobRow
implicitWidth: base.width; implicitWidth: base.width;
@ -179,12 +179,13 @@ Rectangle {
} }
} }
} }
*/
Rectangle{ Rectangle{
id: saveRow id: saveRow
width: base.width width: base.width
height: saveToButton.height + (UM.Theme.sizes.default_margin.height / 2) // height + bottomMargin height: saveToButton.height + (UM.Theme.sizes.default_margin.height / 2) // height + bottomMargin
anchors.top: specsRow.bottom anchors.top: parent.top
anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.left: parent.left anchors.left: parent.left
Button { Button {
@ -206,16 +207,12 @@ Rectangle {
background: Rectangle { background: Rectangle {
//opacity: control.enabled ? 1.0 : 0.5 //opacity: control.enabled ? 1.0 : 0.5
//Behavior on opacity { NumberAnimation { duration: 50; } } //Behavior on opacity { NumberAnimation { duration: 50; } }
color: { border.color: !control.enabled ? UM.Theme.colors.action_button_disabled_border :
if(!control.enabled){ control.pressed ? UM.Theme.colors.action_button_active_border :
return UM.Theme.colors.button; control.hovered ? UM.Theme.colors.action_button_hovered_border : UM.Theme.colors.action_button_border
} color: !control.enabled ? UM.Theme.colors.action_button_disabled :
else if(control.enabled && control.hovered) { control.pressed ? UM.Theme.colors.action_button_active :
return UM.Theme.colors.load_save_button_hover control.hovered ? UM.Theme.colors.action_button_hovered : UM.Theme.colors.action_button
} 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;
@ -234,10 +231,11 @@ Rectangle {
} }
Label { Label {
id: actualLabel id: actualLabel
opacity: control.enabled ? 1.0 : 0.4
//Behavior on opacity { NumberAnimation { duration: 50; } } //Behavior on opacity { NumberAnimation { duration: 50; } }
anchors.centerIn: parent anchors.centerIn: parent
color: UM.Theme.colors.load_save_button_text color: !control.enabled ? UM.Theme.colors.action_button_disabled_text :
control.pressed ? UM.Theme.colors.action_button_active_text :
control.hovered ? UM.Theme.colors.action_button_hovered_text : UM.Theme.colors.action_button_text
font: UM.Theme.fonts.default font: UM.Theme.fonts.default
text: control.text; text: control.text;
} }
@ -260,16 +258,12 @@ Rectangle {
style: ButtonStyle { style: ButtonStyle {
background: Rectangle { background: Rectangle {
id: deviceSelectionIcon id: deviceSelectionIcon
color: { border.color: !control.enabled ? UM.Theme.colors.action_button_disabled_border :
if(!control.enabled){ control.pressed ? UM.Theme.colors.action_button_active_border :
return UM.Theme.colors.button; control.hovered ? UM.Theme.colors.action_button_hovered_border : UM.Theme.colors.action_button_border
} color: !control.enabled ? UM.Theme.colors.action_button_disabled :
else if(control.enabled && control.hovered) { control.pressed ? UM.Theme.colors.action_button_active :
return UM.Theme.colors.load_save_button_hover control.hovered ? UM.Theme.colors.action_button_hovered : UM.Theme.colors.action_button
} else {
return UM.Theme.colors.load_save_button
}
}
Behavior on color { ColorAnimation { duration: 50; } } Behavior on color { ColorAnimation { duration: 50; } }
anchors.left: parent.left anchors.left: parent.left
anchors.leftMargin: UM.Theme.sizes.save_button_text_margin.width / 2; anchors.leftMargin: UM.Theme.sizes.save_button_text_margin.width / 2;
@ -282,9 +276,11 @@ Rectangle {
width: UM.Theme.sizes.standard_arrow.width width: UM.Theme.sizes.standard_arrow.width
height: UM.Theme.sizes.standard_arrow.height height: UM.Theme.sizes.standard_arrow.height
sourceSize.width: width sourceSize.width: width
sourceSize.height: width sourceSize.height: height
color: UM.Theme.colors.load_save_button_text color: !control.enabled ? UM.Theme.colors.action_button_disabled_text :
source: UM.Theme.icons.arrow_bottom control.pressed ? UM.Theme.colors.action_button_active_text :
control.hovered ? UM.Theme.colors.action_button_hovered_text : UM.Theme.colors.action_button_text;
source: UM.Theme.icons.arrow_bottom;
} }
} }
label: Label{ } label: Label{ }

View File

@ -55,7 +55,8 @@ Rectangle
ProfileSetup { ProfileSetup {
id: profileItem id: profileItem
manageProfilesAction: base.manageProfilesAction manageProfilesAction: base.manageProfilesAction
anchors.top: header.bottom anchors.top: settingsModeSelection.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
width: parent.width width: parent.width
height: totalHeightProfileSetup height: totalHeightProfileSetup
} }
@ -76,13 +77,13 @@ Rectangle
Label { Label {
id: settingsModeLabel id: settingsModeLabel
text: catalog.i18nc("@label:listbox","Print Setup:"); text: catalog.i18nc("@label:listbox","Setup");
anchors.left: parent.left anchors.left: parent.left
anchors.leftMargin: UM.Theme.sizes.default_margin.width; anchors.leftMargin: UM.Theme.sizes.default_margin.width;
anchors.top: profileItem.bottom anchors.top: header.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height anchors.topMargin: UM.Theme.sizes.default_margin.height
width: parent.width/100*45 width: parent.width/100*45
font: UM.Theme.fonts.default; font: UM.Theme.fonts.large;
color: UM.Theme.colors.text color: UM.Theme.colors.text
} }
@ -92,7 +93,7 @@ Rectangle
height: UM.Theme.sizes.sidebar_header_mode_toggle.height height: UM.Theme.sizes.sidebar_header_mode_toggle.height
anchors.right: parent.right anchors.right: parent.right
anchors.rightMargin: UM.Theme.sizes.default_margin.width anchors.rightMargin: UM.Theme.sizes.default_margin.width
anchors.top: profileItem.bottom anchors.top: header.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height anchors.topMargin: UM.Theme.sizes.default_margin.height
Component{ Component{
id: wizardDelegate id: wizardDelegate
@ -145,7 +146,7 @@ Rectangle
{ {
id: sidebarContents; id: sidebarContents;
anchors.bottom: saveButton.top anchors.bottom: saveButton.top
anchors.top: settingsModeSelection.bottom anchors.top: profileItem.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.left: base.left anchors.left: base.left
anchors.right: base.right anchors.right: base.right

View File

@ -25,7 +25,7 @@ Item
id: infillCellLeft id: infillCellLeft
anchors.top: parent.top anchors.top: parent.top
anchors.left: parent.left anchors.left: parent.left
width: base.width/100* 55 - UM.Theme.sizes.default_margin.width width: base.width/100* 45 - UM.Theme.sizes.default_margin.width
height: childrenRect.height < UM.Theme.sizes.simple_mode_infill_caption.height ? UM.Theme.sizes.simple_mode_infill_caption.height : childrenRect.height height: childrenRect.height < UM.Theme.sizes.simple_mode_infill_caption.height ? UM.Theme.sizes.simple_mode_infill_caption.height : childrenRect.height
Label{ Label{
@ -56,12 +56,14 @@ Item
id: infillCellRight id: infillCellRight
height: childrenRect.height; height: childrenRect.height;
width: base.width / 100 * 45 width: base.width / 100 * 55
spacing: 12
anchors.right: parent.right anchors.right: parent.right
anchors.rightMargin: UM.Theme.sizes.default_margin.width - (UM.Theme.sizes.default_margin.width/4) anchors.rightMargin: UM.Theme.sizes.default_margin.width - (UM.Theme.sizes.default_margin.width/4)
anchors.top: parent.top anchors.top: parent.top
anchors.topMargin: UM.Theme.sizes.default_margin.height anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.fill: width
Repeater { Repeater {
id: infillListView id: infillListView

View File

@ -407,13 +407,16 @@ QtObject {
border.width: 1 border.width: 1
border.color: UM.Theme.colors.checkbox_border; border.color: UM.Theme.colors.checkbox_border;
Label { UM.RecolorImage {
anchors.centerIn: parent; anchors.verticalCenter: parent.verticalCenter
color: UM.Theme.colors.checkbox_mark; anchors.horizontalCenter: parent.horizontalCenter
width: parent.width/2.5
text: "✓"; height: parent.height/2.5
sourceSize.width: width
opacity: control.checked ? 1 : 0; sourceSize.height: width
color: UM.Theme.colors.checkbox_mark
source: UM.Theme.icons.check
opacity: control.checked
Behavior on opacity { NumberAnimation { duration: 100; } } Behavior on opacity { NumberAnimation { duration: 100; } }
} }
} }

View File

@ -57,7 +57,7 @@
"primary": [12, 169, 227, 255], "primary": [12, 169, 227, 255],
"primary_hover": [34, 150, 190, 255], "primary_hover": [34, 150, 190, 255],
"primary_text": [255, 255, 255, 255], "primary_text": [255, 255, 255, 255],
"border": [205, 202, 201, 255], "border": [127, 127, 127, 255],
"secondary": [205, 202, 201, 255], "secondary": [205, 202, 201, 255],
"text": [24, 41, 77, 255], "text": [24, 41, 77, 255],
@ -91,11 +91,18 @@
"toggle_active_border": [32, 166, 219, 255], "toggle_active_border": [32, 166, 219, 255],
"toggle_active_text": [255, 255, 255, 255], "toggle_active_text": [255, 255, 255, 255],
"load_save_button": [0, 0, 0, 255], "action_button": [255, 255, 255, 255],
"load_save_button_text": [255, 255, 255, 255], "action_button_text": [24, 41, 77, 255],
"load_save_button_hover": [43, 45, 46, 255], "action_button_border": [127, 127, 127, 255],
"load_save_button_inactive": [176, 184, 191, 255], "action_button_hovered": [255, 255, 255, 255],
"load_save_button_inactive_text": [209, 214, 219, 255], "action_button_hovered_text": [24, 41, 77, 255],
"action_button_hovered_border": [12, 169, 227, 255],
"action_button_active": [12, 169, 227, 255],
"action_button_active_text": [255, 255, 255, 255],
"action_button_active_border": [12, 169, 227, 255],
"action_button_disabled": [245, 245, 245, 255],
"action_button_disabled_text": [127, 127, 127, 255],
"action_button_disabled_border": [127, 127, 127, 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],
@ -111,19 +118,19 @@
"setting_control": [255, 255, 255, 255], "setting_control": [255, 255, 255, 255],
"setting_control_highlight": [245, 245, 245, 255], "setting_control_highlight": [245, 245, 245, 255],
"setting_control_border": [174, 174, 174, 255], "setting_control_border": [127, 127, 127, 255],
"setting_control_text": [0, 0, 0, 255], "setting_control_text": [24,41,77, 255],
"setting_control_depth_line": [162, 192, 227, 255], "setting_control_depth_line": [162, 192, 227, 255],
"setting_control_hover": [139, 143, 153, 255], "setting_control_hover": [139, 143, 153, 255],
"setting_control_selected": [35, 35, 35, 255], "setting_control_selected": [35, 35, 35, 255],
"setting_control_revert": [85, 85, 85, 255], "setting_control_revert": [127, 127, 127, 255],
"setting_unit": [174, 174, 174, 255], "setting_unit": [174, 174, 174, 255],
"setting_validation_error": [255, 57, 14, 255], "setting_validation_error": [255, 57, 14, 255],
"setting_validation_warning": [255, 186, 15, 255], "setting_validation_warning": [255, 186, 15, 255],
"setting_validation_ok": [255, 255, 255, 255], "setting_validation_ok": [255, 255, 255, 255],
"progressbar_background": [208, 210, 211, 255], "progressbar_background": [245, 245, 245, 255],
"progressbar_control": [12, 169, 227, 255], "progressbar_control": [24, 41, 77, 255],
"slider_groove": [245, 245, 245, 255], "slider_groove": [245, 245, 245, 255],
"slider_groove_border": [139, 143, 153, 255], "slider_groove_border": [139, 143, 153, 255],
@ -134,9 +141,9 @@
"checkbox": [255, 255, 255, 255], "checkbox": [255, 255, 255, 255],
"checkbox_hover": [245, 245, 245, 255], "checkbox_hover": [245, 245, 245, 255],
"checkbox_border": [174, 174, 174, 255], "checkbox_border": [127, 127, 127, 255],
"checkbox_mark": [35, 35, 35, 255], "checkbox_mark": [24, 41, 77, 255],
"checkbox_text": [0, 0, 0, 255], "checkbox_text": [24, 41, 77, 255],
"tooltip": [255, 225, 146, 255], "tooltip": [255, 225, 146, 255],
@ -153,12 +160,12 @@
"sizes": { "sizes": {
"window_margin": [1.0, 1.0], "window_margin": [1.0, 1.0],
"default_margin": [1.0, 1.0], "default_margin": [1.0, 1.0],
"default_lining": [0.1, 0.1], "default_lining": [0.25, 0.25],
"logo": [9.5, 2.0], "logo": [9.5, 2.0],
"sidebar": [30.0, 10.0], "sidebar": [30.0, 10.0],
"sidebar_header": [0.0, 4.0], "sidebar_header": [0.0, 4.0],
"sidebar_header_mode_toggle": [0.0, 2.4], "sidebar_header_mode_toggle": [0.0, 2.0],
"sidebar_setup": [0.0, 2.6], "sidebar_setup": [0.0, 2.6],
"sidebar_subParts": [0.0, 2.4], "sidebar_subParts": [0.0, 2.4],
"sidebar_specs_bar": [0.0, 2.2], "sidebar_specs_bar": [0.0, 2.2],
@ -199,7 +206,7 @@
"slider_layerview_background_extension": [0.0, 2.2], "slider_layerview_background_extension": [0.0, 2.2],
"slider_layerview_margin": [3.0, 3.0], "slider_layerview_margin": [3.0, 3.0],
"checkbox": [1.5, 1.5], "checkbox": [2.0, 2.0],
"tooltip": [20.0, 10.0], "tooltip": [20.0, 10.0],
"tooltip_margins": [1.0, 1.0], "tooltip_margins": [1.0, 1.0],