mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-08 22:35:03 -06:00
Merge branch 'replace_controls_1_for_controls_2' into CURA-8688_qt6_cleanup
# Conflicts: # resources/qml/Widgets/Menu.qml # resources/qml/Widgets/MenuItem.qml # resources/themes/cura-dark/theme.json # resources/themes/cura-light/theme.json
This commit is contained in:
commit
e2fe50baf1
155 changed files with 406 additions and 667 deletions
|
@ -207,6 +207,7 @@ Cura.ExpandablePopup
|
|||
text: model.material_name
|
||||
elide: Text.ElideRight
|
||||
width: parent.width
|
||||
wrapMode: Text.NoWrap
|
||||
visible: !materialBrandNameLabel.visible && !truncated
|
||||
}
|
||||
|
||||
|
@ -217,6 +218,7 @@ Cura.ExpandablePopup
|
|||
text: model.material_type
|
||||
elide: Text.ElideRight
|
||||
width: parent.width
|
||||
wrapMode: Text.NoWrap
|
||||
visible: !materialBrandNameLabel.visible && !materialNameLabel.visible
|
||||
}
|
||||
// Label that shows the name of the variant
|
||||
|
@ -228,6 +230,7 @@ Cura.ExpandablePopup
|
|||
|
||||
text: model.variant
|
||||
elide: Text.ElideRight
|
||||
wrapMode: Text.NoWrap
|
||||
font: UM.Theme.getFont("default_bold")
|
||||
Layout.preferredWidth: parent.width
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ import QtQuick.Window 2.1
|
|||
import UM 1.5 as UM
|
||||
import Cura 1.0 as Cura
|
||||
|
||||
Menu
|
||||
Cura.Menu
|
||||
{
|
||||
id: base
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ Cura.Menu
|
|||
|
||||
Cura.MenuItem { action: Cura.Actions.undo }
|
||||
Cura.MenuItem { action: Cura.Actions.redo }
|
||||
MenuSeparator { }
|
||||
Cura.MenuSeparator { }
|
||||
Cura.MenuItem { action: Cura.Actions.selectAll }
|
||||
Cura.MenuItem { action: Cura.Actions.arrangeAll }
|
||||
Cura.MenuItem { action: Cura.Actions.multiplySelection }
|
||||
|
@ -21,7 +21,7 @@ Cura.Menu
|
|||
Cura.MenuItem { action: Cura.Actions.deleteAll }
|
||||
Cura.MenuItem { action: Cura.Actions.resetAllTranslation }
|
||||
Cura.MenuItem { action: Cura.Actions.resetAll }
|
||||
MenuSeparator { }
|
||||
Cura.MenuSeparator { }
|
||||
Cura.MenuItem { action: Cura.Actions.groupObjects }
|
||||
Cura.MenuItem { action: Cura.Actions.mergeObjects }
|
||||
Cura.MenuItem { action: Cura.Actions.unGroupObjects }
|
||||
|
|
|
@ -69,7 +69,7 @@ Cura.Menu
|
|||
enabled: UM.WorkspaceFileHandler.enabled
|
||||
}
|
||||
|
||||
MenuSeparator { }
|
||||
Cura.MenuSeparator { }
|
||||
|
||||
Cura.MenuItem
|
||||
{
|
||||
|
@ -91,7 +91,7 @@ Cura.Menu
|
|||
onTriggered: UM.OutputDeviceManager.requestWriteSelectionToDevice("local_file", PrintInformation.jobName, { "filter_by_machine": false, "preferred_mimetypes": "application/vnd.ms-package.3dmanufacturing-3dmodel+xml"})
|
||||
}
|
||||
|
||||
MenuSeparator { }
|
||||
Cura.MenuSeparator { }
|
||||
|
||||
Cura.MenuItem
|
||||
{
|
||||
|
@ -99,7 +99,7 @@ Cura.Menu
|
|||
action: Cura.Actions.reloadAll
|
||||
}
|
||||
|
||||
MenuSeparator { }
|
||||
Cura.MenuSeparator { }
|
||||
|
||||
Cura.MenuItem { action: Cura.Actions.quit }
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ Cura.Menu
|
|||
onAboutToHide: updateModels = false
|
||||
}
|
||||
|
||||
MenuSeparator
|
||||
Cura.MenuSeparator
|
||||
{
|
||||
visible: Cura.MachineManager.activeMachine.hasVariants || Cura.MachineManager.activeMachine.hasMaterials
|
||||
}
|
||||
|
|
|
@ -2,16 +2,13 @@
|
|||
//Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Controls 1.1
|
||||
import QtQuick.Controls.Styles 1.1
|
||||
import QtQuick.Layouts 1.1
|
||||
|
||||
import UM 1.5 as UM
|
||||
import Cura 1.0 as Cura
|
||||
|
||||
Item
|
||||
{
|
||||
id: base;
|
||||
id: base
|
||||
UM.I18nCatalog { id: catalog; name: "cura"}
|
||||
|
||||
height: childrenRect.height + UM.Theme.getSize("thick_margin").height
|
||||
|
@ -158,7 +155,7 @@ Item
|
|||
}
|
||||
}
|
||||
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
id: statusLabel
|
||||
width: parent.width - 2 * UM.Theme.getSize("thick_margin").width
|
||||
|
@ -171,7 +168,7 @@ Item
|
|||
text: statusText
|
||||
}
|
||||
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
id: percentageLabel
|
||||
anchors.top: parent.top
|
||||
|
@ -185,20 +182,20 @@ Item
|
|||
|
||||
UM.ProgressBar
|
||||
{
|
||||
id: progressBar;
|
||||
minimumValue: 0;
|
||||
maximumValue: 100;
|
||||
value: 0;
|
||||
id: progressBar
|
||||
from: 0
|
||||
to: 100
|
||||
value: 0
|
||||
|
||||
//Doing this in an explicit binding since the implicit binding breaks on occasion.
|
||||
Binding
|
||||
{
|
||||
target: progressBar;
|
||||
property: "value";
|
||||
value: base.progress;
|
||||
target: progressBar
|
||||
property: "value"
|
||||
value: base.progress
|
||||
}
|
||||
|
||||
visible: showProgress;
|
||||
visible: showProgress
|
||||
indeterminate:
|
||||
{
|
||||
if(!printerConnected)
|
||||
|
@ -218,15 +215,15 @@ Item
|
|||
return false;
|
||||
}
|
||||
}
|
||||
property string backgroundColor: UM.Theme.getColor("progressbar_background");
|
||||
property string controlColor: base.statusColor;
|
||||
property string backgroundColor: UM.Theme.getColor("progressbar_background")
|
||||
property string controlColor: base.statusColor
|
||||
|
||||
width: parent.width - 2 * UM.Theme.getSize("thick_margin").width;
|
||||
height: UM.Theme.getSize("progressbar").height;
|
||||
anchors.top: statusLabel.bottom;
|
||||
anchors.topMargin: Math.round(UM.Theme.getSize("thick_margin").height / 4);
|
||||
anchors.left: parent.left;
|
||||
anchors.leftMargin: UM.Theme.getSize("thick_margin").width;
|
||||
width: parent.width - 2 * UM.Theme.getSize("thick_margin").width
|
||||
height: UM.Theme.getSize("progressbar").height
|
||||
anchors.top: statusLabel.bottom
|
||||
anchors.topMargin: Math.round(UM.Theme.getSize("thick_margin").height / 4)
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: UM.Theme.getSize("thick_margin").width
|
||||
}
|
||||
|
||||
Row
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 1.4
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import QtQuick.Layouts 1.3
|
||||
|
||||
import UM 1.5 as UM
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 1.4
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import QtQuick.Layouts 1.3
|
||||
|
||||
import UM 1.5 as UM
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 1.4
|
||||
|
||||
import UM 1.5 as UM
|
||||
import Cura 1.0 as Cura
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Controls 1.4
|
||||
|
||||
import UM 1.2 as UM
|
||||
import Cura 1.0 as Cura
|
||||
|
@ -13,8 +12,6 @@ Item
|
|||
|
||||
height: childrenRect.height + 2 * padding
|
||||
|
||||
property Action configureSettings
|
||||
|
||||
property bool settingsEnabled: Cura.ExtruderManager.activeExtruderStackId || extrudersEnabledCount.properties.value == 1
|
||||
property real padding: UM.Theme.getSize("thick_margin").width
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Controls 1.1
|
||||
import QtQuick.Controls.Styles 1.1
|
||||
import QtQuick.Layouts 1.1
|
||||
|
||||
import UM 1.2 as UM
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Controls 1.4
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import QtQuick.Layouts 1.3
|
||||
|
||||
import UM 1.2 as UM
|
||||
|
|
|
@ -98,6 +98,7 @@ Item
|
|||
Layout.preferredWidth: _buttonSize
|
||||
Layout.preferredHeight: _buttonSize
|
||||
iconSource: UM.Theme.getIcon("ChevronSingleUp")
|
||||
leftPadding: (Layout.preferredWidth - iconSize) / 2
|
||||
|
||||
onClicked: printerModel.moveHead(0, distancesRow.currentDistance, 0)
|
||||
}
|
||||
|
@ -109,6 +110,7 @@ Item
|
|||
Layout.preferredWidth: _buttonSize
|
||||
Layout.preferredHeight: _buttonSize
|
||||
iconSource: UM.Theme.getIcon("ChevronSingleLeft")
|
||||
leftPadding: (Layout.preferredWidth - iconSize) / 2
|
||||
|
||||
onClicked: printerModel.moveHead(-distancesRow.currentDistance, 0, 0)
|
||||
}
|
||||
|
@ -120,6 +122,7 @@ Item
|
|||
Layout.preferredWidth: _buttonSize
|
||||
Layout.preferredHeight: _buttonSize
|
||||
iconSource: UM.Theme.getIcon("ChevronSingleRight")
|
||||
leftPadding: (Layout.preferredWidth - iconSize) / 2
|
||||
|
||||
onClicked: printerModel.moveHead(distancesRow.currentDistance, 0, 0)
|
||||
}
|
||||
|
@ -131,6 +134,7 @@ Item
|
|||
Layout.preferredWidth: _buttonSize
|
||||
Layout.preferredHeight: _buttonSize
|
||||
iconSource: UM.Theme.getIcon("ChevronSingleDown")
|
||||
leftPadding: (Layout.preferredWidth - iconSize) / 2
|
||||
|
||||
onClicked: printerModel.moveHead(0, -distancesRow.currentDistance, 0)
|
||||
}
|
||||
|
@ -142,6 +146,7 @@ Item
|
|||
Layout.preferredWidth: _buttonSize
|
||||
Layout.preferredHeight: _buttonSize
|
||||
iconSource: UM.Theme.getIcon("House")
|
||||
leftPadding: (Layout.preferredWidth - iconSize) / 2
|
||||
|
||||
onClicked: printerModel.homeHead()
|
||||
}
|
||||
|
@ -166,6 +171,7 @@ Item
|
|||
iconSource: UM.Theme.getIcon("ChevronSingleUp")
|
||||
width: height
|
||||
height: _buttonSize
|
||||
leftPadding: (width - iconSize) / 2
|
||||
|
||||
onClicked: printerModel.moveHead(0, 0, distancesRow.currentDistance)
|
||||
|
||||
|
@ -176,6 +182,7 @@ Item
|
|||
iconSource: UM.Theme.getIcon("House")
|
||||
width: height
|
||||
height: _buttonSize
|
||||
leftPadding: (width - iconSize) / 2
|
||||
|
||||
onClicked: printerModel.homeBed()
|
||||
}
|
||||
|
@ -185,6 +192,7 @@ Item
|
|||
iconSource: UM.Theme.getIcon("ChevronSingleDown")
|
||||
width: height
|
||||
height: _buttonSize
|
||||
leftPadding: (width - iconSize) / 2
|
||||
|
||||
onClicked: printerModel.moveHead(0, 0, -distancesRow.currentDistance)
|
||||
}
|
||||
|
@ -218,15 +226,15 @@ Item
|
|||
Repeater
|
||||
{
|
||||
model: distancesModel
|
||||
delegate: Button
|
||||
delegate: Cura.SecondaryButton
|
||||
{
|
||||
height: UM.Theme.getSize("setting_control").height
|
||||
width: height + UM.Theme.getSize("default_margin").width
|
||||
|
||||
text: model.label
|
||||
ButtonGroup.group: distanceGroup
|
||||
checkable: true
|
||||
checked: distancesRow.currentDistance == model.value
|
||||
color: distancesRow.currentDistance == model.value ? UM.Theme.getColor("primary_button") : UM.Theme.getColor("secondary_button")
|
||||
textColor: distancesRow.currentDistance == model.value ? UM.Theme.getColor("primary_button_text"): UM.Theme.getColor("secondary_button_text")
|
||||
hoverColor: distancesRow.currentDistance == model.value ? UM.Theme.getColor("primary_button_hover"): UM.Theme.getColor("secondary_button_hover")
|
||||
onClicked: distancesRow.currentDistance = model.value
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,18 +2,16 @@
|
|||
// Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Controls 1.1
|
||||
import QtQuick.Controls.Styles 1.1
|
||||
import QtQuick.Layouts 1.1
|
||||
|
||||
import UM 1.2 as UM
|
||||
import UM 1.5 as UM
|
||||
import Cura 1.0 as Cura
|
||||
|
||||
Item
|
||||
{
|
||||
property string label: ""
|
||||
property string value: ""
|
||||
height: childrenRect.height;
|
||||
height: childrenRect.height
|
||||
|
||||
property var connectedPrinter: Cura.MachineManager.printerOutputDevices.length >= 1 ? Cura.MachineManager.printerOutputDevices[0] : null
|
||||
|
||||
|
@ -24,22 +22,20 @@ Item
|
|||
anchors.left: parent.left
|
||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
width: Math.floor(parent.width * 0.4)
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: label
|
||||
color: connectedPrinter != null && connectedPrinter.acceptsCommands ? UM.Theme.getColor("setting_control_text") : UM.Theme.getColor("setting_control_disabled_text")
|
||||
font: UM.Theme.getFont("default")
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
width: Math.floor(parent.width * 0.6)
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: value
|
||||
color: connectedPrinter != null && connectedPrinter.acceptsCommands ? UM.Theme.getColor("setting_control_text") : UM.Theme.getColor("setting_control_disabled_text")
|
||||
font: UM.Theme.getFont("default")
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,11 +2,8 @@
|
|||
// Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Controls 1.4
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import QtQuick.Layouts 1.3
|
||||
|
||||
import UM 1.2 as UM
|
||||
import UM 1.5 as UM
|
||||
import Cura 1.0 as Cura
|
||||
|
||||
Item
|
||||
|
@ -21,14 +18,12 @@ Item
|
|||
width: base.width
|
||||
height: UM.Theme.getSize("section").height
|
||||
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||
text: label
|
||||
font: UM.Theme.getFont("default")
|
||||
color: UM.Theme.getColor("setting_category_text")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import QtQuick 2.2
|
||||
|
||||
import QtQuick.Controls 1.1
|
||||
import QtQuick.Controls.Styles 1.1
|
||||
import QtQuick.Layouts 1.1
|
||||
|
||||
import UM 1.2 as UM
|
||||
|
|
|
@ -27,6 +27,7 @@ Item
|
|||
property bool allowSelection: true //Whether to allow the user to select items.
|
||||
property string sectionRole: ""
|
||||
|
||||
property alias flickableDirection: tableView.flickableDirection
|
||||
Row
|
||||
{
|
||||
id: headerBar
|
||||
|
@ -128,6 +129,7 @@ Item
|
|||
}
|
||||
|
||||
flickableDirection: Flickable.AutoFlickIfNeeded
|
||||
contentWidth: -1 // AUto calculate the contendWidth
|
||||
clip: true
|
||||
ScrollBar.vertical: UM.ScrollBar {}
|
||||
columnWidthProvider: function(column)
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
// Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Controls 1.1
|
||||
import QtQuick.Controls.Styles 1.1
|
||||
|
||||
import UM 1.4 as UM
|
||||
import Cura 1.1 as Cura
|
||||
|
|
|
@ -12,9 +12,11 @@ import Cura 1.0 as Cura
|
|||
UM.Menu
|
||||
{
|
||||
id: menu
|
||||
topPadding: UM.Theme.getSize("narrow_margin").height
|
||||
bottomPadding: UM.Theme.getSize("narrow_margin").height
|
||||
padding: 0
|
||||
|
||||
width: UM.Theme.getSize("context_menu").width
|
||||
implicitWidth: UM.Theme.getSize("menu").width
|
||||
|
||||
delegate: Cura.MenuItem {}
|
||||
background: Rectangle
|
||||
|
|
|
@ -12,6 +12,9 @@ import UM 1.5 as UM
|
|||
UM.MenuItem
|
||||
{
|
||||
id: menuItem
|
||||
|
||||
implicitHeight: UM.Theme.getSize("menu").height + UM.Theme.getSize("narrow_margin").height
|
||||
implicitWidth: UM.Theme.getSize("menu").width
|
||||
opacity: enabled ? 1.0 : 0.5
|
||||
|
||||
arrow: UM.RecolorImage
|
||||
|
@ -46,6 +49,6 @@ UM.MenuItem
|
|||
width: menuItem.width - 2 * UM.Theme.getSize("default_lining").width
|
||||
height: menuItem.height - 2 * UM.Theme.getSize("default_lining").height
|
||||
|
||||
color: menuItem.highlighted ? UM.Theme.getColor("setting_control_highlight") : "transparent"
|
||||
color: menuItem.highlighted ? UM.Theme.getColor("secondary"): UM.Theme.getColor("setting_control_highlight")
|
||||
}
|
||||
}
|
|
@ -11,8 +11,10 @@ import UM 1.1 as UM
|
|||
//
|
||||
MenuSeparator
|
||||
{
|
||||
padding: 0
|
||||
contentItem: Rectangle {
|
||||
leftPadding: UM.Theme.getSize("default_margin").width
|
||||
rightPadding: UM.Theme.getSize("default_margin").width
|
||||
contentItem: Rectangle
|
||||
{
|
||||
implicitHeight: UM.Theme.getSize("default_lining").height
|
||||
color: UM.Theme.getColor("setting_control_border")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue