mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -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
|
||||
|
||||
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()
|
||||
view = Application.getInstance().getController().getActiveView()
|
||||
if view.getPluginId() == "SimulationView":
|
||||
|
|
|
@ -348,7 +348,6 @@ UM.MainWindow
|
|||
Button
|
||||
{
|
||||
id: openFileButton;
|
||||
visible: !UM.Preferences.getValue("cura/use_multi_build_plate")
|
||||
text: catalog.i18nc("@action:button","Open File");
|
||||
iconSource: UM.Theme.getIcon("load")
|
||||
style: UM.Theme.styles.tool_button
|
||||
|
@ -362,25 +361,6 @@ UM.MainWindow
|
|||
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
|
||||
{
|
||||
id: toolbar;
|
||||
|
@ -389,32 +369,24 @@ UM.MainWindow
|
|||
property int mouseY: base.mouseY
|
||||
|
||||
anchors {
|
||||
top: objectsButton.bottom;
|
||||
top: openFileButton.bottom;
|
||||
topMargin: UM.Theme.getSize("window_margin").height;
|
||||
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
|
||||
{
|
||||
id: objectsList;
|
||||
visible: false;
|
||||
//z: -10;
|
||||
visible: UM.Preferences.getValue("cura/use_multi_build_plate");
|
||||
anchors
|
||||
{
|
||||
top: objectsButton.top;
|
||||
left: objectsButton.right;
|
||||
bottom: parent.bottom;
|
||||
left: parent.left;
|
||||
leftMargin: 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")
|
||||
|
||||
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 }
|
||||
|
||||
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;
|
||||
text: catalog.i18nc("@action:button","Open File");
|
||||
iconSource: UM.Theme.getIcon("load")
|
||||
style: UM.Theme.styles.tool_button
|
||||
tooltip: '';
|
||||
anchors
|
||||
background: UM.RecolorImage
|
||||
{
|
||||
top: parent.top;
|
||||
topMargin: UM.Theme.getSize("default_margin").height;
|
||||
left: parent.left;
|
||||
leftMargin: UM.Theme.getSize("default_margin").height;
|
||||
width: control.width
|
||||
height: control.height
|
||||
sourceSize.width: width
|
||||
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 {
|
||||
|
@ -86,11 +104,12 @@ Rectangle
|
|||
{
|
||||
id: objectsList
|
||||
frameVisible: true
|
||||
visible: !collapsed
|
||||
width: parent.width - 2 * UM.Theme.getSize("default_margin").height
|
||||
|
||||
anchors
|
||||
{
|
||||
top: openFileButton.bottom;
|
||||
top: collapseButton.bottom;
|
||||
topMargin: UM.Theme.getSize("default_margin").height;
|
||||
left: parent.left;
|
||||
leftMargin: UM.Theme.getSize("default_margin").height;
|
||||
|
@ -118,10 +137,11 @@ Rectangle
|
|||
CheckBox
|
||||
{
|
||||
id: filterBuildPlateCheckbox
|
||||
visible: !collapsed
|
||||
checked: boolCheck(UM.Preferences.getValue("view/filter_current_build_plate"))
|
||||
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
|
||||
{
|
||||
|
@ -133,7 +153,6 @@ Rectangle
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
Component {
|
||||
id: buildPlateDelegate
|
||||
Rectangle
|
||||
|
@ -167,7 +186,7 @@ Rectangle
|
|||
{
|
||||
id: buildPlateSelection
|
||||
frameVisible: true
|
||||
height: 100
|
||||
height: UM.Theme.getSize("build_plate_selection_size").height
|
||||
width: parent.width - 2 * UM.Theme.getSize("default_margin").height
|
||||
|
||||
anchors
|
||||
|
|
|
@ -393,6 +393,8 @@
|
|||
|
||||
"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