This commit is contained in:
Tim Kuipers 2015-08-24 12:05:49 +02:00
commit 7f15505f01
48 changed files with 783 additions and 314 deletions

View file

@ -40,10 +40,18 @@ Item {
property alias reportBug: reportBugAction;
property alias about: aboutAction;
property alias toggleFullScreen: toggleFullScreenAction;
Action
{
id:toggleFullScreenAction
shortcut: StandardKey.FullScreen;
}
Action {
id: undoAction;
//: Undo action
text: qsTr("&Undo");
text: qsTr("Undo");
iconName: "edit-undo";
shortcut: StandardKey.Undo;
}
@ -51,7 +59,7 @@ Item {
Action {
id: redoAction;
//: Redo action
text: qsTr("&Redo");
text: qsTr("Redo");
iconName: "edit-redo";
shortcut: StandardKey.Redo;
}
@ -59,7 +67,7 @@ Item {
Action {
id: quitAction;
//: Quit action
text: qsTr("&Quit");
text: qsTr("Quit");
iconName: "application-exit";
shortcut: StandardKey.Quit;
}
@ -67,20 +75,20 @@ Item {
Action {
id: preferencesAction;
//: Preferences action
text: qsTr("&Preferences...");
text: qsTr("Preferences...");
iconName: "configure";
}
Action {
id: addMachineAction;
//: Add Printer action
text: qsTr("&Add Printer...");
text: qsTr("Add Printer...");
}
Action {
id: settingsAction;
//: Configure Printers action
text: qsTr("&Configure Printers");
text: qsTr("Configure Printers");
iconName: "configure";
}
@ -102,7 +110,7 @@ Item {
Action {
id: aboutAction;
//: About action
text: qsTr("&About...");
text: qsTr("About...");
iconName: "help-about";
}
@ -190,7 +198,7 @@ Item {
Action {
id: openAction;
//: Open file action
text: qsTr("&Open...");
text: qsTr("Load file");
iconName: "document-open";
shortcut: StandardKey.Open;
}
@ -198,7 +206,7 @@ Item {
Action {
id: saveAction;
//: Save file action
text: qsTr("&Save...");
text: qsTr("Save...");
iconName: "document-save";
shortcut: StandardKey.Save;
}

View file

@ -12,7 +12,6 @@ import UM 1.1 as UM
UM.MainWindow {
id: base
visible: true
//: Cura application window title
title: qsTr("Cura");
@ -212,10 +211,8 @@ UM.MainWindow {
UM.MessageStack {
anchors {
left: toolbar.right;
leftMargin: UM.Theme.sizes.window_margin.width;
right: sidebar.left;
rightMargin: UM.Theme.sizes.window_margin.width;
horizontalCenter: parent.horizontalCenter
horizontalCenterOffset: -(UM.Theme.sizes.logo.width/ 2)
top: parent.verticalCenter;
bottom: parent.bottom;
}
@ -242,17 +239,15 @@ UM.MainWindow {
Button {
id: openFileButton;
iconSource: UM.Theme.icons.open;
style: UM.Backend.progress < 0 ? UM.Theme.styles.open_file_button : UM.Theme.styles.tool_button;
//style: UM.Backend.progress < 0 ? UM.Theme.styles.open_file_button : UM.Theme.styles.tool_button;
style: UM.Theme.styles.open_file_button
tooltip: '';
anchors {
top: parent.top;
topMargin: UM.Theme.sizes.window_margin.height;
topMargin: UM.Theme.sizes.loadfile_margin.height
left: parent.left;
leftMargin: UM.Theme.sizes.window_margin.width;
leftMargin: UM.Theme.sizes.loadfile_margin.width
}
action: actions.open;
}
@ -349,8 +344,15 @@ UM.MainWindow {
id: preferences
Component.onCompleted: {
//; Remove & re-add the general page as we want to use our own instead of uranium standard.
removePage(0);
insertPage(0, qsTr("General") , "" , Qt.resolvedUrl("./GeneralPage.qml"));
//: View preferences page title
insertPage(1, qsTr("View"), "view-preview", Qt.resolvedUrl("./ViewPage.qml"));
//Force refresh
setPage(0)
}
}
@ -423,6 +425,8 @@ UM.MainWindow {
reportBug.onTriggered: CuraActions.openBugReportPage();
showEngineLog.onTriggered: engineLog.visible = true;
about.onTriggered: aboutDialog.visible = true;
toggleFullScreen.onTriggered: base.toggleFullscreen()
}
Menu {
@ -481,7 +485,6 @@ UM.MainWindow {
onAccepted:
{
UM.MeshFileHandler.readLocalFile(fileUrl)
Printer.setPlatformActivity(true)
}
}

View file

@ -0,0 +1,130 @@
// Copyright (c) 2015 Ultimaker B.V.
// Uranium is released under the terms of the AGPLv3 or higher.
import QtQuick 2.1
import QtQuick.Controls 1.1
import QtQuick.Layouts 1.1
import QtQuick.Controls.Styles 1.1
import UM 1.0 as UM
UM.PreferencesPage
{
//: General configuration page title
title: qsTr("General");
function reset()
{
UM.Preferences.resetPreference("general/language")
UM.Preferences.resetPreference("physics/automatic_push_free")
}
GridLayout
{
columns: 2;
//: Language selection label
Label
{
id: languageLabel
text: qsTr("Language")
}
ComboBox
{
id: languageComboBox
model: ListModel
{
id: languageList
//: English language combo box option
ListElement { text: QT_TR_NOOP("English"); code: "en" }
//: German language combo box option
ListElement { text: QT_TR_NOOP("German"); code: "de" }
//: French language combo box option
// ListElement { text: QT_TR_NOOP("French"); code: "fr" }
//: Spanish language combo box option
ListElement { text: QT_TR_NOOP("Spanish"); code: "es" }
//: Italian language combo box option
// ListElement { text: QT_TR_NOOP("Italian"); code: "it" }
//: Finnish language combo box option
ListElement { text: QT_TR_NOOP("Finnish"); code: "fi" }
//: Russian language combo box option
ListElement { text: QT_TR_NOOP("Russian"); code: "ru" }
}
currentIndex:
{
var code = UM.Preferences.getValue("general/language");
for(var i = 0; i < languageList.count; ++i)
{
if(model.get(i).code == code)
{
return i
}
}
}
onActivated: UM.Preferences.setValue("general/language", model.get(index).code)
anchors.left: languageLabel.right
anchors.top: languageLabel.top
anchors.leftMargin: 20
Component.onCompleted:
{
// Because ListModel is stupid and does not allow using qsTr() for values.
for(var i = 0; i < languageList.count; ++i)
{
languageList.setProperty(i, "text", qsTr(languageList.get(i).text));
}
// Glorious hack time. ComboBox does not update the text properly after changing the
// model. So change the indices around to force it to update.
currentIndex += 1;
currentIndex -= 1;
}
}
Label
{
id: languageCaption;
Layout.columnSpan: 2
//: Language change warning
text: qsTr("You will need to restart the application for language changes to have effect.")
wrapMode: Text.WordWrap
font.italic: true
}
CheckBox
{
id: pushFreeCheckbox
checked: UM.Preferences.getValue("physics/automatic_push_free")
onCheckedChanged: UM.Preferences.setValue("physics/automatic_push_free", checked)
}
Button
{
id: pushFreeText //is a button so the user doesn't have te click inconvenientley precise to enable or disable the checkbox
//: Display Overhang preference checkbox
text: qsTr("Automatic push free");
onClicked: pushFreeCheckbox.checked = !pushFreeCheckbox.checked
//: Display Overhang preference tooltip
tooltip: "Are objects on the platform automatically moved so they no longer intersect"
style: ButtonStyle
{
background: Rectangle
{
border.width: 0
color: "transparent"
}
label: Text
{
renderType: Text.NativeRendering
horizontalAlignment: Text.AlignLeft
text: control.text
}
}
}
Item { Layout.fillHeight: true; Layout.columnSpan: 2 }
}
}

View file

@ -19,7 +19,7 @@ Item {
anchors.bottom: parent.bottom;
anchors.left: parent.left;
spacing: 1
spacing: UM.Theme.sizes.default_lining.width
Repeater {
id: repeat
@ -67,6 +67,8 @@ Item {
Behavior on opacity { NumberAnimation { duration: 100 } }
color: UM.Theme.colors.tool_panel_background;
border.width: UM.Theme.sizes.default_lining.width
border.color: UM.Theme.colors.button_lining
Loader {
id: panel

View file

@ -8,7 +8,8 @@ import QtQuick.Controls.Styles 1.1
import UM 1.0 as UM
UM.PreferencesPage {
UM.PreferencesPage
{
id: preferencesPage
//: View configuration page title
@ -17,22 +18,26 @@ UM.PreferencesPage {
function reset()
{
UM.Preferences.resetPreference("view/show_overhang");
UM.Preferences.resetPreferences("view/center_on_select");
}
GridLayout {
GridLayout
{
columns: 2;
CheckBox {
id: viewCheckbox
CheckBox
{
id: overhangCheckbox
checked: UM.Preferences.getValue("view/show_overhang")
onCheckedChanged: UM.Preferences.setValue("view/show_overhang", checked)
}
Button {
Button
{
id: viewText //is a button so the user doesn't have te click inconvenientley precise to enable or disable the checkbox
//: Display Overhang preference checkbox
text: qsTr("Display Overhang");
onClicked: viewCheckbox.checked = !viewCheckbox.checked
onClicked: overhangCheckbox.checked = !overhangCheckbox.checked
//: Display Overhang preference tooltip
tooltip: "Highlight unsupported areas of the model in red. Without support these areas will nog print properly."
@ -49,6 +54,39 @@ UM.PreferencesPage {
}
}
}
CheckBox
{
id: centerCheckbox
checked: UM.Preferences.getValue("view/center_on_select")
onCheckedChanged: UM.Preferences.setValue("view/center_on_select", checked)
}
Button
{
id: centerText //is a button so the user doesn't have te click inconvenientley precise to enable or disable the checkbox
//: Display Overhang preference checkbox
text: qsTr("Center camera when item is selected");
onClicked: centerCheckbox.checked = !centerCheckbox.checked
//: Display Overhang preference tooltip
tooltip: "Moves the camera so the object is in the center of the view when an object is selected"
style: ButtonStyle
{
background: Rectangle
{
border.width: 0
color: "transparent"
}
label: Text
{
renderType: Text.NativeRendering
horizontalAlignment: Text.AlignLeft
text: control.text
}
}
}
Item { Layout.fillHeight: true; Layout.columnSpan: 2 }
}
}

View file

@ -252,6 +252,10 @@ ColumnLayout
UM.Models.availableMachinesModel.createMachine(machineList.currentIndex, machineName.text)
var pages = UM.Models.availableMachinesModel.getItem(machineList.currentIndex).pages
var old_page_count = elementRoot.getPageCount()
for(var i = 0; i < UM.Models.count; i++)
{
print(UM.Models.getItem(i))
}
// Delete old pages (if any)
for (var i = old_page_count - 1; i > 0; i--)
{

View file

@ -8,62 +8,47 @@ import QtQuick.Window 2.1
import UM 1.0 as UM
ColumnLayout {
Column
{
id: wizardPage
property string title
property int pageWidth
property int pageHeight
SystemPalette{id: palette}
//signal openFile(string fileName)
//signal closeWizard()
width: wizardPage.pageWidth
height: wizardPage.pageHeight
Connections {
target: elementRoot
onResize: {
wizardPage.width = pageWidth
wizardPage.height = pageHeight
}
property int leveling_state: 0
property bool three_point_leveling: true
property int platform_width: UM.Models.settingsModel.getMachineSetting("machine_width")
property int platform_height: UM.Models.settingsModel.getMachineSetting("machine_depth")
anchors.fill: parent;
property variant printer_connection: UM.USBPrinterManager.connectedPrinterList.getItem(0).printer
Component.onCompleted: printer_connection.homeHead()
Label
{
text: ""
//Component.onCompleted:console.log(UM.Models.settingsModel.getMachineSetting("machine_width"))
}
Label {
text: parent.title
font.pointSize: 18;
}
Label {
//: Add Printer wizard page description
text: qsTr("Please select the type of printer:");
}
ScrollView {
Layout.fillWidth: true;
ListView {
id: machineList;
model: UM.Models.availableMachinesModel
delegate: RadioButton {
exclusiveGroup: printerGroup;
text: model.name;
onClicked: {
ListView.view.currentIndex = index;
}
Button
{
text: "Move to next position"
onClicked:
{
if(wizardPage.leveling_state == 0)
{
printer_connection.moveHead(platform_width /2 , platform_height,0)
}
if(wizardPage.leveling_state == 1)
{
printer_connection.moveHead(platform_width , 0,0)
}
if(wizardPage.leveling_state == 2)
{
printer_connection.moveHead(0, 0 ,0)
}
wizardPage.leveling_state++
}
}
Label {
//: Add Printer wizard field label
text: qsTr("Printer Name:");
function threePointLeveling(width, height)
{
}
TextField { id: machineName; Layout.fillWidth: true; text: machineList.model.getItem(machineList.currentIndex).name }
Item { Layout.fillWidth: true; Layout.fillHeight: true; }
ExclusiveGroup { id: printerGroup; }
}

View file

@ -13,6 +13,16 @@ Column
id: wizardPage
property string title
anchors.fill: parent;
property bool x_min_pressed: false
property bool y_min_pressed: false
property bool z_min_pressed: false
property bool heater_works: false
property int extruder_target_temp: 0
property int bed_target_temp: 0
property variant printer_connection: UM.USBPrinterManager.connectedPrinterList.getItem(0).printer
Component.onCompleted: printer_connection.startPollEndstop()
Component.onDestruction: printer_connection.stopPollEndstop()
Label
{
@ -23,44 +33,144 @@ Column
Label
{
//: Add Printer wizard page description
text: qsTr("Please select the type of printer:");
text: qsTr("It's a good idea to do a few sanity checks on your Ultimaker. \n You can skip these if you know your machine is functional");
}
ScrollView
Row
{
height: parent.height - 50
width: parent.width
ListView
Label
{
id: machineList;
model: UM.Models.availableMachinesModel
delegate: RadioButton
{
exclusiveGroup: printerGroup;
text: model.name;
onClicked:
{
ListView.view.currentIndex = index;
}
}
text: qsTr("Connection: ")
}
Label
{
text: UM.USBPrinterManager.connectedPrinterList.count ? "Done":"Incomplete"
}
}
Row
{
Label
{
text: qsTr("Min endstop X: ")
}
Label
{
text: x_min_pressed ? qsTr("Works") : qsTr("Not checked")
}
}
Row
{
Label
{
text: qsTr("Min endstop Y: ")
}
Label
{
text: y_min_pressed ? qsTr("Works") : qsTr("Not checked")
}
}
Label
Row
{
//: Add Printer wizard field label
text: qsTr("Printer Name:");
Label
{
text: qsTr("Min endstop Z: ")
}
Label
{
text: z_min_pressed ? qsTr("Works") : qsTr("Not checked")
}
}
TextField
Row
{
id: machineName; Layout.fillWidth: true; text: machineList.model.getItem(machineList.currentIndex).name
Label
{
text: qsTr("Nozzle temperature check: ")
}
Label
{
text: printer_connection.extruderTemperature
}
Button
{
text: "Start heating"
onClicked:
{
heater_status_label.text = qsTr("Checking")
printer_connection.heatupNozzle(190)
wizardPage.extruder_target_temp = 190
}
}
Label
{
id: heater_status_label
text: qsTr("Not checked")
}
}
Item
Row
{
Layout.fillWidth: true;
Layout.fillHeight: true;
Label
{
text: qsTr("bed temperature check: ")
}
Label
{
text: printer_connection.bedTemperature
}
Button
{
text: "Start heating"
onClicked:
{
bed_status_label.text = qsTr("Checking")
printer_connection.printer.heatupBed(60)
wizardPage.bed_target_temp = 60
}
}
Label
{
id: bed_status_label
text: qsTr("Not checked")
}
}
Connections
{
target: printer_connection
onEndstopStateChanged:
{
if(key == "x_min")
{
x_min_pressed = true
}
if(key == "y_min")
{
y_min_pressed = true
}
if(key == "z_min")
{
z_min_pressed = true
}
}
onExtruderTemperatureChanged:
{
if(printer_connection.extruderTemperature > wizardPage.extruder_target_temp - 10 && printer_connection.extruderTemperature < wizardPage.extruder_target_temp + 10)
{
heater_status_label.text = qsTr("Works")
printer_connection.heatupNozzle(0)
}
}
onBedTemperatureChanged:
{
if(printer_connection.bedTemperature > wizardPage.bed_target_temp - 5 && printer_connection.bedTemperature < wizardPage.bed_target_temp + 5)
{
bed_status_label.text = qsTr("Works")
printer_connection.heatupBed(0)
}
}
}
ExclusiveGroup

View file

@ -13,19 +13,12 @@ Column
id: wizardPage
property string title
anchors.fill: parent;
Label
{
text: parent.title
font.pointSize: 18;
}
Label
{
//: Add Printer wizard page description
text: qsTr("Please select the type of printer:");
}
ScrollView
{
height: parent.height - 50
@ -33,14 +26,26 @@ Column
ListView
{
id: machineList;
model: UM.Models.availableMachinesModel
delegate: RadioButton
model: UM.USBPrinterManager.connectedPrinterList
delegate:Row
{
exclusiveGroup: printerGroup;
text: model.name;
onClicked:
id: derp
Text
{
ListView.view.currentIndex = index;
id: text_area
text: model.name
}
Button
{
text: "Update";
onClicked:
{
if(!UM.USBPrinterManager.updateFirmwareBySerial(text_area.text))
{
status_text.text = "ERROR"
}
}
}
}
}
@ -48,15 +53,10 @@ Column
Label
{
//: Add Printer wizard field label
text: qsTr("Printer Name:");
id: status_text
text: ""
}
TextField
{
id: machineName; Layout.fillWidth: true; text: machineList.model.getItem(machineList.currentIndex).name
}
Item
{
@ -64,8 +64,5 @@ Column
Layout.fillHeight: true;
}
ExclusiveGroup
{
id: printerGroup;
}
}

View file

@ -28,21 +28,6 @@
"machine_center_is_zero": {
"default": false
},
"machine_head_shape_min_x": {
"default": 40
},
"machine_head_shape_min_y": {
"default": 10
},
"machine_head_shape_max_x": {
"default": 60
},
"machine_head_shape_max_y": {
"default": 30
},
"machine_nozzle_gantry_distance": {
"default": 55
},
"machine_extruder_count": {
"default": 1
},
@ -67,20 +52,20 @@
"machine_head_polygon": {
"default": [
[
-10,
10
-1,
1
],
[
10,
10
-1,
-1
],
[
10,
-10
1,
-1
],
[
-10,
-10
1,
1
]
]
},

View file

@ -38,14 +38,30 @@
"machine_height": { "default": 205 },
"machine_heated_bed": { "default": true },
"machine_head_with_fans_polygon":
{
"default": [
[
-40,
30
],
[
-40,
-10
],
[
60,
-10
],
[
60,
30
]
]
},
"machine_center_is_zero": { "default": false },
"machine_nozzle_size": { "default": 0.4 },
"machine_head_shape_min_x": { "default": 40 },
"machine_head_shape_min_y": { "default": 10 },
"machine_head_shape_max_x": { "default": 60 },
"machine_head_shape_max_y": { "default": 30 },
"machine_nozzle_gantry_distance": { "default": 55 },
"gantry_height": { "default": 55 },
"machine_use_extruder_offset_to_offset_coords": { "default": true },
"machine_gcode_flavor": { "default": "UltiGCode" },
"machine_disallowed_areas": { "default": [

View file

@ -41,11 +41,28 @@
"machine_depth": { "default": 205 },
"machine_center_is_zero": { "default": false },
"machine_nozzle_size": { "default": 0.4 },
"machine_head_shape_min_x": { "default": 75 },
"machine_head_shape_min_y": { "default": 18 },
"machine_head_shape_max_x": { "default": 18 },
"machine_head_shape_max_y": { "default": 35 },
"machine_nozzle_gantry_distance": { "default": 55 },
"machine_head_with_fans_polygon":
{
"default": [
[
-75,
35
],
[
-75,
-18
],
[
18,
35
],
[
18,
-18
]
]
},
"gantry_height": { "default": 55 },
"machine_use_extruder_offset_to_offset_coords": { "default": true },
"machine_gcode_flavor": { "default": "RepRap (Marlin/Sprinter)" },

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -35,54 +35,26 @@ QtObject {
}
}
property Component open_file_button: Component {
property Component open_file_button: Component {
ButtonStyle {
background: Item {
implicitWidth: UM.Theme.sizes.button.width;
implicitHeight: UM.Theme.sizes.button.height;
background: Item{
implicitWidth: UM.Theme.sizes.loadfile_button.width
implicitHeight: UM.Theme.sizes.loadfile_button.height
Rectangle {
anchors.bottom: parent.verticalCenter;
width: parent.width;
height: control.hovered ? parent.height / 2 + label.height : 0;
Behavior on height { NumberAnimation { duration: 100; } }
opacity: control.hovered ? 1.0 : 0.0;
Behavior on opacity { NumberAnimation { duration: 100; } }
Label {
id: label;
anchors.horizontalCenter: parent.horizontalCenter;
text: control.text.replace("&", "");
font: UM.Theme.fonts.button_tooltip;
color: UM.Theme.colors.button_tooltip_text;
}
}
UM.AngledCornerRectangle {
anchors.fill: parent;
color: {
if(control.hovered) {
return UM.Theme.colors.button_active_hover;
} else {
return UM.Theme.colors.button_active;
}
}
width: parent.width
height: parent.height
color: control.hovered ? UM.Theme.colors.load_save_button_hover : UM.Theme.colors.load_save_button
Behavior on color { ColorAnimation { duration: 50; } }
cornerSize: UM.Theme.sizes.default_margin.width;
}
Label {
anchors.centerIn: parent
text: control.text
color: UM.Theme.colors.load_save_button_text
font: UM.Theme.fonts.default
}
}
label: Item {
Image {
anchors.centerIn: parent;
source: control.iconSource;
width: UM.Theme.sizes.button_icon.width;
height: UM.Theme.sizes.button_icon.height;
sourceSize: UM.Theme.sizes.button_icon;
}
label: Label{
visible: false
}
}
}
@ -90,7 +62,6 @@ QtObject {
property Component tool_button: Component {
ButtonStyle {
background: Item {
///////////TODO CHANGE SIZES!!
implicitWidth: UM.Theme.sizes.button.width;
implicitHeight: UM.Theme.sizes.button.height;
@ -99,7 +70,6 @@ QtObject {
anchors.top: parent.verticalCenter;
width: parent.width;
///////////TODO CHANGE LABELHEIGHT!!
height: control.hovered ? parent.height / 2 + label.height : 0;
Behavior on height { NumberAnimation { duration: 100; } }
@ -109,7 +79,7 @@ QtObject {
Label {
id: label
anchors.bottom: parent.bottom
text: control.text.replace("&", "");
text: control.text
font: UM.Theme.fonts.button_tooltip;
color: UM.Theme.colors.button_tooltip_text;
}
@ -138,13 +108,14 @@ QtObject {
Behavior on color { ColorAnimation { duration: 50; } }
Label {
id: tool_button_arrow
anchors.right: parent.right;
anchors.rightMargin: UM.Theme.sizes.default_margin.width / 2;
anchors.rightMargin: (UM.Theme.sizes.button.width - UM.Theme.sizes.button_icon.width - tool_button_arrow.width) / 2
anchors.verticalCenter: parent.verticalCenter;
text: "▼";
font: UM.Theme.fonts.small;
visible: control.menu != null;
color: "white";
color: UM.Theme.colors.button_text
}
}
}
@ -162,34 +133,98 @@ QtObject {
}
}
}
property Component tool_button_panel: Component {
ButtonStyle {
background: Item {
implicitWidth: UM.Theme.sizes.button.width;
implicitHeight: UM.Theme.sizes.button.height;
Rectangle {
id: tool_button_background
anchors.top: parent.verticalCenter;
width: parent.width;
height: control.hovered ? parent.height / 2 + label.height : 0;
Behavior on height { NumberAnimation { duration: 100; } }
opacity: control.hovered ? 1.0 : 0.0;
Behavior on opacity { NumberAnimation { duration: 100; } }
Label {
id: label
anchors.bottom: parent.bottom
text: control.text
width: UM.Theme.sizes.button.width;
wrapMode: Text.WordWrap
font: UM.Theme.fonts.button_tooltip;
color: UM.Theme.colors.button_tooltip_text;
}
}
Rectangle {
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) {
return UM.Theme.colors.button_active_hover;
} else if(control.pressed || (control.checkable && control.checked)) {
return UM.Theme.colors.button_active;
} else if(control.hovered) {
return UM.Theme.colors.button_hover;
} else {
return UM.Theme.colors.button;
}
}
Behavior on color { ColorAnimation { duration: 50; } }
}
}
label: Item {
Image {
anchors.centerIn: parent;
source: control.iconSource;
width: UM.Theme.sizes.button_icon.width;
height: UM.Theme.sizes.button_icon.height;
sourceSize: UM.Theme.sizes.button_icon;
}
}
}
}
property Component progressbar: Component{
ProgressBarStyle {
background: UM.AngledCornerRectangle {
cornerSize: UM.Theme.sizes.progressbar_control.height
implicitWidth: UM.Theme.sizes.progressbar.width
background:Rectangle {
implicitWidth: UM.Theme.sizes.message.width - (UM.Theme.sizes.default_margin.width * 2)
implicitHeight: UM.Theme.sizes.progressbar.height
x: UM.Theme.sizes.default_margin.width
color: UM.Theme.colors.progressbar_background
}
progress: UM.AngledCornerRectangle {
cornerSize: UM.Theme.sizes.progressbar_control.height
progress: Rectangle {
color: control.indeterminate ? "transparent" : UM.Theme.colors.progressbar_control
UM.AngledCornerRectangle {
cornerSize: UM.Theme.sizes.progressbar_control.height
Rectangle{
color: UM.Theme.colors.progressbar_control
width: UM.Theme.sizes.progressbar_control.width
height: UM.Theme.sizes.progressbar_control.height
x: UM.Theme.sizes.default_margin.width
visible: control.indeterminate
SequentialAnimation on x {
id: xAnim
property int animEndPoint: UM.Theme.sizes.progressbar.width - UM.Theme.sizes.progressbar_control.width
property int animEndPoint: UM.Theme.sizes.message.width - UM.Theme.sizes.default_margin.width - UM.Theme.sizes.progressbar_control.width
running: control.indeterminate
loops: Animation.Infinite
NumberAnimation { from: 0; to: xAnim.animEndPoint; duration: 2000;}
NumberAnimation { from: xAnim.animEndPoint; to: 0; duration: 2000;}
NumberAnimation { from: UM.Theme.sizes.default_margin.width; to: xAnim.animEndPoint; duration: 2000;}
NumberAnimation { from: xAnim.animEndPoint; to: UM.Theme.sizes.default_margin.width; duration: 2000;}
}
}
}

View file

@ -3,52 +3,52 @@
"large": {
"size": 1.5,
"bold": true,
"family": "Roboto"
"family": "ProximaNova"
},
"default": {
"size": 1,
"family": "Roboto"
"family": "ProximaNova"
},
"default_allcaps": {
"size": 1,
"capitalize": true,
"family": "Roboto"
"family": "ProximaNova"
},
"small": {
"size": 0.75,
"family": "Roboto"
"family": "ProximaNova"
},
"tiny": {
"size": 0.5,
"family": "Roboto"
"family": "ProximaNova"
},
"caption": {
"size": 0.75,
"italic": true,
"family": "Roboto"
"family": "ProximaNova"
},
"sidebar_header": {
"size": 0.75,
"capitalize": true,
"family": "Roboto"
"family": "ProximaNova"
},
"sidebar_save_to": {
"size": 1.0,
"family": "Roboto"
"family": "ProximaNova"
},
"timeslider_time": {
"size": 1.0,
"bold": true,
"family": "Roboto"
"family": "ProximaNova"
},
"button_tooltip": {
"size": 0.75,
"capitalize": true,
"family": "Roboto"
"family": "ProximaNova"
},
"setting_category": {
"size": 1.5,
"family": "Roboto"
"family": "ProximaNova"
}
},
@ -66,15 +66,20 @@
"text_hover": [35, 35, 35, 255],
"text_pressed": [12, 169, 227, 255],
"button": [160, 163, 171, 255],
"button_hover": [140, 144, 154, 255],
"button": [139, 143, 153, 255],
"button_hover": [116, 120, 127, 255],
"button_active": [12, 169, 227, 255],
"button_active_hover": [34, 150, 199, 255],
"button_lining": [140, 144, 154, 255],
"button_active_hover": [77, 184, 226, 255],
"button_lining": [208, 210, 211, 255],
"button_text": [255, 255, 255, 255],
"button_disabled": [245, 245, 245, 255],
"button_tooltip_text": [35, 35, 35, 255],
"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],
"scrollbar_background": [245, 245, 245, 255],
"scrollbar_handle": [205, 202, 201, 255],
"scrollbar_handle_hover": [174, 174, 174, 255],
@ -98,7 +103,7 @@
"setting_validation_warning": [255, 186, 15, 255],
"setting_validation_ok": [255, 255, 255, 255],
"progressbar_background": [245, 245, 245, 255],
"progressbar_background": [208, 210, 211, 255],
"progressbar_control": [12, 169, 227, 255],
"slider_groove": [245, 245, 245, 255],
@ -126,8 +131,8 @@
"save_button_printtime_text": [12, 169, 227, 255],
"save_button_background": [249, 249, 249, 255],
"message": [160, 163, 171, 255],
"message_text": [35, 35, 35, 255],
"message_background": [255, 255, 255, 255],
"message_text": [12, 169, 227, 255],
"tool_panel_background": [255, 255, 255, 255]
},
@ -135,11 +140,15 @@
"sizes": {
"window_margin": [2.0, 2.0],
"default_margin": [1.0, 1.0],
"default_lining": [0.1, 0.1],
"panel": [22.0, 10.0],
"logo": [9.5, 2.0],
"toolbar_button": [2.0, 2.0],
"toolbar_spacing": [1.0, 1.0],
"loadfile_button": [11.0, 2.4],
"loadfile_margin": [0.8, 0.4],
"section": [22.0, 3.0],
"section_icon": [2.14, 2.14],
"section_text_margin": [0.33, 0.33],
@ -153,11 +162,11 @@
"standard_list_lineheight": [1.5, 1.5],
"standard_list_input": [20.0, 25.0],
"button": [4.25, 4.25],
"button_icon": [2.9, 2.9],
"button": [3.2, 3.2],
"button_icon": [2.5, 2.5],
"progressbar": [26.0, 0.5],
"progressbar_control": [8.0, 0.5],
"progressbar": [26.0, 0.8],
"progressbar_control": [8.0, 0.8],
"progressbar_padding": [0.0, 1.0],
"scrollbar": [0.5, 0.5],
@ -184,6 +193,7 @@
"wizard_progress": [10.0, 0.0],
"message": [30.0, 5.0],
"message_close": [1.25, 1.25]
"message_close": [1.25, 1.25],
"message_button": [6.0, 1.8]
}
}