2
* Copyright (C) 2015 Canonical, Ltd.
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation; version 3.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
import Ubuntu.Components 1.3
18
import Ubuntu.Components.Styles 1.3
23
property BottomEdge bottomEdge: styledItem
25
contentItem: loader.item
26
panelAnimation: panelBehavior
27
revealThreshold: bottomEdge.hint.height + units.gu(2)
29
// own styling properties
30
property color backgroundColor: Qt.rgba(0, 0, 0, Math.min(0.25, (height - revealThreshold - panelItem.y) / (height - revealThreshold)))
31
property color panelColor: theme.palette.normal.overlay
32
property color shadowColor: "#000000"
39
color: backgroundColor
45
objectName: "bottomedge_panel"
50
topMargin: bottomEdge.status >= BottomEdge.Revealed
51
? -(bottomEdge.height * bottomEdge.dragProgress)
54
height: loader.item ? loader.item.height : 0
56
opacity: bottomEdge.status >= BottomEdge.Revealed ? 1.0 : 0.0
58
Behavior on anchors.topMargin { UbuntuNumberAnimation { id: panelBehavior } }
60
state: bottomEdge.status > BottomEdge.Hidden ? "drop-hint" : ""
65
target: bottomEdge.hint
66
restoreEntryValues: false
67
status: BottomEdgeHint.Inactive
82
GradientStop { position: 0.0; color: Qt.rgba(shadowColor.r, shadowColor.g, shadowColor.b, 0.0) }
83
GradientStop { position: 0.75; color: Qt.rgba(shadowColor.r, shadowColor.g, shadowColor.b, 0.05) }
84
GradientStop { position: 1.0; color: Qt.rgba(shadowColor.r, shadowColor.g, shadowColor.b, 0.1) }
97
GradientStop { position: 0.0; color: Qt.rgba(shadowColor.r, shadowColor.g, shadowColor.b, 0.0) }
98
GradientStop { position: 0.75; color: Qt.rgba(shadowColor.r, shadowColor.g, shadowColor.b, 0.05) }
99
GradientStop { position: 1.0; color: Qt.rgba(shadowColor.r, shadowColor.g, shadowColor.b, 0.1) }
106
anchors.horizontalCenter: parent.horizontalCenter
108
source: bottomEdge.status > BottomEdge.Hidden ? bottomEdge.contentUrl : ""
109
sourceComponent: bottomEdge.status > BottomEdge.Hidden ? bottomEdge.contentComponent : null
112
item.parent = panelItem;
113
item.anchors.horizontalCenter = panelItem.horizontalCenter;