mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 22:54:01 -06:00
Merge branch 'master' into CURA-8979_Materials_Preference_Page
# Conflicts: # resources/qml/ColorDialog.qml # resources/qml/Preferences/ProfilesPage.qml
This commit is contained in:
commit
bfa8118c9f
355 changed files with 875 additions and 1175 deletions
|
@ -21,6 +21,13 @@ UM.Dialog
|
|||
|
||||
property alias swatchGridColumns: colorSwatchGrid.columns
|
||||
|
||||
// In this case we would like to let the content of the dialog determine the size of the dialog
|
||||
// however with the current implementation of the dialog this is not possible, so instead we calculate
|
||||
// the size of the dialog ourselves.
|
||||
// Ugly workaround for windows having overlapping elements due to incorrect dialog width
|
||||
minimumWidth: content.width + (Qt.platform.os == "windows" ? 4 * margin : 2 * margin)
|
||||
minimumHeight: content.height + buttonRow.height + (Qt.platform.os == "windows" ? 5 * margin : 3 * margin)
|
||||
|
||||
property alias color: colorInput.text
|
||||
property var swatchColors: [
|
||||
"#2161AF", "#57AFB2", "#F7B32D", "#E33D4A", "#C088AD",
|
||||
|
|
|
@ -93,8 +93,8 @@ UM.Dialog
|
|||
leftButtons: [
|
||||
Cura.ComboBox
|
||||
{
|
||||
implicitHeight: UM.Theme.getSize("combobox_wide").height
|
||||
implicitWidth: UM.Theme.getSize("combobox_wide").width
|
||||
implicitHeight: UM.Theme.getSize("combobox").height
|
||||
implicitWidth: UM.Theme.getSize("combobox").width
|
||||
|
||||
id: discardOrKeepProfileChangesDropDownButton
|
||||
textRole: "text"
|
||||
|
|
|
@ -148,6 +148,14 @@ UM.PreferencesPage
|
|||
bottom: parent.bottom
|
||||
right: parent.right
|
||||
}
|
||||
|
||||
onPositionChanged: {
|
||||
// This removes focus from items when scrolling.
|
||||
// This fixes comboboxes staying open and scrolling container
|
||||
if (!activeFocus) {
|
||||
forceActiveFocus();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Column
|
||||
|
@ -215,7 +223,7 @@ UM.PreferencesPage
|
|||
|
||||
textRole: "text"
|
||||
model: languageList
|
||||
implicitWidth: UM.Theme.getSize("combobox_wide").width
|
||||
implicitWidth: UM.Theme.getSize("combobox").width
|
||||
implicitHeight: currencyField.height
|
||||
|
||||
function setCurrentIndex() {
|
||||
|
@ -255,7 +263,7 @@ UM.PreferencesPage
|
|||
id: currencyField
|
||||
selectByMouse: true
|
||||
text: UM.Preferences.getValue("cura/currency")
|
||||
implicitWidth: UM.Theme.getSize("combobox_wide").width
|
||||
implicitWidth: UM.Theme.getSize("combobox").width
|
||||
onTextChanged: UM.Preferences.setValue("cura/currency", text)
|
||||
}
|
||||
|
||||
|
@ -284,7 +292,7 @@ UM.PreferencesPage
|
|||
|
||||
model: themeList
|
||||
textRole: "text"
|
||||
implicitWidth: UM.Theme.getSize("combobox_wide").width
|
||||
implicitWidth: UM.Theme.getSize("combobox").width
|
||||
implicitHeight: currencyField.height
|
||||
|
||||
currentIndex:
|
||||
|
@ -554,8 +562,8 @@ UM.PreferencesPage
|
|||
|
||||
model: comboBoxList
|
||||
textRole: "text"
|
||||
width: UM.Theme.getSize("combobox_wide").width
|
||||
height: UM.Theme.getSize("combobox_wide").height
|
||||
width: UM.Theme.getSize("combobox").width
|
||||
height: UM.Theme.getSize("combobox").height
|
||||
|
||||
currentIndex:
|
||||
{
|
||||
|
@ -711,8 +719,8 @@ UM.PreferencesPage
|
|||
Cura.ComboBox
|
||||
{
|
||||
id: choiceOnOpenProjectDropDownButton
|
||||
width: UM.Theme.getSize("combobox_wide").width
|
||||
height: UM.Theme.getSize("combobox_wide").height
|
||||
width: UM.Theme.getSize("combobox").width
|
||||
height: UM.Theme.getSize("combobox").height
|
||||
|
||||
model: ListModel
|
||||
{
|
||||
|
|
|
@ -25,7 +25,6 @@ Item
|
|||
top: parent.top
|
||||
left: parent.left
|
||||
right: settingVisibilityMenu.left
|
||||
rightMargin: UM.Theme.getSize("default_margin").width
|
||||
}
|
||||
height: UM.Theme.getSize("print_setup_big_item").height
|
||||
|
||||
|
@ -131,8 +130,6 @@ Item
|
|||
SettingVisibilityPresetsMenu
|
||||
{
|
||||
id: settingVisibilityPresetsMenu
|
||||
x: settingVisibilityMenu.x
|
||||
y: settingVisibilityMenu.y
|
||||
onCollapseAllCategories:
|
||||
{
|
||||
settingsSearchTimer.stop()
|
||||
|
@ -142,32 +139,32 @@ Item
|
|||
}
|
||||
}
|
||||
|
||||
UM.SimpleButton
|
||||
UM.BurgerButton
|
||||
{
|
||||
id: settingVisibilityMenu
|
||||
|
||||
anchors
|
||||
{
|
||||
top: filterContainer.top
|
||||
bottom: filterContainer.bottom
|
||||
verticalCenter: filterContainer.verticalCenter
|
||||
right: parent.right
|
||||
rightMargin: UM.Theme.getSize("wide_margin").width
|
||||
}
|
||||
width: UM.Theme.getSize("medium_button_icon").width
|
||||
height: UM.Theme.getSize("medium_button_icon").height
|
||||
iconSource: UM.Theme.getIcon("Hamburger")
|
||||
hoverColor: UM.Theme.getColor("small_button_text_hover")
|
||||
color: UM.Theme.getColor("small_button_text")
|
||||
|
||||
onClicked:
|
||||
{
|
||||
settingVisibilityPresetsMenu.popup(
|
||||
settingVisibilityMenu,
|
||||
popupContainer,
|
||||
-settingVisibilityPresetsMenu.width + UM.Theme.getSize("default_margin").width,
|
||||
settingVisibilityMenu.height
|
||||
)
|
||||
}
|
||||
}
|
||||
Item
|
||||
{
|
||||
// Work around to prevent the buttom from being rescaled if a popup is attached
|
||||
id: popupContainer
|
||||
anchors.bottom: settingVisibilityMenu.bottom
|
||||
anchors.right: settingVisibilityMenu.right
|
||||
}
|
||||
|
||||
// Mouse area that gathers the scroll events to not propagate it to the main view.
|
||||
MouseArea
|
||||
|
@ -191,7 +188,17 @@ Item
|
|||
}
|
||||
clip: true
|
||||
cacheBuffer: 1000000 // Set a large cache to effectively just cache every list item.
|
||||
ScrollBar.vertical: UM.ScrollBar { id: scrollBar }
|
||||
ScrollBar.vertical: UM.ScrollBar
|
||||
{
|
||||
id: scrollBar
|
||||
onPositionChanged: {
|
||||
// This removes focus from items when scrolling.
|
||||
// This fixes comboboxes staying open and scrolling container
|
||||
if (!activeFocus) {
|
||||
forceActiveFocus();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
model: UM.SettingDefinitionsModel
|
||||
{
|
||||
|
|
|
@ -72,6 +72,18 @@ Item
|
|||
base.value = value * base.stepSize;
|
||||
}
|
||||
|
||||
// This forces TextField to commit typed values before incrementing with buttons.
|
||||
// This fixes the typed value not being incremented when the textField has active focus.
|
||||
up.onPressedChanged:
|
||||
{
|
||||
base.forceActiveFocus()
|
||||
}
|
||||
|
||||
down.onPressedChanged:
|
||||
{
|
||||
base.forceActiveFocus()
|
||||
}
|
||||
|
||||
background: Item {}
|
||||
|
||||
contentItem: Cura.TextField
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue