Merge pull request #11663 from Ultimaker/CURA-9007_burger_menu

[CURA-9007] Update Burger Menus
This commit is contained in:
Remco Burema 2022-03-16 15:59:32 +01:00 committed by GitHub
commit 7dfcac7bbe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 14 deletions

View File

@ -303,6 +303,7 @@ UM.ManagementPage
left: parent.left left: parent.left
right: parent.right right: parent.right
top: parent.top top: parent.top
topMargin: UM.Theme.getSize("narrow_margin").height
} }
spacing: UM.Theme.getSize("default_margin").height spacing: UM.Theme.getSize("default_margin").height
@ -364,7 +365,9 @@ UM.ManagementPage
UM.TabRow UM.TabRow
{ {
id: profileExtruderTabs id: profileExtruderTabs
UM.TabRowButton // One extra tab for the global settings.
// One extra tab for the global settings.
UM.TabRowButton
{ {
text: catalog.i18nc("@title:tab", "Global Settings") text: catalog.i18nc("@title:tab", "Global Settings")
} }

View File

@ -25,7 +25,6 @@ Item
top: parent.top top: parent.top
left: parent.left left: parent.left
right: settingVisibilityMenu.left right: settingVisibilityMenu.left
rightMargin: UM.Theme.getSize("default_margin").width
} }
height: UM.Theme.getSize("print_setup_big_item").height height: UM.Theme.getSize("print_setup_big_item").height
@ -131,8 +130,6 @@ Item
SettingVisibilityPresetsMenu SettingVisibilityPresetsMenu
{ {
id: settingVisibilityPresetsMenu id: settingVisibilityPresetsMenu
x: settingVisibilityMenu.x
y: settingVisibilityMenu.y
onCollapseAllCategories: onCollapseAllCategories:
{ {
settingsSearchTimer.stop() settingsSearchTimer.stop()
@ -142,32 +139,32 @@ Item
} }
} }
UM.SimpleButton UM.BurgerButton
{ {
id: settingVisibilityMenu id: settingVisibilityMenu
anchors anchors
{ {
top: filterContainer.top verticalCenter: filterContainer.verticalCenter
bottom: filterContainer.bottom
right: parent.right 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: onClicked:
{ {
settingVisibilityPresetsMenu.popup( settingVisibilityPresetsMenu.popup(
settingVisibilityMenu, popupContainer,
-settingVisibilityPresetsMenu.width + UM.Theme.getSize("default_margin").width, -settingVisibilityPresetsMenu.width + UM.Theme.getSize("default_margin").width,
settingVisibilityMenu.height 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. // Mouse area that gathers the scroll events to not propagate it to the main view.
MouseArea MouseArea