mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
Reuse ActionButton component to create the toolbox shortcut.
Contributes to CURA-5784.
This commit is contained in:
parent
fe216a7387
commit
69fc1e5bfb
1 changed files with 7 additions and 20 deletions
|
|
@ -70,33 +70,20 @@ Rectangle
|
||||||
}
|
}
|
||||||
|
|
||||||
// Shortcut button to quick access the Toolbox
|
// Shortcut button to quick access the Toolbox
|
||||||
Button
|
Cura.ActionButton
|
||||||
{
|
{
|
||||||
id: toolboxShortcutButton
|
|
||||||
anchors
|
anchors
|
||||||
{
|
{
|
||||||
right: accountWidget.left
|
right: accountWidget.left
|
||||||
rightMargin: UM.Theme.getSize("default_margin").width
|
rightMargin: UM.Theme.getSize("default_margin").width
|
||||||
verticalCenter: parent.verticalCenter
|
verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
style: ButtonStyle
|
|
||||||
{
|
|
||||||
background: Rectangle
|
|
||||||
{
|
|
||||||
color: control.hovered ? UM.Theme.getColor("secondary") : UM.Theme.getColor("main_window_header_button_background_active")
|
|
||||||
radius: 2 * screenScaleFactor
|
|
||||||
}
|
|
||||||
|
|
||||||
label: Label
|
|
||||||
{
|
|
||||||
text: catalog.i18nc("@action:button", "Toolbox")
|
text: catalog.i18nc("@action:button", "Toolbox")
|
||||||
color: UM.Theme.getColor("main_window_header_button_text_active")
|
color: UM.Theme.getColor("main_window_header_button_background_active")
|
||||||
font: UM.Theme.getFont("action_button")
|
hoverColor: UM.Theme.getColor("secondary")
|
||||||
renderType: Text.NativeRendering
|
textColor: UM.Theme.getColor("main_window_header_button_text_active")
|
||||||
}
|
textHoverColor: UM.Theme.getColor("main_window_header_button_text_active")
|
||||||
|
onClicked: Cura.Actions.browsePackages.trigger()
|
||||||
}
|
|
||||||
action: Cura.Actions.browsePackages
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AccountWidget
|
AccountWidget
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue