This fixes a mysterious segfault. We still don't know why the segfault occurred though. All we know is that QML logs something about a binding loop on currentIndex, and Qt logs something about removing range [-1 through 0] from VisualItemModel. When the tab bar is then made visible, Cura crashes. It is a nondeterministic crash. After this change, we are not seeing it any more (but with any nondeterministic bug, it's hard to verify that it was actually fixed).
Contributes to issue CURA-5876.
This actually changes the secondary colour to be darker for the dark theme, to be more in line with the general theme then.
Contributes to issue CURA-5876.
And make sure the checkbox for enabling also disappears.
We don't want to make this dependent on the number of enabled extruders, but on the total number of extruders. This way you can actually re-enable an extruder again because the tab bar shouldn't disappear.
Contributes to issue CURA-5876.
This is necessary because when you click it, the 'checked' property no longer depends on the active extruder. So prevent it from being clicked at all and handle the click separately in this MouseArea.
Contributes to issue CURA-5876.
Only when actually clicking the tab should it change the active extruder index; not when the current index is changed for any other reason.
Next up: Don't change the current index for any other reason.
Contributes to issue CURA-5876.