mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 01:15:51 +08:00
Also add shadow to openFile button
This commit is contained in:
parent
44c415ff78
commit
e04f14b50c
@ -8,6 +8,7 @@ import QtQuick.Controls 2.3
|
|||||||
import UM 1.3 as UM
|
import UM 1.3 as UM
|
||||||
import Cura 1.1 as Cura
|
import Cura 1.1 as Cura
|
||||||
|
|
||||||
|
import QtGraphicalEffects 1.0 // For the dropshadow
|
||||||
|
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
@ -107,12 +108,26 @@ Item
|
|||||||
|
|
||||||
background: Rectangle
|
background: Rectangle
|
||||||
{
|
{
|
||||||
|
id: background
|
||||||
height: UM.Theme.getSize("stage_menu").height
|
height: UM.Theme.getSize("stage_menu").height
|
||||||
width: UM.Theme.getSize("stage_menu").height
|
width: UM.Theme.getSize("stage_menu").height
|
||||||
|
|
||||||
radius: UM.Theme.getSize("default_radius").width
|
radius: UM.Theme.getSize("default_radius").width
|
||||||
color: openFileButton.hovered ? UM.Theme.getColor("action_button_hovered") : UM.Theme.getColor("action_button")
|
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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user