From 77c851ae356af3044968aa8c3ce9f72df210ca9f Mon Sep 17 00:00:00 2001 From: Giorgos Tsiapaliwkas Date: Wed, 16 Nov 2011 14:45:11 +0200 Subject: [PATCH] Resolve conflicts with master.ScrollDecorator.qml removed --- .../plasmacomponents/qml/ScrollDecorator.qml | 142 ------------------ 1 file changed, 142 deletions(-) delete mode 100644 declarativeimports/plasmacomponents/qml/ScrollDecorator.qml diff --git a/declarativeimports/plasmacomponents/qml/ScrollDecorator.qml b/declarativeimports/plasmacomponents/qml/ScrollDecorator.qml deleted file mode 100644 index b9b905abb..000000000 --- a/declarativeimports/plasmacomponents/qml/ScrollDecorator.qml +++ /dev/null @@ -1,142 +0,0 @@ -/* -* Copyright (C) 2011 by Daker Fernandes Pinheiro -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU Library General Public License as -* published by the Free Software Foundation; either version 2, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details -* -* You should have received a copy of the GNU Library General Public -* License along with this program; if not, write to the -* Free Software Foundation, Inc., -* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -*/ - -/**Documentanted API -Inherits: - Item - -Imports: - QtQuick 1.1 - org.kde.plasma.core - -Description: - It is a simple Radio button which is using the plasma theme. - TODO Do we need more info? - -Properties: - Flickable flickableItem - int orientation: - Sets the orientation of the ScrollDecorator. - For example,orientation: Qt.Vertical - - bool inverted: - Returns if the item is inverted or not - - bool _isVertical: - Returns if the item is vertical or not. - - bool _inverted: - - alias _value: -**/ - -import QtQuick 1.1 -import org.kde.plasma.core 0.1 as PlasmaCore - -Item { - id: scrollDecorator - - // Common API - property Flickable flickableItem - - // Plasma API - property int orientation: Qt.Vertical - property bool inverted: false - - // Convinience API - property bool _isVertical: orientation == Qt.Vertical - property bool _inverted: _isVertical ? - !scrollDecorator.inverted : scrollDecorator.inverted - property alias _value: range.value - - implicitWidth: _isVertical ? 16 : 200 - implicitHeight: _isVertical ? 200 : 16 - - visible: flickableItem && handle.width < contents.width - - anchors { - right: flickableItem.right - left: (orientation == Qt.Vertical) ? undefined : flickableItem.left - top: (orientation == Qt.Vertical) ? flickableItem.top : undefined - bottom: flickableItem.bottom - } - - Item { - width: _isVertical ? scrollDecorator.height : scrollDecorator.width - height: _isVertical ? scrollDecorator.width : scrollDecorator.height - rotation: _isVertical ? -90 : 0 - - anchors.centerIn: parent - - PlasmaCore.FrameSvgItem { - id: contents - imagePath: "widgets/scrollbar" - prefix: "background-horizontal" - - anchors.fill: parent - opacity: flickableItem && (flickableItem.flicking || flickableItem.moving) ? 1 : 0 - Behavior on opacity { - NumberAnimation { - duration: 250 - easing.type: Easing.OutQuad - } - } - - RangeModel { - id: range - - minimumValue: 0 - maximumValue: { - var diff; - if (_isVertical) - diff = flickableItem.contentHeight - flickableItem.height; - else - diff = flickableItem.contentWidth - flickableItem.width; - - return Math.max(0, diff); - } - stepSize: 0.0 - inverted: _inverted - positionAtMinimum: 0 + handle.width / 2 - positionAtMaximum: contents.width - handle.width / 2 - value: _isVertical ? flickableItem.contentY : flickableItem.contentX - } - - PlasmaCore.FrameSvgItem { - id: handle - - x: range.position - transform: Translate { x: - handle.width / 2 } - anchors.verticalCenter: parent.verticalCenter - width: { - var ratio; - if (_isVertical) - ratio = flickableItem.visibleArea.heightRatio; - else - ratio = flickableItem.visibleArea.widthRatio; - - return ratio * parent.width; - } - height: parent.height - margins.top // TODO: check mergin - imagePath: "widgets/scrollbar" - prefix: "slider" - } - } - } -} \ No newline at end of file