mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-09 06:45:09 -06:00
Replace button with reusable simple button
This commit is contained in:
parent
83be495414
commit
f71502fe38
1 changed files with 5 additions and 19 deletions
|
@ -1,4 +1,4 @@
|
||||||
// Copyright (c) 2018 Ultimaker B.V.
|
// Copyright (c) 2021 Ultimaker B.V.
|
||||||
// Cura is released under the terms of the LGPLv3 or higher.
|
// Cura is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
import QtQuick 2.2
|
import QtQuick 2.2
|
||||||
|
@ -41,35 +41,21 @@ Item
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
height: UM.Theme.getSize("jobspecs_line").height
|
height: UM.Theme.getSize("jobspecs_line").height
|
||||||
|
|
||||||
Button
|
UM.SimpleButton
|
||||||
{
|
{
|
||||||
id: printJobPencilIcon
|
id: printJobPencilIcon
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
width: UM.Theme.getSize("save_button_specs_icons").width
|
width: UM.Theme.getSize("save_button_specs_icons").width
|
||||||
height: UM.Theme.getSize("save_button_specs_icons").height
|
height: UM.Theme.getSize("save_button_specs_icons").height
|
||||||
|
iconSource: UM.Theme.getIcon("Pen")
|
||||||
|
hoverColor: UM.Theme.getColor("small_button_text_hover")
|
||||||
|
color: UM.Theme.getColor("small_button_text")
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
printJobTextfield.selectAll()
|
printJobTextfield.selectAll()
|
||||||
printJobTextfield.focus = true
|
printJobTextfield.focus = true
|
||||||
}
|
}
|
||||||
|
|
||||||
style: ButtonStyle
|
|
||||||
{
|
|
||||||
background: Item
|
|
||||||
{
|
|
||||||
UM.RecolorImage
|
|
||||||
{
|
|
||||||
width: UM.Theme.getSize("save_button_specs_icons").width
|
|
||||||
height: UM.Theme.getSize("save_button_specs_icons").height
|
|
||||||
sourceSize.width: width
|
|
||||||
sourceSize.height: width
|
|
||||||
color: control.hovered ? UM.Theme.getColor("small_button_text_hover") : UM.Theme.getColor("small_button_text")
|
|
||||||
source: UM.Theme.getIcon("Pen")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TextField
|
TextField
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue