It turns out that the order of these functions matters. So when we created a
function with only one param, it would actually give it the index. Removing
with the index didn't work, so the object would still be there. The Qt objects
would already be deleted which caused segfaults
CURA-9222
If only one filter is supplied to nameFilters, the index will always be -1. I assume this is because we are not selecting the file type in the Dialog, it just defaults to the only item.
This code should still work if the behaviour is changed in the future.
FileDialog now uses currentFolder instead of folder.
CURA-9214
I've simplified the dot spacing logic a bit.
For some reason the background does not line up perfectly with the slider. So when it is set to 0 there is still a slight offset on the slider handle.
CURA-9203
Not sure if it fixes it for all OSes, but the documentation says that this
is a platform specific setting and it increases it by 1.25 for me. Since
the velocity is in pixels/s, it makes sense to have it depend on the screenscale
factor
CURA-9182
I'm not entirely sure if this fixes it on windows, but it does at least fix things on Linux.
There are a few important changes to note here:
1. Increased the time of the fade timer to 200ms
2. Removed the mousearea, instead using the hover of scrollview
So why are these important? Nr 1 seems to be because updates seem to be faster? If I set it to 100
I could get it to work reasonably well on qt5, but in qt6, it's about 50% of the times that i'm too slow.
So we need the extra time.
As for the mouse area, it seems that the scrollview was eating up all the hover / containsMouse events.
As scrollview has the same properties that we need, we can just get rid of the mouseArea
CURA-9112
These are the enums from cura/API/account.py
somehow exposing these enums from python to QML doesn't work properly anymore
A better solution should be found in the very near future
CURA-9146
When scrolling the setting list, it was clearing the focus in order to close the pop-ups in the setting list. If pop-ups like for the infill pattern or extruder selection settings are not closed, the pop-up part is still rendered even if the user scrolls those settings out of view, causing the pop-up to appear somewhere on top of completely unrelated interface elements. It scrolls all the way to the top of the screen, effectively.
I couldn't find a way to cause pop-ups to be clipped with the rest of the contents of the ListView. They are always rendered on top due to the nature of the pop-up. I could find a way to trigger pop-ups to close upon changing the scrolled position without changing the focus, but that method was fairly complex with a bunch of `Connection`s and an extra signal. This is by far the simplest solution.
Contributes to issue CURA-9070.