/**************************************************************************** ** ** Copyright (C) 2011 Nokia Institute of Technology. ** All rights reserved. ** Contact: Manager (renato.chencarek@openbossa.org) ** ** This file is part of the Incredible Circus project. ** ** GNU Lesser General Public License Usage ** ** This file may be used under the terms of the GNU Lesser General Public ** License version 2.1 as published by the Free Software Foundation and ** appearing in the file LICENSE.LGPL included in the packaging of this ** file. Please review the following information to ensure the GNU Lesser ** General Public License version 2.1 requirements will be met: ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ****************************************************************************/ import QtQuick 1.1 import Circus 1.0 BorderImage { id: ribbon property double minimumRibbonWidth: root.width * 0.46 property double maximumRibbonWidth: root.width * 0.8 property double ribbonPreferredWidth: ribbonText.textSize.width + sourceSize.width property alias text: ribbonText.text width: (ribbonPreferredWidth < minimumRibbonWidth) ? minimumRibbonWidth : (ribbonPreferredWidth > maximumRibbonWidth) ? maximumRibbonWidth : ribbonPreferredWidth height: sourceSize.height source: "image://cache/common/ribbon.png" border { left: (sourceSize.width-1) / 2.0 right: (sourceSize.width-1) / 2.0 } horizontalTileMode: BorderImage.Repeat verticalTileMode: BorderImage.Stretch Label { id: ribbonText anchors { fill: parent bottomMargin: ribbon.height * 0.3 } verticalAlignment: Qt.AlignVCenter color: "#87fdfe" fontSize: 16 * scaleFactor } }