mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-20 21:27:50 -06:00
CURA-5035 Clean-up
This commit is contained in:
parent
8f8d709b64
commit
921e8f7602
17 changed files with 181 additions and 350 deletions
51
plugins/Toolbox/resources/qml/ToolboxTabButton.qml
Normal file
51
plugins/Toolbox/resources/qml/ToolboxTabButton.qml
Normal file
|
@ -0,0 +1,51 @@
|
|||
// 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("base_unit").height * 8
|
||||
implicitHeight: UM.Theme.getSize("base_unit").height * 4
|
||||
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: Text
|
||||
{
|
||||
text: control.text
|
||||
color:
|
||||
{
|
||||
if( control.hovered )
|
||||
{
|
||||
return UM.Theme.getColor("topbar_button_text_hovered");
|
||||
}
|
||||
if( control.active )
|
||||
{
|
||||
return UM.Theme.getColor("topbar_button_text_active");
|
||||
}
|
||||
else
|
||||
{
|
||||
return UM.Theme.getColor("topbar_button_text_inactive");
|
||||
}
|
||||
}
|
||||
font: control.active ? UM.Theme.getFont("medium_bold") : UM.Theme.getFont("medium")
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue