Merge lp:~pkunal-parmar/ubuntu-calendar-app/EventBubble-MinHeight into lp:ubuntu-calendar-app

Proposed by Kunal Parmar
Status: Merged
Approved by: Mihir Soni
Approved revision: 217
Merged at revision: 219
Proposed branch: lp:~pkunal-parmar/ubuntu-calendar-app/EventBubble-MinHeight
Merge into: lp:ubuntu-calendar-app
Diff against target: 92 lines (+26/-12)
3 files modified
EventBubble.qml (+22/-10)
TimeLineBase.qml (+3/-2)
WeekView.qml (+1/-0)
To merge this branch: bzr merge lp:~pkunal-parmar/ubuntu-calendar-app/EventBubble-MinHeight
Reviewer Review Type Date Requested Status
Mihir Soni Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+210947@code.launchpad.net

Commit message

fixes Bug #1279842
Setting minimum height of eventbubble to height of time label

Description of the change

fixes Bug #1279842
Setting minimum height of eventbubble to height of time label

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Mihir Soni (mihirsoni) wrote :

Looks good to me.

Thank you for the MR.

review: Approve
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Mihir Soni (mihirsoni) wrote :

Kunal , it seems you forgot to Merge Could you please merge with latest trunk.

review: Needs Fixing
217. By Kunal Parmar

merge from trunk

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Mihir Soni (mihirsoni) wrote :

Looks good, thank you.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'EventBubble.qml'
2--- EventBubble.qml 2013-09-28 03:48:02 +0000
3+++ EventBubble.qml 2014-03-23 14:28:16 +0000
4@@ -10,6 +10,8 @@
5 property int wideType: 1;
6 property int narrowType: 2;
7
8+ readonly property int minimumHeight: timeLabel.height
9+
10 signal clicked(var event);
11
12 UbuntuShape{
13@@ -44,16 +46,27 @@
14 titleLabel.text = ""
15 descriptionLabel.text = ""
16
17- if( type == wideType) {
18- timeLabel.text = timeString
19-
20+ //height is less then set only event title
21+ if( height > minimumHeight ) {
22+ //on wide type show all details
23+ if( type == wideType) {
24+ timeLabel.text = timeString
25+
26+ if( event.displayLabel)
27+ titleLabel.text = event.displayLabel;
28+
29+ if( event.description)
30+ descriptionLabel.text = event.description
31+ } else {
32+ //narrow type shows only time and title
33+ timeLabel.text = startTime
34+
35+ if( event.displayLabel)
36+ titleLabel.text = event.displayLabel;
37+ }
38+ } else {
39 if( event.displayLabel)
40- titleLabel.text = event.displayLabel;
41-
42- if( event.description)
43- descriptionLabel.text = event.description
44- } else {
45- timeLabel.text = startTime
46+ timeLabel.text = event.displayLabel;
47 }
48 }
49
50@@ -86,7 +99,6 @@
51 color:"black"
52 wrapMode: Text.WrapAtWordBoundaryOrAnywhere
53 width: parent.width
54- visible: type == wideType
55 }
56
57 Label{
58
59=== modified file 'TimeLineBase.qml'
60--- TimeLineBase.qml 2014-03-02 16:32:32 +0000
61+++ TimeLineBase.qml 2014-03-23 14:28:16 +0000
62@@ -72,7 +72,6 @@
63 function createEvent( event ,hour) {
64 var eventBubble = delegate.createObject(bubbleOverLay);
65 eventBubble.clicked.connect( bubbleOverLay.showEventDetails );
66- eventBubble.event = event
67
68 var yPos = (( event.startDateTime.getMinutes() * hourHeight) / 60) + hour * hourHeight
69 eventBubble.y = yPos;
70@@ -80,7 +79,9 @@
71 var durationMin = (event.endDateTime.getHours() - event.startDateTime.getHours()) * 60;
72 durationMin += (event.endDateTime.getMinutes() - event.startDateTime.getMinutes());
73 var height = (durationMin * hourHeight )/ 60;
74- eventBubble.height = height;
75+ eventBubble.height = (height > eventBubble.minimumHeight) ? height:eventBubble.minimumHeight ;
76+
77+ eventBubble.event = event
78 }
79
80 function showSeparator(hour) {
81
82=== modified file 'WeekView.qml'
83--- WeekView.qml 2014-03-22 04:43:11 +0000
84+++ WeekView.qml 2014-03-23 14:28:16 +0000
85@@ -69,6 +69,7 @@
86
87 width: parent.width
88 height: parent.height
89+
90 startDay: getWeekStart();
91
92 Connections{

Subscribers

People subscribed via source and target branches

to status/vote changes: