mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-08 22:35:03 -06:00
Merge branch '15.06'
Conflicts: cura/CuraApplication.py
This commit is contained in:
commit
38346dd95f
7 changed files with 187 additions and 37 deletions
|
@ -3,7 +3,6 @@
|
|||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Controls 1.1
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Window 2.1
|
||||
|
||||
import UM 1.0 as UM
|
||||
|
@ -12,48 +11,53 @@ UM.Dialog {
|
|||
id: base
|
||||
|
||||
//: About dialog title
|
||||
title: qsTr("About Cura");
|
||||
title: qsTr("About Cura")
|
||||
minimumWidth: 400
|
||||
minimumHeight: 300
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent;
|
||||
Image {
|
||||
id: logo
|
||||
width: parent.width * 0.75
|
||||
height: width * (1/4.25)
|
||||
|
||||
Item {
|
||||
Layout.fillWidth: true;
|
||||
Layout.fillHeight: true;
|
||||
}
|
||||
source: UM.Theme.images.logo
|
||||
|
||||
Image {
|
||||
Layout.alignment: Qt.AlignHCenter;
|
||||
Layout.preferredWidth: parent.width * 0.75;
|
||||
Layout.preferredHeight: width * (1/4.25);
|
||||
sourceSize.width: width
|
||||
sourceSize.height: height
|
||||
anchors.centerIn: parent
|
||||
anchors.verticalCenterOffset : -(height * 0.5)
|
||||
}
|
||||
|
||||
source: UM.Theme.images.logo;
|
||||
Label {
|
||||
id: version
|
||||
|
||||
sourceSize.width: width;
|
||||
sourceSize.height: height;
|
||||
}
|
||||
text: "Cura 15.06 Beta"
|
||||
font: UM.Theme.fonts.large
|
||||
anchors.horizontalCenter : logo.horizontalCenter
|
||||
anchors.horizontalCenterOffset : (logo.width * 0.25)
|
||||
anchors.top: logo.bottom
|
||||
anchors.topMargin : 5
|
||||
}
|
||||
|
||||
Label {
|
||||
Layout.alignment: Qt.AlignHCenter;
|
||||
Label {
|
||||
id: description
|
||||
width: parent.width
|
||||
|
||||
text: "Cura 15.06 Beta";
|
||||
font: UM.Theme.fonts.large;
|
||||
}
|
||||
//: About dialog application description
|
||||
text: qsTr("End-to-end solution for fused filament 3D printing.")
|
||||
wrapMode: Text.WordWrap
|
||||
anchors.top: version.bottom
|
||||
anchors.topMargin : 10
|
||||
}
|
||||
|
||||
Label {
|
||||
//: About dialog application description
|
||||
text: qsTr("End-to-end solution for fused filament 3D printing.")
|
||||
}
|
||||
Label {
|
||||
id: author_note
|
||||
width: parent.width
|
||||
|
||||
Label {
|
||||
//: About dialog application author note
|
||||
text: qsTr("Cura has been developed by Ultimaker B.V. in cooperation with the community.")
|
||||
}
|
||||
|
||||
Item {
|
||||
Layout.fillWidth: true;
|
||||
Layout.fillHeight: true;
|
||||
}
|
||||
//: About dialog application author note
|
||||
text: qsTr("Cura has been developed by Ultimaker B.V. in cooperation with the community.")
|
||||
wrapMode: Text.WordWrap
|
||||
anchors.top: description.bottom
|
||||
}
|
||||
|
||||
rightButtons: Button {
|
||||
|
|
|
@ -25,6 +25,7 @@ UM.MainWindow {
|
|||
window: base
|
||||
|
||||
Menu {
|
||||
id: fileMenu
|
||||
//: File menu
|
||||
title: qsTr("&File");
|
||||
|
||||
|
@ -33,6 +34,19 @@ UM.MainWindow {
|
|||
|
||||
MenuSeparator { }
|
||||
|
||||
Instantiator {
|
||||
model: Printer.recentFiles
|
||||
MenuItem {
|
||||
property url filePath: modelData;
|
||||
text: (index + 1) + ". " + modelData.slice(modelData.lastIndexOf("/") + 1);
|
||||
onTriggered: UM.MeshFileHandler.readLocalFile(filePath);
|
||||
}
|
||||
onObjectAdded: fileMenu.insertItem(index, object)
|
||||
onObjectRemoved: fileMenu.removeItem(object)
|
||||
}
|
||||
|
||||
MenuSeparator { }
|
||||
|
||||
MenuItem { action: actions.quit; }
|
||||
}
|
||||
|
||||
|
@ -178,7 +192,7 @@ UM.MainWindow {
|
|||
id: openFileButton;
|
||||
|
||||
iconSource: UM.Theme.icons.open;
|
||||
style: UM.Theme.styles.tool_button;
|
||||
style: UM.Backend.progress < 0 ? UM.Theme.styles.open_file_button : UM.Theme.styles.tool_button;
|
||||
|
||||
anchors {
|
||||
top: parent.top;
|
||||
|
@ -419,3 +433,4 @@ UM.MainWindow {
|
|||
|
||||
Component.onCompleted: UM.Theme.load(UM.Resources.getPath(UM.Resources.ThemesLocation, "cura"))
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
// Copyright (c) 2015 Ultimaker B.V.
|
||||
// Cura is released under the terms of the AGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.0
|
||||
|
||||
import QtQuick.Controls 1.2
|
||||
|
||||
import UM 1.0 as UM
|
||||
|
||||
UM.SettingView { }
|
||||
UM.SettingView {
|
||||
expandedCategories: Printer.expandedCategories;
|
||||
onExpandedCategoriesChanged: Printer.setExpandedCategories(expandedCategories);
|
||||
}
|
||||
|
|
|
@ -35,6 +35,55 @@ QtObject {
|
|||
}
|
||||
}
|
||||
|
||||
property Component open_file_button: Component {
|
||||
ButtonStyle {
|
||||
background: UM.AngledCornerRectangle {
|
||||
implicitWidth: UM.Theme.sizes.button.width;
|
||||
implicitHeight: UM.Theme.sizes.button.height;
|
||||
color: {
|
||||
if(control.hovered) {
|
||||
return UM.Theme.colors.button_active_hover;
|
||||
} else {
|
||||
return UM.Theme.colors.button_active;
|
||||
}
|
||||
}
|
||||
Behavior on color { ColorAnimation { duration: 50; } }
|
||||
cornerSize: UM.Theme.sizes.default_margin.width;
|
||||
|
||||
Rectangle {
|
||||
anchors.bottom: parent.top;
|
||||
|
||||
width: parent.width;
|
||||
height: control.hovered ? label.height : 0;
|
||||
Behavior on height { NumberAnimation { duration: 75; } }
|
||||
|
||||
opacity: control.hovered ? 1.0 : 0.0;
|
||||
Behavior on opacity { NumberAnimation { duration: 75; } }
|
||||
|
||||
Label {
|
||||
id: label
|
||||
anchors.horizontalCenter: parent.horizontalCenter;
|
||||
text: control.text;
|
||||
font: UM.Theme.fonts.button_tooltip;
|
||||
color: UM.Theme.colors.button_tooltip_text;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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 tool_button: Component {
|
||||
ButtonStyle {
|
||||
background: UM.AngledCornerRectangle {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue