QNMTitle.qml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. import QtQuick 1.1
  2. import com.nokia.meego 1.0
  3. Rectangle {
  4. id: titleTextBackground
  5. property alias text: titletext.text
  6. property int sizFont: userTheme.pageTitleFontSize
  7. property alias image: imgTitle.source
  8. property alias busy: titleBusy.running
  9. width: parent.width
  10. height: userTheme.pageTitleAreaHeight
  11. x: 0
  12. y: 0
  13. z: 1
  14. //color: theme.pageTitleAreaColor
  15. gradient: Gradient {
  16. GradientStop { position: 0.0; color: "darkblue" }
  17. GradientStop { position: 0.5; color: "blue" }
  18. GradientStop { position: 1; color: "darkblue" }
  19. }
  20. Item{
  21. id: titleItem
  22. anchors.fill: parent
  23. Image {
  24. id: imgTitle
  25. anchors.verticalCenter: parent.verticalCenter
  26. anchors.left: parent.left
  27. anchors.leftMargin: 10
  28. source: ""
  29. height: userTheme.pageTitleAreaHeight - 8
  30. width: userTheme.pageTitleAreaHeight - 8
  31. smooth: true
  32. visible: imgTitle.source != ""
  33. }
  34. Label {
  35. id: titletext
  36. anchors.left: imgTitle.right
  37. anchors.leftMargin: 10
  38. anchors.verticalCenter: parent.verticalCenter
  39. x: 2 * userTheme.defaultMargin
  40. font.family: userTheme.pageTitleFontFamily
  41. font.pixelSize: sizFont
  42. color: userTheme.pageTitleFontColor
  43. visible: text != ""
  44. }
  45. BusyIndicator {
  46. id: titleBusy
  47. anchors.verticalCenter: parent.verticalCenter
  48. anchors.right: parent.right
  49. anchors.rightMargin: 10
  50. running: false
  51. visible: titleBusy.running
  52. platformStyle: BusyIndicatorStyle {
  53. spinnerFrames: "image://theme/spinner"+"inverted"
  54. }
  55. }
  56. }
  57. } //Rectangle - title