~phablet-team/telephony-service/trunk

« back to all changes in this revision

Viewing changes to Widgets/FramedImage.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
Item {
20
21
    id: framedImage
63
64
    BorderImage {
64
65
        id: frame
65
66
 
66
 
        property bool big: framedImage.width >= 100
67
 
        property int borderSize: big ? 6 : 3
 
67
        property bool big: framedImage.width >= units.gu(13)
 
68
        property int borderSize: big ? units.dp(6) : units.dp(3)
68
69
 
69
70
        source: {
70
71
            if (framedImage.frameSource != "") {
79
80
        }
80
81
 
81
82
        anchors.fill: image
82
 
        anchors.topMargin: big ? -1 : 0
83
 
        anchors.bottomMargin: big ? -2 : -1
84
 
        anchors.leftMargin: big ? -1 : 0
85
 
        anchors.rightMargin: big ? -1 : 0
 
83
        anchors.topMargin: big ? -units.dp(1) : 0
 
84
        anchors.bottomMargin: big ? -units.dp(2) : -units.dp(1)
 
85
        anchors.leftMargin: big ? -units.dp(1) : 0
 
86
        anchors.rightMargin: big ? -units.dp(1) : 0
86
87
 
87
88
        border {
88
89
            left: borderSize