Clean up the code

Remove all the references to the sidebar and use the term print_setup instead.

Contributes to CURA-5941.
This commit is contained in:
Diego Prado Gesto 2018-12-07 12:07:41 +01:00
parent 898fd25ddb
commit 1d33fe081f
12 changed files with 16 additions and 59 deletions

View File

@ -412,7 +412,7 @@ UM.Dialog
}
}
Cura.SidebarTooltip
Cura.PrintSetupTooltip
{
id: tooltip
}

View File

@ -29,7 +29,7 @@ Item {
Button {
height: UM.Theme.getSize("save_button_save_to_button").height;
onClicked: Cura.MachineManager.printerOutputDevices[0].requestAuthentication();
style: UM.Theme.styles.sidebar_action_button;
style: UM.Theme.styles.print_setup_action_button;
text: catalog.i18nc("@action:button", "Request Access");
tooltip: catalog.i18nc("@info:tooltip", "Send access request to the printer");
visible: printerConnected && !printerAcceptsCommands && !authenticationRequested;
@ -38,7 +38,7 @@ Item {
Button {
height: UM.Theme.getSize("save_button_save_to_button").height;
onClicked: connectActionDialog.show();
style: UM.Theme.styles.sidebar_action_button;
style: UM.Theme.styles.print_setup_action_button;
text: catalog.i18nc("@action:button", "Connect");
tooltip: catalog.i18nc("@info:tooltip", "Connect to a printer");
visible: !printerConnected;

View File

@ -309,7 +309,7 @@ UM.MainWindow
}
}
SidebarTooltip
PrintSetupTooltip
{
id: tooltip
}

View File

@ -204,7 +204,7 @@ Item
height: UM.Theme.getSize("setting_control").height
width: selectors.controlWidth
style: UM.Theme.styles.sidebar_header_button
style: UM.Theme.styles.print_setup_header_button
activeFocusOnPress: true
menu: Cura.MaterialMenu
{
@ -237,7 +237,7 @@ Item
height: UM.Theme.getSize("setting_control").height
width: selectors.controlWidth
style: UM.Theme.styles.sidebar_header_button
style: UM.Theme.styles.print_setup_header_button
activeFocusOnPress: true;
menu: Cura.NozzleMenu { extruderIndex: Cura.ExtruderManager.activeExtruderIndex }

View File

@ -309,7 +309,7 @@ Item
}
}
style: UM.Theme.styles.sidebar_action_button
style: UM.Theme.styles.print_setup_action_button
}
Button
@ -325,7 +325,7 @@ Item
text: catalog.i18nc("@label", "Abort Print")
onClicked: confirmationDialog.visible = true
style: UM.Theme.styles.sidebar_action_button
style: UM.Theme.styles.print_setup_action_button
}
MessageDialog

View File

@ -173,7 +173,7 @@ Rectangle
anchors.bottom: parent.bottom
}
SidebarTooltip
PrintSetupTooltip
{
id: tooltip
}

View File

@ -224,7 +224,7 @@ Rectangle
{
id: arrangeAllBuildPlatesButton;
text: catalog.i18nc("@action:button","Arrange to all build plates");
style: UM.Theme.styles.sidebar_action_button
style: UM.Theme.styles.print_setup_action_button
height: UM.Theme.getSize("objects_menu_button").height;
tooltip: '';
anchors
@ -244,7 +244,7 @@ Rectangle
{
id: arrangeBuildPlateButton;
text: catalog.i18nc("@action:button","Arrange current build plate");
style: UM.Theme.styles.sidebar_action_button
style: UM.Theme.styles.print_setup_action_button
height: UM.Theme.getSize("objects_menu_button").height;
tooltip: '';
anchors

View File

@ -49,7 +49,7 @@ Rectangle
property var activePrinter: connectedDevice != null ? connectedDevice.activePrinter : null
property var activePrintJob: activePrinter != null ? activePrinter.activePrintJob: null
SidebarTooltip
PrintSetupTooltip
{
id: tooltip
}

View File

@ -43,7 +43,7 @@ Item
right: parent.right
}
tooltip: Cura.MachineManager.activeQualityOrQualityChangesName
style: UM.Theme.styles.sidebar_header_button
style: UM.Theme.styles.print_setup_header_button
activeFocusOnPress: true
menu: Cura.ProfileMenu { }

View File

@ -1,43 +0,0 @@
// Copyright (c) 2016 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.7
import QtQuick.Controls 1.1
import QtQuick.Controls.Styles 1.1
import QtQuick.Layouts 1.1
import UM 1.2 as UM
import Cura 1.0 as Cura
StackView
{
id: sidebarContents
delegate: StackViewDelegate
{
function transitionFinished(properties)
{
properties.exitItem.opacity = 1
}
pushTransition: StackViewTransition
{
PropertyAnimation
{
target: enterItem
property: "opacity"
from: 0
to: 1
duration: 100
}
PropertyAnimation
{
target: exitItem
property: "opacity"
from: 1
to: 0
duration: 100
}
}
}
}

View File

@ -9,7 +9,7 @@ import UM 1.1 as UM
QtObject
{
property Component sidebar_header_button: Component
property Component print_setup_header_button: Component
{
ButtonStyle
{
@ -80,7 +80,7 @@ QtObject
}
Label
{
id: sidebarComboBoxLabel
id: printSetupComboBoxLabel
color: control.enabled ? Theme.getColor("setting_control_text") : Theme.getColor("setting_control_disabled_text")
text: control.text;
elide: Text.ElideRight;
@ -644,7 +644,7 @@ QtObject
}
}
property Component sidebar_action_button: Component
property Component print_setup_action_button: Component
{
ButtonStyle
{