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

33 lines
877 B
QML
Raw Normal View History

import bb.cascades 1.4
Container {
signal refresh
2016-10-01 18:18:40 +00:00
property variant theme : Application.themeSupport.theme.colorTheme.style
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()
}
}
}
}
]
}