From 662e3b9cd1be6819bfabb97366df218af0359977 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Fri, 18 Aug 2017 13:38:12 +0200 Subject: [PATCH] Fix coding style CURA-4147 --- resources/qml/Sidebar.qml | 6 +++--- resources/qml/SidebarHeader.qml | 28 +++++++++++++++++----------- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/resources/qml/Sidebar.qml b/resources/qml/Sidebar.qml index 19ae7a0c13..969848f456 100755 --- a/resources/qml/Sidebar.qml +++ b/resources/qml/Sidebar.qml @@ -244,7 +244,7 @@ Rectangle } return result; } - enabled: !header.currentExtruderVisible || header.currentExtruderIndex > -1 + enabled: !header.currentExtruderVisible || header.currentExtruderIndex > -1 width: parent.width * 0.7 + UM.Theme.getSize("default_margin").width height: UM.Theme.getSize("setting_control").height @@ -252,7 +252,7 @@ Rectangle tooltip: Cura.MachineManager.activeQualityName style: UM.Theme.styles.sidebar_header_button activeFocusOnPress: true; - property var valueWarning: ! Cura.MachineManager.isActiveQualitySupported + property var valueWarning: !Cura.MachineManager.isActiveQualitySupported menu: ProfileMenu { } UM.SimpleButton @@ -278,7 +278,7 @@ Rectangle onEntered: { var content = catalog.i18nc("@tooltip","Some setting/override values are different from the values stored in the profile.\n\nClick to open the profile manager.") - base.showTooltip(globalProfileRow, Qt.point(- UM.Theme.getSize("default_margin").width, 0), content) + base.showTooltip(globalProfileRow, Qt.point(-UM.Theme.getSize("default_margin").width, 0), content) } onExited: base.hideTooltip() } diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index d6ef77780c..6f0ae9e196 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -160,7 +160,7 @@ Column visible: !extruderSelectionRow.visible } -//Print core row + // Print core row Item { id: printCoreRow @@ -199,7 +199,8 @@ Column menu: NozzleMenu { extruderIndex: base.currentExtruderIndex } } } -//Material Row + + // Material Row Item { id: materialRow @@ -254,7 +255,8 @@ Column menu: MaterialMenu { extruderIndex: base.currentExtruderIndex } } } -//Material info row + + // Material info row Item { id: materialInfoRow @@ -286,10 +288,14 @@ Column anchors.bottom: parent.bottom color: { - if (! Cura.MachineManager.isActiveQualitySupported) + if (!Cura.MachineManager.isActiveQualitySupported) + { UM.Theme.getColor("setting_validation_error"); + } else + { UM.Theme.getColor("text"); + } } MouseArea @@ -309,13 +315,13 @@ Column { var content = catalog.i18nc("@tooltip", "Click to check the material compatibility on Ultimaker.com."); - base.showTooltip( - materialInfoRow, - Qt.point(- UM.Theme.getSize("default_margin").width,0), - catalog.i18nc("@tooltip", content) - ); + base.showTooltip( + materialInfoRow, + Qt.point(-UM.Theme.getSize("default_margin").width, 0), + catalog.i18nc("@tooltip", content) + ); } - onExited:base.hideTooltip(); + onExited: base.hideTooltip(); } } @@ -331,7 +337,7 @@ Column //sourceSize.height: width + 5 color: UM.Theme.getColor("setting_control_text") - visible: ! Cura.MachineManager.isActiveQualitySupported + visible: !Cura.MachineManager.isActiveQualitySupported } } }