~yohanboniface/ubuntu-calendar-app/fix1280612

« back to all changes in this revision

Viewing changes to EventBubble.qml

  • Committer: Tarmac
  • Author(s): Kunal Parmar
  • Date: 2014-03-23 18:11:14 UTC
  • mfrom: (212.2.5 ubuntu-calendar-app)
  • Revision ID: tarmac-20140323181114-izuasbqcl2ddbmjr
fixes Bug #1279842
Setting minimum height of eventbubble to height of time label. Fixes: https://bugs.launchpad.net/bugs/1279842, https://bugs.launchpad.net/bugs/1294672.

Approved by Mihir Soni, Ubuntu Phone Apps Jenkins Bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
    property int wideType: 1;
11
11
    property int narrowType: 2;
12
12
 
 
13
    readonly property int minimumHeight: timeLabel.height
 
14
 
13
15
    signal clicked(var event);
14
16
 
15
17
    UbuntuShape{
44
46
        titleLabel.text = ""
45
47
        descriptionLabel.text = ""
46
48
 
47
 
        if( type == wideType) {
48
 
            timeLabel.text = timeString
49
 
 
 
49
        //height is less then set only event title
 
50
        if( height > minimumHeight ) {
 
51
            //on wide type show all details
 
52
            if( type == wideType) {
 
53
                timeLabel.text = timeString
 
54
 
 
55
                if( event.displayLabel)
 
56
                    titleLabel.text = event.displayLabel;
 
57
 
 
58
                if( event.description)
 
59
                    descriptionLabel.text = event.description
 
60
            } else {
 
61
                //narrow type shows only time and title
 
62
                timeLabel.text = startTime
 
63
 
 
64
                if( event.displayLabel)
 
65
                    titleLabel.text = event.displayLabel;
 
66
            }
 
67
        } else {
50
68
            if( event.displayLabel)
51
 
                titleLabel.text = event.displayLabel;
52
 
 
53
 
            if( event.description)
54
 
                descriptionLabel.text = event.description
55
 
        } else {
56
 
            timeLabel.text = startTime
 
69
                timeLabel.text = event.displayLabel;
57
70
        }
58
71
    }
59
72
 
86
99
            color:"black"
87
100
            wrapMode: Text.WrapAtWordBoundaryOrAnywhere
88
101
            width: parent.width
89
 
            visible: type == wideType
90
102
        }
91
103
 
92
104
        Label{