Cura/resources/qml/ObjectItemButton.qml
Diego Prado Gesto 7b030a8235 Move the objectsList to the bottom
Now it appears as a panel that you can expand/collapse. For now the background is transparent waiting for the designs to be clear.
2019-03-03 20:10:14 +01:00

55 lines
1.6 KiB
QML

// Copyright (c) 2018 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.7
import QtQuick.Controls 2.1
import UM 1.1 as UM
import Cura 1.0 as Cura
Button
{
id: objectItemButton
width: parent.width
height: UM.Theme.getSize("action_button").height
leftPadding: UM.Theme.getSize("thin_margin").width
rightPadding: UM.Theme.getSize("thin_margin").width
checkable: true
hoverEnabled: true
contentItem: Item
{
width: objectItemButton.width - objectItemButton.leftPadding
height: UM.Theme.getSize("action_button").height
Label
{
id: buttonText
anchors
{
left: parent.left
right: parent.right
verticalCenter: parent.verticalCenter
}
text: objectItemButton.text
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text_scene")
visible: text != ""
renderType: Text.NativeRendering
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight
}
}
background: Rectangle
{
id: backgroundRect
color: objectItemButton.hovered ? UM.Theme.getColor("action_button_hovered") : "transparent"
radius: UM.Theme.getSize("action_button_radius").width
border.width: UM.Theme.getSize("default_lining").width
border.color: objectItemButton.checked ? UM.Theme.getColor("primary") : "transparent"
}
onClicked: Cura.SceneController.changeSelection(index)
}