resolve binding loo in `SyncState`
move `updateCostPerMeter` function to root of `MaterialView` such that it is available of all sub components
Cura 8687
Forgot to update Readonly `SpinBox`es to Qt 2 when implementing Cura
8684. As the spinbox is used in various places with the same
functionality it made sense to create a reusable component.
There is still a feature gap in the implementation; The `SpinBox`es
from QtControls 2.x value is defined as an integer. For some use-cases
we do require a fractional value in the `SpinBox`. The only two places
where this is required are the `material_diameter` and
`material_density` fields in the material prefference page.
Cura 8684
- When both branches added Controls1 as OldControls, it's not marked as a merge conflict. But the merge removed the need for OldControls, so the import can be removed.
- There was one instance where I had removed the OldControls for a checkbox but there it should remain since the checkboxes are updated in a separate ticket.
Contributes to issue CURA-8684.
Conflicts:
plugins/ImageReader/ConfigUI.qml
plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml
plugins/PerObjectSettingsTool/SettingPickDialog.qml
resources/qml/Dialogs/DiscardOrKeepProfileChangesDialog.qml
resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml
resources/qml/Preferences/GeneralPage.qml
resources/qml/Preferences/Materials/MaterialsPage.qml
resources/qml/Preferences/Materials/MaterialsView.qml
resources/qml/Preferences/ProfilesPage.qml
These conflicts are all arising from headers/includes being updated at the same time, or from the two branches marking the other one's components as needing OldControls.
This introduced more OldControls markers which don't get marked as merge conflicts by Git. This happens when an element could just be left as the original name but from the new import (e.g. a Button stays a Button in Controls 2, but should be marked as from OldControls on the branch that doesn't update the Button).
This enables mouse-selectable for
- The image reader dialog
- Layer view text field (in simulation view)
- The TextField with unit component (for instace used to set the scale
of models)
- Rename dialog(s)
- Currency text field
- The settings filter text field
CURA-8684
The contents of the page is done with a simple page that becomes visible or not. The easiest solution I could think of. No StackLayout necessary here.
Contributes to issue CURA-8686.
This way it is re-useable, and no longer connected to the concept of a tab view.
We can then display it in the profile manager.
Contributes to issue CURA-8686.
This styles it for us automatically.
However the contents of the tab disappears now. I'll have to restore that, but since that moves a bunch of code I'd rather do that in a separate commit.
I also changed the item to a column so that we don't have to link up the anchors very weirdly/difficulty with all of the buttons and messages that are optional. This just automatically makes space if there need to be extra buttons and messages in between, and even deals with the spacing correctly.
Contributes to issue CURA-8686.
This was a bit of a doozy. One was really simple but the other one had me stumped for a while: The Controls2 version doesn't have the viewport property any more, so just use the width.
Contributes to issue CURA-8686.