DialogMucInvite.qml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. import QtQuick 1.1
  2. DialogLiquid {
  3. id: dlgQuery
  4. signal clickedOk
  5. signal clickedCancel
  6. property string title: ""
  7. property int fontTitleSize: 24
  8. property string text: ""
  9. property int fontTextSize: 22
  10. width: parent.width*0.9
  11. height: headerDlg.height + dlgText.height + rowButtons.height + dlgText.anchors.topMargin + rowButtons.anchors.topMargin + 20
  12. Rectangle {
  13. id: headerDlg
  14. anchors.top: parent.top
  15. anchors.left: parent.left
  16. width: parent.width
  17. height: 70
  18. gradient: Gradient {
  19. GradientStop { position: 0; color: "#919191" }
  20. GradientStop { position: 1; color: "#666666" }
  21. }
  22. Text {
  23. anchors.centerIn: parent
  24. font.pixelSize: dlgQuery.fontTitleSize
  25. color: "white"
  26. text: dlgQuery.title
  27. }
  28. }
  29. Text {
  30. id: dlgText
  31. anchors.top: headerDlg.bottom; anchors.topMargin: 20
  32. anchors.left: parent.left; anchors.leftMargin: 10
  33. font.pixelSize: dlgQuery.fontTextSize
  34. width: parent.width - 10
  35. text: dlgQuery.text
  36. clip: true
  37. HorizontalGradient {
  38. anchors.left: parent.left
  39. anchors.top: parent.top
  40. height: parent.height
  41. width: parent.width
  42. gradient: Gradient {
  43. GradientStop { color: "transparent"; position: 0 }
  44. GradientStop { color: "transparent"; position: 0.8 }
  45. GradientStop { color: "white"; position: 0.95 }
  46. GradientStop { color: "white"; position: 1 }
  47. }
  48. }
  49. }
  50. /****************************************************/
  51. Row {
  52. id: rowButtons
  53. anchors.top: dlgText.bottom; anchors.topMargin: 20
  54. anchors.left: parent.left; anchors.leftMargin: 10
  55. spacing: 20
  56. Button {
  57. id: buttonOk
  58. height: 70
  59. text: qsTr("Ok")
  60. width: dlgQuery.width/2 - 20
  61. onClicked: {
  62. dlgQuery.clickedOk()
  63. dlgQuery.state = "hidden"
  64. }
  65. }
  66. Button {
  67. id: buttonCancel
  68. height: 70
  69. text: qsTr( "Cancel" )
  70. width: dlgQuery.width/2 - 20
  71. onClicked: {
  72. dlgQuery.clickedCancel()
  73. dlgQuery.state = "hidden"
  74. }
  75. }
  76. }
  77. /****************************************************/
  78. }