From e04f14b50c8967d063c90731b6e367ba5c996a9e Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 27 Nov 2018 12:01:05 +0100 Subject: [PATCH] Also add shadow to openFile button --- plugins/PrepareStage/PrepareMenu.qml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/plugins/PrepareStage/PrepareMenu.qml b/plugins/PrepareStage/PrepareMenu.qml index 81799206a0..31a78ed290 100644 --- a/plugins/PrepareStage/PrepareMenu.qml +++ b/plugins/PrepareStage/PrepareMenu.qml @@ -8,6 +8,7 @@ import QtQuick.Controls 2.3 import UM 1.3 as UM import Cura 1.1 as Cura +import QtGraphicalEffects 1.0 // For the dropshadow Item { @@ -107,12 +108,26 @@ Item background: Rectangle { + id: background height: UM.Theme.getSize("stage_menu").height width: UM.Theme.getSize("stage_menu").height radius: UM.Theme.getSize("default_radius").width color: openFileButton.hovered ? UM.Theme.getColor("action_button_hovered") : UM.Theme.getColor("action_button") } + DropShadow + { + id: shadow + // Don't blur the shadow + radius: 0 + anchors.fill: background + source: background + verticalOffset: 2 + visible: true + color: UM.Theme.getColor("action_button_shadow") + // Should always be drawn behind the background. + z: background.z - 1 + } } } }