mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-15 02:06:01 +08:00
Use re-usable TabRow component
Contributes to issue CURA-5876.
This commit is contained in:
parent
7f11142d50
commit
4c26262054
@ -29,22 +29,19 @@ Item
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TabBar
|
UM.TabRow
|
||||||
{
|
{
|
||||||
id: tabBar
|
id: tabBar
|
||||||
onCurrentIndexChanged: Cura.ExtruderManager.setActiveExtruderIndex(currentIndex)
|
|
||||||
anchors.top: header.bottom
|
anchors.top: header.bottom
|
||||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||||
width: parent.width
|
|
||||||
height: 50
|
onCurrentIndexChanged: Cura.ExtruderManager.setActiveExtruderIndex(currentIndex)
|
||||||
|
|
||||||
Repeater
|
Repeater
|
||||||
{
|
{
|
||||||
model: extrudersModel
|
model: extrudersModel
|
||||||
|
delegate: UM.TabRowButton
|
||||||
delegate: TabButton
|
|
||||||
{
|
{
|
||||||
width: ListView.view != null ? Math.round(ListView.view.width / extrudersModel.rowCount()): 0
|
|
||||||
height: parent.height
|
|
||||||
contentItem: Item
|
contentItem: Item
|
||||||
{
|
{
|
||||||
Cura.ExtruderIcon
|
Cura.ExtruderIcon
|
||||||
|
Loading…
x
Reference in New Issue
Block a user