2
* Copyright (C) 2011 by Daker Fernandes Pinheiro <dakerfp@gmail.com>
3
* Copyright (C) 2011 Marco Martin <mart@kde.org>
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU Library General Public License as
7
* published by the Free Software Foundation; either version 2, or
8
* (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details
15
* You should have received a copy of the GNU Library General Public
16
* License along with this program; if not, write to the
17
* Free Software Foundation, Inc.,
18
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22
import org.kde.plasma.core 0.1 as PlasmaCore
25
PlasmaCore.FrameSvgItem {
28
imagePath:"widgets/scrollbar"
29
prefix: internalLoader.isVertical ? "background-vertical" : "background-horizontal"
35
easing.type: Easing.OutQuad
39
property Item handle: handle
41
property Item contents: contents
46
PlasmaCore.FrameSvgItem {
48
imagePath:"widgets/scrollbar"
55
if (internalLoader.isVertical) {
56
nh = flickableItem.visibleArea.heightRatio * internalLoader.height
58
nh = flickableItem.visibleArea.widthRatio * internalLoader.width
61
if (internalLoader.isVertical) {
62
ny = flickableItem.visibleArea.yPosition * internalLoader.height
64
ny = flickableItem.visibleArea.xPosition * internalLoader.width
70
if (internalLoader.isVertical) {
71
t = Math.ceil(internalLoader.height - 3 - ny)
73
t = Math.ceil(internalLoader.width - 3 - ny)
86
width: internalLoader.isVertical ? parent.width : length()
87
height: internalLoader.isVertical ? length() : parent.height
91
property MouseArea mouseArea: null
96
if (flickableItem.moving) {
97
opacityTimer.running = false
98
background.opacity = 1
100
opacityTimer.restart()
110
background.opacity = 0