Cura/plugins/Toolbox/resources/qml/ToolboxTabButton.qml
Diego Prado Gesto 075a9a161f Create a component for the Views selector. This component contains the
list of the views and also the shortcuts for the camera position.

The theme colors, sizes and the styles have been updated.

Contributes to CURA-5784.
2018-10-08 12:57:16 +02:00

52 lines
1.6 KiB
QML

// Copyright (c) 2018 Ultimaker B.V.
// Toolbox is released under the terms of the LGPLv3 or higher.
import QtQuick 2.2
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.4
import UM 1.1 as UM
Button
{
property bool active: false
style: ButtonStyle
{
background: Rectangle
{
color: "transparent"
implicitWidth: UM.Theme.getSize("toolbox_header_tab").width
implicitHeight: UM.Theme.getSize("toolbox_header_tab").height
Rectangle
{
visible: control.active
color: UM.Theme.getColor("sidebar_header_highlight_hover")
anchors.bottom: parent.bottom
width: parent.width
height: UM.Theme.getSize("sidebar_header_highlight").height
}
}
label: Label
{
text: control.text
color:
{
if(control.hovered)
{
return UM.Theme.getColor("toolbox_header_button_text_hovered");
}
if(control.active)
{
return UM.Theme.getColor("toolbox_header_button_text_active");
}
else
{
return UM.Theme.getColor("toolbox_header_button_text_inactive");
}
}
font: control.enabled ? (control.active ? UM.Theme.getFont("medium_bold") : UM.Theme.getFont("medium")) : UM.Theme.getFont("default_italic")
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
}
}
}