Merge pull request #14161 from Ultimaker/CURA-9522_material_list

[CURA-9522] Material list styled oddly
This commit is contained in:
Casper Lamboo 2023-01-02 10:46:04 +01:00 committed by GitHub
commit 5c65ba5058
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
{
id: colorPopup
implicitX: parent.width
property int itemHovered: 0
Column

View File

@ -19,7 +19,7 @@ Popup
implicitHeight: scrollViewContent.height + bottomPadding + topPadding
// 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
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 (mainWindow.width > materialBrandSubMenu.width)