mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-19 03:47:29 +08:00
Merge branch '4.9'
This commit is contained in:
commit
065826f2dd
Binary file not shown.
Before Width: | Height: | Size: 495 KiB After Width: | Height: | Size: 502 KiB |
@ -1,14 +1,17 @@
|
|||||||
// Copyright (c) 2018 Ultimaker B.V.
|
// Copyright (c) 2021 Ultimaker B.V.
|
||||||
// Cura is released under the terms of the LGPLv3 or higher.
|
// Cura is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
import QtQuick 2.7
|
import QtQuick 2.10
|
||||||
import QtQuick.Controls 1.4
|
import QtQuick.Controls 2.15
|
||||||
|
import QtQml.Models 2.15 as Models
|
||||||
|
|
||||||
import UM 1.2 as UM
|
import UM 1.2 as UM
|
||||||
import Cura 1.0 as Cura
|
import Cura 1.0 as Cura
|
||||||
|
|
||||||
Menu
|
Menu
|
||||||
{
|
{
|
||||||
|
ActionGroup { id: group }
|
||||||
|
|
||||||
id: menu
|
id: menu
|
||||||
title: catalog.i18nc("@action:inmenu", "Visible Settings")
|
title: catalog.i18nc("@action:inmenu", "Visible Settings")
|
||||||
|
|
||||||
@ -16,7 +19,7 @@ Menu
|
|||||||
|
|
||||||
signal collapseAllCategories()
|
signal collapseAllCategories()
|
||||||
|
|
||||||
Instantiator
|
Models.Instantiator
|
||||||
{
|
{
|
||||||
model: settingVisibilityPresetsModel.items
|
model: settingVisibilityPresetsModel.items
|
||||||
|
|
||||||
@ -25,7 +28,7 @@ Menu
|
|||||||
text: modelData.name
|
text: modelData.name
|
||||||
checkable: true
|
checkable: true
|
||||||
checked: modelData.presetId == settingVisibilityPresetsModel.activePreset
|
checked: modelData.presetId == settingVisibilityPresetsModel.activePreset
|
||||||
exclusiveGroup: group
|
ActionGroup.group: group
|
||||||
onTriggered:
|
onTriggered:
|
||||||
{
|
{
|
||||||
settingVisibilityPresetsModel.setActivePreset(modelData.presetId);
|
settingVisibilityPresetsModel.setActivePreset(modelData.presetId);
|
||||||
@ -49,9 +52,7 @@ Menu
|
|||||||
MenuItem
|
MenuItem
|
||||||
{
|
{
|
||||||
text: catalog.i18nc("@action:inmenu", "Manage Setting Visibility...")
|
text: catalog.i18nc("@action:inmenu", "Manage Setting Visibility...")
|
||||||
iconName: "configure"
|
icon.name: "configure"
|
||||||
onTriggered: Cura.Actions.configureSettingVisibility.trigger()
|
onTriggered: Cura.Actions.configureSettingVisibility.trigger()
|
||||||
}
|
}
|
||||||
|
|
||||||
ExclusiveGroup { id: group }
|
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright (c) 2019 Ultimaker B.V.
|
// Copyright (c) 2021 Ultimaker B.V.
|
||||||
// Cura is released under the terms of the LGPLv3 or higher.
|
// Cura is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
import QtQuick 2.7
|
import QtQuick 2.7
|
||||||
@ -154,6 +154,20 @@ Item
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SettingVisibilityPresetsMenu
|
||||||
|
{
|
||||||
|
id: settingVisibilityPresetsMenu
|
||||||
|
x: settingVisibilityMenu.x
|
||||||
|
y: settingVisibilityMenu.y
|
||||||
|
onCollapseAllCategories:
|
||||||
|
{
|
||||||
|
settingsSearchTimer.stop()
|
||||||
|
filter.text = "" // clear search field
|
||||||
|
filter.editingFinished()
|
||||||
|
definitionsModel.collapseAllCategories()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ToolButton
|
ToolButton
|
||||||
{
|
{
|
||||||
id: settingVisibilityMenu
|
id: settingVisibilityMenu
|
||||||
@ -185,16 +199,7 @@ Item
|
|||||||
label: Label {}
|
label: Label {}
|
||||||
}
|
}
|
||||||
|
|
||||||
menu: SettingVisibilityPresetsMenu
|
onClicked: settingVisibilityPresetsMenu.open()
|
||||||
{
|
|
||||||
onCollapseAllCategories:
|
|
||||||
{
|
|
||||||
settingsSearchTimer.stop()
|
|
||||||
filter.text = "" // clear search field
|
|
||||||
filter.editingFinished()
|
|
||||||
definitionsModel.collapseAllCategories()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mouse area that gathers the scroll events to not propagate it to the main view.
|
// Mouse area that gathers the scroll events to not propagate it to the main view.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user