2 * Copyright (C) 2016 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/>.
18import Lomiri.Components 1.3
23 // This property holds the delay (milliseconds) after which the tool tip is shown.
24 // A tooltip with a negative delay is shown immediately. The default value is 500 ms.
25 property int delay: 500
27 // This property holds the text shown on the tool tip.
28 property alias text: label.text
30 aspect: LomiriShape.Flat
31 color: theme.palette.normal.background
32 width: label.implicitWidth + units.gu(4)
33 height: label.implicitHeight + units.gu(2)
39 rightMargin: -units.dp(4)
40 verticalCenter: parent.verticalCenter
42 source: "graphics/quicklist_tooltip.png"
48 anchors.centerIn: parent
49 color: theme.palette.normal.backgroundText
65 from: ""; to: "visible"
67 PauseAnimation { duration: root.delay }
68 LomiriNumberAnimation { target: root; property: "opacity"; duration: LomiriAnimation.BriskDuration }