By detaching the logic from the view custom handlers can be added to selecting printers. This was needed as the MachineSelector in the `WorkspaceDialog` needed to do something different from the `PreparMenu`.
CURA-9424
This causes a binding loop when using layouts like Column.
To resolve this the height/width of the popup in ExpandablePopup can now be set explicitly with contentWidth and contentHeight
For ExpandablePopups with contentItems that are not Layouts the implicitWidth/implicitHeight can be set directly in the contentItem.
CURA-8640
This will make the translations more reasonable (instead of translating "open file" and "from Disk" separately, which could make the some translation results making less sense.
CURA-8411
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.
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.
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.
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.
In order for that to be possible, the background border of the ExpandablePopup and the ExpandableComponent had to be exposed.
In addition, since in the `RowLayout` the `ConfigurationMenu` and the `MachineSelector` both draw a border around them, it means that there will be a double "divider" (one border line from each button). To overcome that, we set the spacing of the `RowLayout` as a `- border_width`, which ensures then that there will be only a single line of border between the two adjacent buttons.
CURA-8013
We created a new set of icons for Cura. These icons had to be reverted though because they weren't working out in the interface for the last release yet.
This unreverts them, basically adding them back hoping that we'll get them fixed in time for the next release.
Contributes to issue CURA-8342.
Revert "Revert "Fix merge conflict""
This reverts commit bb20e3307f.
Revert "Revert "Merge pull request #9716 from Ultimaker/CURA-8010_new_icons""
This reverts commit 70e4e9640e.
Revert "Revert "Fix typo in icon name""
This reverts commit 38ce22ba7c.
Revert "Revert "Add list for deprecated icons""
This reverts commit 119a957e7f.
Revert "Revert "Add Function icon""
This reverts commit 760726cf0b.
Revert "Revert "Switch out inherit icon""
This reverts commit 26afff6093.
Revert "Revert "Merge branch 'CURA-8205_Introduce_new_icons_in_Cura' of github.com:Ultimaker/Cura""
This reverts commit 6483db3d47.
Revert "Fix incorrect icons"
This reverts commit 02a4ade2a5.
We want to keep it this way so people can still make plugins work for older versions of Cura, like 3.6, where the 'api' field with just a single major version, instead of the 'supported_sdk_versions', which can be either a version-string like '7.6.0' or a list of version strings.
Subdivided the new icons in 3 size categories. As requested by UX
Used the company naming scheme for uniformity and easy recognition.
Known issues:
- Top/Bottom category wasn't taken into account by UX at the time. Since
this is a recent addition. Both the Walls and Top/Bottom will be updated.
- Cloud/Network connection icons 12px don't render correctly. Due to the
theme-ing.
- Extruder Icons do not render correctly.
CURA-8010_new_icons
The Cura 4.9 release will have expanded functionality. If you have a plug-in that uses this functionality, marking it as using SDK 7.5.0 will notify older Cura releases that they can't use that plug-in.
This widget can't set its width to the width of its children, since its children anchor to its right-hand side which depends on the width.
This fixes the following warning in the log:
2020-03-20 14:25:20,351 - WARNING - [MainThread] UM.Qt.QtApplication.__onQmlWarning [406]: file:///home/trin/Gedeeld/Projects/Cura/plugins/PrepareStage/PrepareMain.qml:16:5: QML ActionPanelWidget: Binding loop detected for property width
Done during Turbo Testing and Tooling.
In theory it should be possible to add stages, but there is no possiblity to add any other stage in between. Therefore I moved the weights by 10+n*10. So we can add 10 before prepare and 9 stages between those 3 known stages.
It is probably possible to set the same weight to multiple stages, but I'm not sure how Cura decides, which stage to take first then. By the moment the plugin's init is called? Or by alphabet?
Therefore putting some space in between the weights should give some clearity.
They can then decide if it needs to be there. For instance, the monitor stage doesn't want to have this panel. Also each stage can position it where they like, and in the near future I'll make a feature to let it decide whether or not to show the preview button.
Contributes to issue CURA-6086.