animate toolbar hide when shown
This commit is contained in:
parent
7da0aaecfd
commit
7b45e4e529
@ -23,7 +23,11 @@ import org.kde.plasma.core 0.1 as PlasmaCore
|
||||
Item{
|
||||
id: toolBar
|
||||
width: parent.width
|
||||
height: theme.defaultFont.mSize.height*2 + frameSvg.margins.top + frameSvg.margins.bottom
|
||||
height: (tools && enabled) ? theme.defaultFont.mSize.height*2 + frameSvg.margins.top + frameSvg.margins.bottom : 0
|
||||
visible: height > 0
|
||||
Behavior on height {
|
||||
PropertyAnimation { duration: 250 }
|
||||
}
|
||||
|
||||
// The current set of tools; null if none.
|
||||
property Item tools
|
||||
@ -45,6 +49,8 @@ Item{
|
||||
toolBar.transition = transition
|
||||
toolBar.tools = tools
|
||||
}
|
||||
Connections {
|
||||
target: toolBar
|
||||
onToolsChanged: {
|
||||
var newContainer
|
||||
var oldContainer
|
||||
@ -106,6 +112,7 @@ Item{
|
||||
newContainer.opacity = 1
|
||||
oldContainer.opacity = 0
|
||||
}
|
||||
}
|
||||
|
||||
PlasmaCore.FrameSvgItem {
|
||||
id: frameSvg
|
||||
|
Loading…
Reference in New Issue
Block a user