The margin around the icon didn't work if the icon source was none, because it was provided a QSize rather than a real.
The margin around the background didn't work at all because the background is automatically adjusted to fill the parent element, so it's best left out.
Contributes to issue CURA-8009.
Because this item is in a layout, the height gets overridden. We should use the preferredHeight, or the one it defaults to, implicitHeight.
Contributes to issue CURA-8009.
This adds an option to the TextField element to show an icon on the left side in the text field. The icon remains visible when the user types in something (it's not part of the placeholder string).
Then we use that optional icon for the search bar in the Digital Library.
Contributes to issue CURA-8009.
This is the standard style for text fields in Cura. The spacing around the search icon is customised with the best approximation I could get using a simple string of placeholderText.
Contributes to issue CURA-8009.
Most people should be able to type 5 characters per second. And those that can't will just have to see it refresh after every stroke.
Contributes to issue CURA-8009.
Otherwise when we refresh the project list after searching it would put the new results at the end. That's not what we want.
Contributes to issue CURA-8009.
This passes the filter on to the API call and causes the API call, so that we only get the projects that the user searched for.
Contributes to issue CURA-8009.
Seems to work fine.
The pyqtSignal is not technically necessary unless we display this filter in the interface anywhere. We don't currently. If the signal is not present it would complain about non-notifyable properties. And making it a slot instead of a signal seems a bit unintuitive to me in how the field is being used.
Contributes to issue CURA-8009.
This is something our UX designer wants to change for all expandable header bar menus. The down arrow indicates that something will pop-up downwards once clicked. It is unnecessary to feedback the state of the expansion in the icon.
Contributes to CURA-8008.
This was a desire from the developer. It shouldn't be consistent with the printer selector. The margins being all the same is more important.
Contributes to issue CURA-8008.
Users with an account and an UM printer should have some basic access to the Digital Library. To this end, and to remain future proof, the online team has made an extension to its API so now feature budgets can be gauge. At the moment it's only checked wether the user has any access to personal projects at all. If so, the interface shows Digital Library functionality. Known issue: Removing the last printer from DF while still logged in leaves the DL access in the Cura interface until logged out or Cura restarted. Additionally, I think the response for a logged in user without any printer from the API is just 'data = empty list' instead of everything set to False and 0 (which should be the case as they're all listed as required fields in their docs ... maybe I'm missing something). In any case, the code as is now can handle that as well.
CURA-8138
It's quite different in detail because there is a lot less content to show here (no machine type, icons, etc), but the basics are the same now.
One possible issue is that the button doesn't extend all the way to the right, so you can't click everywhere on the shortest item. I'll see if that can still be fixed.
Contributes to issue CURA-8008.
The layout isn't quite there yet, but it mostly works and I want to have a save point to return to if I tinker too much.
Contributes to issue CURA-8008.
It was quite a hassle to allow the column to grow to the size of its contents. For some reason, things update the size to 0. And the size updates again once the pop-up actually gets opened for the first time, because then the column actually gets populated lazily.
Contributes to issue CURA-8008.
If there's just 1 provider, show the button. If there are multiple, show the menu. If there are 0, also show the button but disable the button.
The behaviour is not yet implemented though. It doesn't actually look at which providers are available and what they do.
Contributes to issue CURA-8008.
All of what we were about to implement is already implemented in ExpandablePopup. So let's re-use that one. That guarantees that it looks consistent too.
Contributes to issue CURA-8008.
And show an error message to the user in that case.
This could happen if the user modified their installation or their resource folder.
Fixes Sentry issue CURA-2P2.
This re-links the widths, heights and paddings such that we can later change the width of the button depending on its contents.
However there is a complication: Buttons automatically change the size of the contents based on the size of the button minus its padding. So making the size of the button in turn depend on its contents causes a binding loop.
To get around this binding loop, we need to manually calculate the size of the button, such that the size of the contents ends up exactly right.
Contributes to issue CURA-8008.
The new button should be consistent with the looks of the tool buttons. I've given it the same size as the inner part of the tool buttons, reworked the background so that it matches. I'm also giving it the 'secondary button' style which is also used for one other button. But that other detail button should get the same style anyway so that's fine too.
I've also turned this icon into an actual button. That way it can get focus when using keyboard navigation and works better with tools for blind and such.
Contributes to issue CURA-8202.
The icon was rendered at a too small size, such that it would get a different line width or look-and-feel than the rest. However making it bigger doesn't properly centre it either.
To centre it we also reduced the margin.
Contributes to issue CURA-8202.
For some reason, the prepare menu is still one pixel too small. I think it's got to do with that one being a layout rather than a normal row.
Contributes to issue CURA-8202.