mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-05 21:13:58 -06:00
Use re-usable TabRow component
Contributes to issue CURA-5876.
This commit is contained in:
parent
7f11142d50
commit
4c26262054
1 changed files with 5 additions and 8 deletions
|
@ -29,22 +29,19 @@ Item
|
|||
}
|
||||
}
|
||||
|
||||
TabBar
|
||||
UM.TabRow
|
||||
{
|
||||
id: tabBar
|
||||
onCurrentIndexChanged: Cura.ExtruderManager.setActiveExtruderIndex(currentIndex)
|
||||
anchors.top: header.bottom
|
||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||
width: parent.width
|
||||
height: 50
|
||||
|
||||
onCurrentIndexChanged: Cura.ExtruderManager.setActiveExtruderIndex(currentIndex)
|
||||
|
||||
Repeater
|
||||
{
|
||||
model: extrudersModel
|
||||
|
||||
delegate: TabButton
|
||||
delegate: UM.TabRowButton
|
||||
{
|
||||
width: ListView.view != null ? Math.round(ListView.view.width / extrudersModel.rowCount()): 0
|
||||
height: parent.height
|
||||
contentItem: Item
|
||||
{
|
||||
Cura.ExtruderIcon
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue