mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Moved objects menu to lower left and made it collapsible. CURA-4525
This commit is contained in:
parent
312bd137c2
commit
a47107448e
4 changed files with 47 additions and 54 deletions
|
@ -69,7 +69,7 @@ class ProcessSlicedLayersJob(Job):
|
||||||
return self._build_plate_number
|
return self._build_plate_number
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
Logger.log("d", "########## Processing new layer for [%s]..." % self._build_plate_number)
|
Logger.log("d", "Processing new layer for build plate %s..." % self._build_plate_number)
|
||||||
start_time = time()
|
start_time = time()
|
||||||
view = Application.getInstance().getController().getActiveView()
|
view = Application.getInstance().getController().getActiveView()
|
||||||
if view.getPluginId() == "SimulationView":
|
if view.getPluginId() == "SimulationView":
|
||||||
|
|
|
@ -348,7 +348,6 @@ UM.MainWindow
|
||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
id: openFileButton;
|
id: openFileButton;
|
||||||
visible: !UM.Preferences.getValue("cura/use_multi_build_plate")
|
|
||||||
text: catalog.i18nc("@action:button","Open File");
|
text: catalog.i18nc("@action:button","Open File");
|
||||||
iconSource: UM.Theme.getIcon("load")
|
iconSource: UM.Theme.getIcon("load")
|
||||||
style: UM.Theme.styles.tool_button
|
style: UM.Theme.styles.tool_button
|
||||||
|
@ -362,25 +361,6 @@ UM.MainWindow
|
||||||
action: Cura.Actions.open;
|
action: Cura.Actions.open;
|
||||||
}
|
}
|
||||||
|
|
||||||
Button
|
|
||||||
{
|
|
||||||
id: objectsButton;
|
|
||||||
visible: UM.Preferences.getValue("cura/use_multi_build_plate")
|
|
||||||
|
|
||||||
text: catalog.i18nc("@action:button","Objects list");
|
|
||||||
iconSource: UM.Theme.getIcon("plus")
|
|
||||||
style: UM.Theme.styles.tool_button
|
|
||||||
tooltip: '';
|
|
||||||
anchors
|
|
||||||
{
|
|
||||||
top: topbar.bottom;
|
|
||||||
//top: openFileButton.bottom;
|
|
||||||
topMargin: UM.Theme.getSize("default_margin").height;
|
|
||||||
left: parent.left;
|
|
||||||
}
|
|
||||||
action: triggerObjectsList;
|
|
||||||
}
|
|
||||||
|
|
||||||
Toolbar
|
Toolbar
|
||||||
{
|
{
|
||||||
id: toolbar;
|
id: toolbar;
|
||||||
|
@ -389,32 +369,24 @@ UM.MainWindow
|
||||||
property int mouseY: base.mouseY
|
property int mouseY: base.mouseY
|
||||||
|
|
||||||
anchors {
|
anchors {
|
||||||
top: objectsButton.bottom;
|
top: openFileButton.bottom;
|
||||||
topMargin: UM.Theme.getSize("window_margin").height;
|
topMargin: UM.Theme.getSize("window_margin").height;
|
||||||
left: parent.left;
|
left: parent.left;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Action
|
|
||||||
{
|
|
||||||
id: triggerObjectsList;
|
|
||||||
text: catalog.i18nc("@action:inmenu menubar:file","&Open File(s)...");
|
|
||||||
iconName: "document-open";
|
|
||||||
shortcut: StandardKey.Open;
|
|
||||||
onTriggered: objectsList.visible = !objectsList.visible;
|
|
||||||
}
|
|
||||||
|
|
||||||
ObjectsList
|
ObjectsList
|
||||||
{
|
{
|
||||||
id: objectsList;
|
id: objectsList;
|
||||||
visible: false;
|
visible: UM.Preferences.getValue("cura/use_multi_build_plate");
|
||||||
//z: -10;
|
|
||||||
anchors
|
anchors
|
||||||
{
|
{
|
||||||
top: objectsButton.top;
|
bottom: parent.bottom;
|
||||||
left: objectsButton.right;
|
left: parent.left;
|
||||||
leftMargin: UM.Theme.getSize("default_margin").width;
|
leftMargin: UM.Theme.getSize("default_margin").width;
|
||||||
rightMargin: UM.Theme.getSize("default_margin").width;
|
rightMargin: UM.Theme.getSize("default_margin").width;
|
||||||
|
topMargin: UM.Theme.getSize("default_margin").height;
|
||||||
|
bottomMargin: UM.Theme.getSize("default_margin").height;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,25 +19,43 @@ Rectangle
|
||||||
color: UM.Theme.getColor("tool_panel_background")
|
color: UM.Theme.getColor("tool_panel_background")
|
||||||
|
|
||||||
width: UM.Theme.getSize("objects_menu_size").width
|
width: UM.Theme.getSize("objects_menu_size").width
|
||||||
height: UM.Theme.getSize("objects_menu_size").height
|
height: {
|
||||||
|
if (collapsed) {
|
||||||
|
return UM.Theme.getSize("objects_menu_size_collapsed").height;
|
||||||
|
} else {
|
||||||
|
return UM.Theme.getSize("objects_menu_size").height;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
property bool collapsed: false;
|
||||||
|
|
||||||
SystemPalette { id: palette }
|
SystemPalette { id: palette }
|
||||||
|
|
||||||
Button
|
Button {
|
||||||
|
id: collapseButton
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.topMargin: Math.floor(UM.Theme.getSize("default_margin").height + (UM.Theme.getSize("layerview_row").height - UM.Theme.getSize("default_margin").height) / 2)
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||||
|
|
||||||
|
width: UM.Theme.getSize("standard_arrow").width
|
||||||
|
height: UM.Theme.getSize("standard_arrow").height
|
||||||
|
|
||||||
|
onClicked: collapsed = !collapsed
|
||||||
|
|
||||||
|
style: ButtonStyle
|
||||||
{
|
{
|
||||||
id: openFileButton;
|
background: UM.RecolorImage
|
||||||
text: catalog.i18nc("@action:button","Open File");
|
|
||||||
iconSource: UM.Theme.getIcon("load")
|
|
||||||
style: UM.Theme.styles.tool_button
|
|
||||||
tooltip: '';
|
|
||||||
anchors
|
|
||||||
{
|
{
|
||||||
top: parent.top;
|
width: control.width
|
||||||
topMargin: UM.Theme.getSize("default_margin").height;
|
height: control.height
|
||||||
left: parent.left;
|
sourceSize.width: width
|
||||||
leftMargin: UM.Theme.getSize("default_margin").height;
|
sourceSize.height: width
|
||||||
|
color: UM.Theme.getColor("setting_control_text")
|
||||||
|
source: collapsed ? UM.Theme.getIcon("arrow_left") : UM.Theme.getIcon("arrow_bottom")
|
||||||
|
}
|
||||||
|
label: Label{ }
|
||||||
}
|
}
|
||||||
action: Cura.Actions.open;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
|
@ -86,11 +104,12 @@ Rectangle
|
||||||
{
|
{
|
||||||
id: objectsList
|
id: objectsList
|
||||||
frameVisible: true
|
frameVisible: true
|
||||||
|
visible: !collapsed
|
||||||
width: parent.width - 2 * UM.Theme.getSize("default_margin").height
|
width: parent.width - 2 * UM.Theme.getSize("default_margin").height
|
||||||
|
|
||||||
anchors
|
anchors
|
||||||
{
|
{
|
||||||
top: openFileButton.bottom;
|
top: collapseButton.bottom;
|
||||||
topMargin: UM.Theme.getSize("default_margin").height;
|
topMargin: UM.Theme.getSize("default_margin").height;
|
||||||
left: parent.left;
|
left: parent.left;
|
||||||
leftMargin: UM.Theme.getSize("default_margin").height;
|
leftMargin: UM.Theme.getSize("default_margin").height;
|
||||||
|
@ -118,10 +137,11 @@ Rectangle
|
||||||
CheckBox
|
CheckBox
|
||||||
{
|
{
|
||||||
id: filterBuildPlateCheckbox
|
id: filterBuildPlateCheckbox
|
||||||
|
visible: !collapsed
|
||||||
checked: boolCheck(UM.Preferences.getValue("view/filter_current_build_plate"))
|
checked: boolCheck(UM.Preferences.getValue("view/filter_current_build_plate"))
|
||||||
onClicked: UM.Preferences.setValue("view/filter_current_build_plate", checked)
|
onClicked: UM.Preferences.setValue("view/filter_current_build_plate", checked)
|
||||||
|
|
||||||
text: catalog.i18nc("@option:check","Filter active build plate");
|
text: catalog.i18nc("@option:check","See only current build plate");
|
||||||
|
|
||||||
anchors
|
anchors
|
||||||
{
|
{
|
||||||
|
@ -133,7 +153,6 @@ Rectangle
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: buildPlateDelegate
|
id: buildPlateDelegate
|
||||||
Rectangle
|
Rectangle
|
||||||
|
@ -167,7 +186,7 @@ Rectangle
|
||||||
{
|
{
|
||||||
id: buildPlateSelection
|
id: buildPlateSelection
|
||||||
frameVisible: true
|
frameVisible: true
|
||||||
height: 100
|
height: UM.Theme.getSize("build_plate_selection_size").height
|
||||||
width: parent.width - 2 * UM.Theme.getSize("default_margin").height
|
width: parent.width - 2 * UM.Theme.getSize("default_margin").height
|
||||||
|
|
||||||
anchors
|
anchors
|
||||||
|
|
|
@ -393,6 +393,8 @@
|
||||||
|
|
||||||
"jobspecs_line": [2.0, 2.0],
|
"jobspecs_line": [2.0, 2.0],
|
||||||
|
|
||||||
"objects_menu_size": [20, 40]
|
"objects_menu_size": [17, 40],
|
||||||
|
"objects_menu_size_collapsed": [15, 15],
|
||||||
|
"build_plate_selection_size": [15, 5]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue