Merge branch 'Ultimaker:main' into main

This commit is contained in:
Theodore S Lindsey 2023-01-02 22:45:11 -08:00 committed by GitHub
commit f2ce94c055
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View file

@ -215,6 +215,8 @@ Cura.MenuItem
MaterialBrandSubMenu MaterialBrandSubMenu
{ {
id: colorPopup id: colorPopup
implicitX: parent.width
property int itemHovered: 0 property int itemHovered: 0
Column Column

View file

@ -19,7 +19,7 @@ Popup
implicitHeight: scrollViewContent.height + bottomPadding + topPadding implicitHeight: scrollViewContent.height + bottomPadding + topPadding
// offset position relative to the parent // offset position relative to the parent
property int implicitX: parent.width property int implicitX: parent.width - UM.Theme.getSize("default_lining").width
property int implicitY: -UM.Theme.getSize("thin_margin").height property int implicitY: -UM.Theme.getSize("thin_margin").height
default property alias contents: scrollViewContent.children default property alias contents: scrollViewContent.children
@ -67,6 +67,10 @@ Popup
} }
} }
// Changing the height causes implicitWidth to change because of the scrollbar appearing/disappearing
// Reassign it here to update the value
materialBrandSubMenu.width = implicitWidth;
if (globalPosition.x > mainWindow.width - materialBrandSubMenu.width) if (globalPosition.x > mainWindow.width - materialBrandSubMenu.width)
{ {
if (mainWindow.width > materialBrandSubMenu.width) if (mainWindow.width > materialBrandSubMenu.width)