- Text {
- id: caption
- font.pixelSize: 25
- anchors.centerIn: parent
- //color: Const.DEFAULT_FOREGROUND_COLOR
- text: root.label.length>28 ? root.label.substring(0,25)+"..." : root.label
- color: "black"
+ Rectangle {
+ id: bbar
+ anchors.verticalCenter: parent.verticalCenter
+ color: Const.TRANSPARENT
+ border.width: 2
+ //radius: 5
+ border.color: Const.DEFAULT_FOREGROUND_COLOR
+ height: 40
+ width: icon.visible?
+ root.width-icon.width-button.width-2*Const.DEFAULT_MARGIN :
+ root.width-button.width-1*Const.DEFAULT_MARGIN
+ //x: icon.visible? icon.width+5 : 0
+
+ Rectangle {
+ id: bar
+ height: parent.height
+ width: 0
+ x:0
+ color: Const.DEFAULT_FOREGROUND_COLOR
+ state: "right"
+
+ states: [
+ State {
+ name: "right"
+ },
+ State {
+ name: "left"
+ },
+ State {
+ name: "progress"
+ }
+ ]
+ }
+
+ Text {
+ id: caption
+ font.pixelSize: 25
+ anchors.centerIn: parent
+ //color: Const.DEFAULT_FOREGROUND_COLOR
+ text: root.label
+ width: bbar.width
+ elide: Text.ElideRight
+ horizontalAlignment: Text.AlignHCenter
+ color: "black"
+ }