mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-26 16:13:55 -06:00
Merge branch '4.0' of github.com:Ultimaker/Cura
This commit is contained in:
commit
37af42aa93
8 changed files with 61 additions and 10 deletions
|
@ -500,7 +500,7 @@ class CuraApplication(QtApplication):
|
||||||
preferences.addPreference("cura/choice_on_profile_override", "always_ask")
|
preferences.addPreference("cura/choice_on_profile_override", "always_ask")
|
||||||
preferences.addPreference("cura/choice_on_open_project", "always_ask")
|
preferences.addPreference("cura/choice_on_open_project", "always_ask")
|
||||||
preferences.addPreference("cura/use_multi_build_plate", False)
|
preferences.addPreference("cura/use_multi_build_plate", False)
|
||||||
|
preferences.addPreference("view/settings_list_height", 600)
|
||||||
preferences.addPreference("cura/currency", "€")
|
preferences.addPreference("cura/currency", "€")
|
||||||
preferences.addPreference("cura/material_settings", "{}")
|
preferences.addPreference("cura/material_settings", "{}")
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,7 @@ Rectangle
|
||||||
border.width: UM.Theme.getSize("default_lining").width
|
border.width: UM.Theme.getSize("default_lining").width
|
||||||
border.color: UM.Theme.getColor("lining")
|
border.color: UM.Theme.getColor("lining")
|
||||||
radius: UM.Theme.getSize("default_radius").width
|
radius: UM.Theme.getSize("default_radius").width
|
||||||
|
z: 10
|
||||||
|
|
||||||
property bool outputAvailable: UM.Backend.state == UM.Backend.Done || UM.Backend.state == UM.Backend.Disabled
|
property bool outputAvailable: UM.Backend.state == UM.Backend.Done || UM.Backend.state == UM.Backend.Disabled
|
||||||
|
|
||||||
|
|
|
@ -93,7 +93,6 @@ Item
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
UM.OutputDeviceManager.setActiveDevice(model.id)
|
UM.OutputDeviceManager.setActiveDevice(model.id)
|
||||||
widget.requestWriteToDevice()
|
|
||||||
popup.close()
|
popup.close()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ import QtQuick.Dialogs 1.2
|
||||||
import UM 1.2 as UM
|
import UM 1.2 as UM
|
||||||
import Cura 1.0 as Cura
|
import Cura 1.0 as Cura
|
||||||
|
|
||||||
Rectangle
|
Item
|
||||||
{
|
{
|
||||||
id: brand_section
|
id: brand_section
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ import QtQuick.Dialogs 1.2
|
||||||
import UM 1.2 as UM
|
import UM 1.2 as UM
|
||||||
import Cura 1.0 as Cura
|
import Cura 1.0 as Cura
|
||||||
|
|
||||||
Rectangle
|
Item
|
||||||
{
|
{
|
||||||
id: material_type_section
|
id: material_type_section
|
||||||
property var materialType
|
property var materialType
|
||||||
|
|
|
@ -408,7 +408,7 @@ Item
|
||||||
{
|
{
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: UM.Theme.getSize("default_lining").width
|
anchors.leftMargin: UM.Theme.getSize("default_lining").width
|
||||||
text: section == "true" ? catalog.i18nc("@label", "Protected profiles") : catalog.i18nc("@label", "Custom profiles")
|
text: section == "true" ? catalog.i18nc("@label", "Default profiles") : catalog.i18nc("@label", "Custom profiles")
|
||||||
font.bold: true
|
font.bold: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,6 @@ import Cura 1.0 as Cura
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
id: customPrintSetup
|
id: customPrintSetup
|
||||||
height: childrenRect.height + padding
|
|
||||||
|
|
||||||
property real padding: UM.Theme.getSize("default_margin").width
|
property real padding: UM.Theme.getSize("default_margin").width
|
||||||
property bool multipleExtruders: extrudersModel.count > 1
|
property bool multipleExtruders: extrudersModel.count > 1
|
||||||
|
@ -98,15 +97,15 @@ Item
|
||||||
|
|
||||||
Rectangle
|
Rectangle
|
||||||
{
|
{
|
||||||
height: UM.Theme.getSize("print_setup_widget").height
|
|
||||||
anchors
|
anchors
|
||||||
{
|
{
|
||||||
top: tabBar.visible ? tabBar.bottom : globalProfileRow.bottom
|
top: tabBar.visible ? tabBar.bottom : globalProfileRow.bottom
|
||||||
|
topMargin: -UM.Theme.getSize("default_lining").width
|
||||||
left: parent.left
|
left: parent.left
|
||||||
leftMargin: parent.padding
|
leftMargin: parent.padding
|
||||||
right: parent.right
|
right: parent.right
|
||||||
rightMargin: parent.padding
|
rightMargin: parent.padding
|
||||||
topMargin: -UM.Theme.getSize("default_lining").width
|
bottom: parent.bottom
|
||||||
}
|
}
|
||||||
z: tabBar.z - 1
|
z: tabBar.z - 1
|
||||||
// Don't show the border when only one extruder
|
// Don't show the border when only one extruder
|
||||||
|
|
|
@ -15,7 +15,7 @@ Item
|
||||||
id: content
|
id: content
|
||||||
|
|
||||||
width: UM.Theme.getSize("print_setup_widget").width - 2 * UM.Theme.getSize("default_margin").width
|
width: UM.Theme.getSize("print_setup_widget").width - 2 * UM.Theme.getSize("default_margin").width
|
||||||
height: childrenRect.height
|
height: contents.height + buttonRow.height
|
||||||
|
|
||||||
enum Mode
|
enum Mode
|
||||||
{
|
{
|
||||||
|
@ -71,6 +71,15 @@ Item
|
||||||
right: parent.right
|
right: parent.right
|
||||||
top: parent.top
|
top: parent.top
|
||||||
}
|
}
|
||||||
|
height: UM.Preferences.getValue("view/settings_list_height") - UM.Theme.getSize("default_margin").height
|
||||||
|
Connections
|
||||||
|
{
|
||||||
|
target: UM.Preferences
|
||||||
|
onPreferenceChanged:
|
||||||
|
{
|
||||||
|
customPrintSetup.height = UM.Preferences.getValue("view/settings_list_height");
|
||||||
|
}
|
||||||
|
}
|
||||||
visible: currentModeIndex == PrintSetupSelectorContents.Mode.Custom
|
visible: currentModeIndex == PrintSetupSelectorContents.Mode.Custom
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -94,13 +103,14 @@ Item
|
||||||
|
|
||||||
anchors
|
anchors
|
||||||
{
|
{
|
||||||
top: buttonsSeparator.bottom
|
bottom: parent.bottom
|
||||||
left: parent.left
|
left: parent.left
|
||||||
right: parent.right
|
right: parent.right
|
||||||
}
|
}
|
||||||
|
|
||||||
Cura.SecondaryButton
|
Cura.SecondaryButton
|
||||||
{
|
{
|
||||||
|
id: recommendedButton
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.margins: parent.padding
|
anchors.margins: parent.padding
|
||||||
|
@ -125,5 +135,47 @@ Item
|
||||||
visible: currentModeIndex == PrintSetupSelectorContents.Mode.Recommended
|
visible: currentModeIndex == PrintSetupSelectorContents.Mode.Recommended
|
||||||
onClicked: currentModeIndex = PrintSetupSelectorContents.Mode.Custom
|
onClicked: currentModeIndex = PrintSetupSelectorContents.Mode.Custom
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Invisible area at the bottom with which you can resize the panel.
|
||||||
|
MouseArea
|
||||||
|
{
|
||||||
|
anchors
|
||||||
|
{
|
||||||
|
left: parent.left
|
||||||
|
right: parent.right
|
||||||
|
bottom: parent.bottom
|
||||||
|
top: recommendedButton.bottom
|
||||||
|
topMargin: UM.Theme.getSize("default_lining").height
|
||||||
|
}
|
||||||
|
cursorShape: Qt.SplitVCursor
|
||||||
|
visible: currentModeIndex == PrintSetupSelectorContents.Mode.Custom
|
||||||
|
drag
|
||||||
|
{
|
||||||
|
target: parent
|
||||||
|
axis: Drag.YAxis
|
||||||
|
}
|
||||||
|
onMouseYChanged:
|
||||||
|
{
|
||||||
|
if(drag.active)
|
||||||
|
{
|
||||||
|
// position of mouse relative to dropdown align vertical centre of mouse area to cursor
|
||||||
|
// v------------------------------v v------------v
|
||||||
|
var h = mouseY + buttonRow.y + content.y - height / 2 | 0;
|
||||||
|
if(h < 200 * screenScaleFactor) //Enforce a minimum size.
|
||||||
|
{
|
||||||
|
h = 200 * screenScaleFactor;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Absolute mouse Y position in the window, to prevent it from going outside the window.
|
||||||
|
var mouse_absolute_y = mapToGlobal(mouseX, mouseY).y - UM.Preferences.getValue("general/window_top");
|
||||||
|
if(mouse_absolute_y > base.height)
|
||||||
|
{
|
||||||
|
h -= mouse_absolute_y - base.height;
|
||||||
|
}
|
||||||
|
|
||||||
|
UM.Preferences.setValue("view/settings_list_height", h);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue