~phablet-team/telephony-service/trunk

« back to all changes in this revision

Viewing changes to DetailViewMessages/MessageBubbleImage.qml

  • Committer: Tiago Salem Herrmann
  • Date: 2012-10-30 13:42:30 UTC
  • mfrom: (441.1.1 marumbi-new-dialer2)
  • mto: This revision was merged to the branch mainline in revision 442.
  • Revision ID: tiago.herrmann@canonical.com-20121030134230-4gykrrqtqkh89l0b
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
 */
16
16
 
17
17
import QtQuick 2.0
 
18
import Ubuntu.Components 0.1
18
19
 
19
20
// FIXME: when image to small in height, arrow is cropped
20
21
Item {
22
23
 
23
24
    property alias imageSource: image.source
24
25
    property bool mirrored: false
25
 
    property int maximumWidth: 400
26
 
    property int maximumHeight: 200
 
26
    property int maximumWidth: units.gu(50)
 
27
    property int maximumHeight: units.gu(25)
27
28
 
28
29
    width: bubble.width
29
30
    height: bubble.height
50
51
    BorderImage {
51
52
        id: bubble
52
53
 
53
 
        property int topPadding: 5
54
 
        property int bottomPadding: 6
55
 
        property int leftPadding: messageBubble.mirrored ? 6 : 14
56
 
        property int rightPadding: messageBubble.mirrored ? 14 : 6
 
54
        property int topPadding: units.gu(0.5)
 
55
        property int bottomPadding: units.gu(1)
 
56
        property int leftPadding: messageBubble.mirrored ? units.gu(1) : units.gu(2)
 
57
        property int rightPadding: messageBubble.mirrored ? units.gu(2) : units.gu(1)
57
58
 
58
59
        width: image.paintedWidth + leftPadding + rightPadding
59
60
        height: image.paintedHeight + topPadding + bottomPadding
60
61
        smooth: true
61
62
        source: messageBubble.mirrored ? "../assets/bubble_image_right.png" : "../assets/bubble_image_left.png"
62
 
        border {top: 20; bottom: 24; left: messageBubble.mirrored ? 19 : 27; right: messageBubble.mirrored ? 27 : 19}
 
63
        border {top: units.dp(20); bottom: units.dp(24); left: messageBubble.mirrored ? units.dp(19) : units.dp(27); right: messageBubble.mirrored ? units.dp(27) : units.dp(19)}
63
64
    }
64
65
}