diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 0ee68973f9..cea32b2abf 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -301,7 +301,7 @@ UM.MainWindow //style: UM.Theme.styles.open_file_button text: catalog.i18nc("@action:button","Open File"); iconSource: UM.Theme.icons.open - style: UM.Theme.styles.tool_button; + style: UM.Theme.styles.open_file_button tooltip: ''; anchors { diff --git a/resources/themes/cura/styles.qml b/resources/themes/cura/styles.qml index 3bb1b98c56..0c368ecb00 100644 --- a/resources/themes/cura/styles.qml +++ b/resources/themes/cura/styles.qml @@ -56,23 +56,39 @@ QtObject { property Component open_file_button: Component { ButtonStyle { background: Item{ - implicitWidth: UM.Theme.sizes.loadfile_button.width - implicitHeight: UM.Theme.sizes.loadfile_button.height + implicitWidth: UM.Theme.sizes.button.width; + implicitHeight: UM.Theme.sizes.button.width; Rectangle { - width: parent.width - height: parent.height + anchors.left: parent.right + anchors.verticalCenter: parent.verticalCenter + color: "white" + width: control.hovered ? openFileLabel.width : 0; + height: openFileLabel.height + Behavior on width { NumberAnimation { duration: 100; } } + opacity: control.hovered ? 1.0 : 0.0; + Behavior on opacity { NumberAnimation { duration: 100; } } + Label { + id: openFileLabel + anchors.bottom: parent.bottom + text: control.text + font: UM.Theme.fonts.button_tooltip; + color: UM.Theme.colors.button_tooltip_text; + } + } + Rectangle { + anchors.fill: parent; color: control.hovered ? UM.Theme.colors.load_save_button_hover : UM.Theme.colors.load_save_button Behavior on color { ColorAnimation { duration: 50; } } } - Label { - anchors.centerIn: parent - text: control.text - color: UM.Theme.colors.load_save_button_text - font: UM.Theme.fonts.default - } } - label: Label{ - visible: false + label: Item { + Image { + anchors.centerIn: parent; + source: control.iconSource; + width: UM.Theme.sizes.button_icon.width; + height: UM.Theme.sizes.button_icon.height; + sourceSize: UM.Theme.sizes.button_icon; + } } } }