diff --git a/cura.py b/cura.py new file mode 100755 index 0000000000..7ec66e3913 --- /dev/null +++ b/cura.py @@ -0,0 +1,6 @@ +#!/usr/bin/env python3 + +from src.CuraApplication import CuraApplication + +app = CuraApplication.getInstance() +app.run() diff --git a/printer.py b/printer.py deleted file mode 100755 index cc6914893c..0000000000 --- a/printer.py +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from src.PrinterApplication import PrinterApplication - -app = PrinterApplication.getInstance() -app.run() diff --git a/resources/qml/PrinterActions.qml b/resources/qml/Actions.qml similarity index 100% rename from resources/qml/PrinterActions.qml rename to resources/qml/Actions.qml diff --git a/resources/qml/Printer.qml b/resources/qml/Cura.qml similarity index 98% rename from resources/qml/Printer.qml rename to resources/qml/Cura.qml index 3581464fe0..7158332417 100644 --- a/resources/qml/Printer.qml +++ b/resources/qml/Cura.qml @@ -190,10 +190,11 @@ UM.MainWindow { source: UM.ActiveView.valid ? UM.ActiveView.activeViewPanel : ""; } - PrinterButton { + Button { id: openFileButton; iconSource: UM.Theme.icons.open; + style: UM.Theme.styles.tool_button; anchors { top: parent.top; @@ -220,7 +221,7 @@ UM.MainWindow { sourceSize.height: height; } - PrinterButton { + Button { anchors { top: parent.top; topMargin: UM.Theme.sizes.window_margin.height; @@ -232,6 +233,8 @@ UM.MainWindow { text: qsTr("View Mode"); iconSource: UM.Theme.icons.viewmode; + style: UM.Theme.styles.tool_button; + menu: Menu { id: viewMenu; Instantiator { @@ -251,7 +254,7 @@ UM.MainWindow { } } - PrinterToolbar { + Toolbar { id: toolbar; anchors { @@ -272,7 +275,7 @@ UM.MainWindow { } } - PrinterActions { + Actions { id: actions; open.onTriggered: openDialog.open(); diff --git a/resources/qml/PrinterButton.qml b/resources/qml/PrinterButton.qml deleted file mode 100644 index dfbbbe2984..0000000000 --- a/resources/qml/PrinterButton.qml +++ /dev/null @@ -1,11 +0,0 @@ -import QtQuick 2.2 -import QtQuick.Controls 1.1 -import QtQuick.Controls.Styles 1.1 -import QtQuick.Layouts 1.1 - -import UM 1.0 as UM - -Button { - id: base; - style: UM.Theme.styles.tool_button; -} diff --git a/resources/qml/PrinterToolbar.qml b/resources/qml/Toolbar.qml similarity index 95% rename from resources/qml/PrinterToolbar.qml rename to resources/qml/Toolbar.qml index 37911bc6b5..ee051416aa 100644 --- a/resources/qml/PrinterToolbar.qml +++ b/resources/qml/Toolbar.qml @@ -24,7 +24,7 @@ Item { model: UM.Models.toolModel - PrinterButton { + Button { text: model.name; iconSource: UM.Theme.icons[model.icon]; tooltip: model.description; @@ -32,6 +32,8 @@ Item { checkable: true; checked: model.active; + style: UM.Theme.styles.tool_button; + //Workaround since using ToolButton"s onClicked would break the binding of the checked property, instead //just catch the click so we do not trigger that behaviour. MouseArea { diff --git a/src/PrinterApplication.py b/src/CuraApplication.py similarity index 99% rename from src/PrinterApplication.py rename to src/CuraApplication.py index 3fc3a1bf6c..40084255b4 100644 --- a/src/PrinterApplication.py +++ b/src/CuraApplication.py @@ -37,7 +37,7 @@ import os.path import numpy numpy.seterr(all="ignore") -class PrinterApplication(QtApplication): +class CuraApplication(QtApplication): def __init__(self): if not hasattr(sys, "frozen"): Resources.addResourcePath(os.path.join(os.path.abspath(os.path.dirname(__file__)), "..")) @@ -129,7 +129,7 @@ class PrinterApplication(QtApplication): self.showSplashMessage(self._i18n_catalog.i18nc("Splash screen message", "Loading interface...")) - self.setMainQml(Resources.getPath(Resources.QmlFilesLocation, "Printer.qml")) + self.setMainQml(Resources.getPath(Resources.QmlFilesLocation, "Cura.qml")) self.initializeEngine() self.getStorageDevice("LocalFileStorage").removableDrivesChanged.connect(self._removableDrivesChanged)