From 69fc1e5bfb85b7fc71c1b50b24a03b8ceae54981 Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Mon, 22 Oct 2018 10:30:06 +0200 Subject: [PATCH] Reuse ActionButton component to create the toolbox shortcut. Contributes to CURA-5784. --- resources/qml/MainWindow/MainWindowHeader.qml | 27 +++++-------------- 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/resources/qml/MainWindow/MainWindowHeader.qml b/resources/qml/MainWindow/MainWindowHeader.qml index b90968c606..3de4dc7865 100644 --- a/resources/qml/MainWindow/MainWindowHeader.qml +++ b/resources/qml/MainWindow/MainWindowHeader.qml @@ -70,33 +70,20 @@ Rectangle } // Shortcut button to quick access the Toolbox - Button + Cura.ActionButton { - id: toolboxShortcutButton anchors { right: accountWidget.left rightMargin: UM.Theme.getSize("default_margin").width 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") - color: UM.Theme.getColor("main_window_header_button_text_active") - font: UM.Theme.getFont("action_button") - renderType: Text.NativeRendering - } - - } - action: Cura.Actions.browsePackages + text: catalog.i18nc("@action:button", "Toolbox") + color: UM.Theme.getColor("main_window_header_button_background_active") + hoverColor: UM.Theme.getColor("secondary") + 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() } AccountWidget