/* * dialer - QML User Interface Component * * Copyright (c) 2011, Tom Swindell. * * This program is licensed under the terms and conditions of the * Apache License, version 2.0. The full text of the Apache License is at * http://www.apache.org/licenses/LICENSE-2.0 * */ import QtQuick 2.0 Item { id: root anchors.fill: parent states: [ State { name: 'shown' PropertyChanges {target: root; visible: true} }, State { name: 'hidden' PropertyChanges {target: root; visible: false} } ] Behavior on visible {PropertyAnimation {duration: 250}} Rectangle { id: blind anchors.fill: parent color: 'black' opacity: 0.7 } MouseArea { anchors.fill: parent onPressed: { root.state = 'hidden' } } }