mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07: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
|
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…
Add table
Add a link
Reference in a new issue