This repository has been archived on 2023-11-19. You can view files and clone it, but cannot push or open issues or pull requests.
goober-bb10/assets/RefreshItem.qml
2016-10-01 06:40:48 -07:00

29 lines
790 B
QML

import bb.cascades 1.4
Container {
signal refresh
Label {
id: label_refresh
text: qsTr("Load Newer")
horizontalAlignment: HorizontalAlignment.Center
}
ImageView {
id: icon_refresh
imageSource: "asset:///icons/refresh.png"
horizontalAlignment: HorizontalAlignment.Center
filterColor: (theme == VisualStyle.Bright) ? Color.Black : false
}
Divider {}
attachedObjects: [
LayoutUpdateHandler {
onLayoutFrameChanged: {
icon_refresh.rotationZ = layoutFrame.y
if (layoutFrame.y >= 0.0 * layoutFrame.height) {
if (layoutFrame.y == 0) {
refresh()
}
}
}
}
]
}