Merge lp:~mihirsoni/ubuntu-calendar-app/ReminderDesignFix-3 into lp:ubuntu-calendar-app

Proposed by Mihir Soni
Status: Merged
Approved by: Kunal Parmar
Approved revision: 531
Merged at revision: 552
Proposed branch: lp:~mihirsoni/ubuntu-calendar-app/ReminderDesignFix-3
Merge into: lp:ubuntu-calendar-app
Diff against target: 87 lines (+25/-42)
1 file modified
EventReminder.qml (+25/-42)
To merge this branch: bzr merge lp:~mihirsoni/ubuntu-calendar-app/ReminderDesignFix-3
Reviewer Review Type Date Requested Status
Kunal Parmar Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+239598@code.launchpad.net

Commit message

Reminder Design Fix

Description of the change

Reminder Design Fix

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: Approve (continuous-integration)
528. By Mihir Soni

Fixed height issue

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

merge with 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
Kunal Parmar (pkunal-parmar) wrote :

Code works fine and looks good, I have few improvements comments.

Added one inline comment regarding removing column.

Also can you add ScrollBar, depending on screen size we might need it ?

review: Needs Fixing
530. By Mihir Soni

Removed column , also added scrollbar

531. By Mihir Soni

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
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Mihir Soni (mihirsoni) wrote :

Hi Kunal,

Could you review this MP?

Revision history for this message
Kunal Parmar (pkunal-parmar) wrote :

looks good to me

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'EventReminder.qml'
2--- EventReminder.qml 2014-10-10 17:49:49 +0000
3+++ EventReminder.qml 2014-11-11 12:50:57 +0000
4@@ -49,58 +49,41 @@
5 pop();
6 }
7 }
8-
9+ Scrollbar{
10+ id:scrollList
11+ flickableItem: _pageFlickable
12+ anchors.fill :parent
13+ }
14 Flickable {
15 id: _pageFlickable
16
17+
18 clip: true
19 anchors.fill: parent
20- contentHeight: reminderModel.count * units.gu(7)
21-
22- Column {
23- id: _reminderColumn
24-
25- anchors {
26- top: parent.top
27- left: parent.left
28- right: parent.right
29+ contentHeight: _reminders.itemHeight * reminderModel.count + units.gu(2)
30+ ListItem.ItemSelector {
31+ id: _reminders
32+ expanded: true
33+ model: reminderModel
34+ delegate: selectorDelegate
35+ selectedIndex: reminderModel.get
36+ onSelectedIndexChanged: {
37+ root.reminderTime = reminderModel.get(selectedIndex).value
38 }
39
40- Repeater {
41- id: _reminders
42-
43- model: reminderModel
44-
45- ListItem.Standard {
46- id: _reminderDelegate
47-
48- property alias isChecked: reminderCheckbox.checked
49-
50- text: label
51- control: CheckBox {
52- id: reminderCheckbox
53-
54- checked: root.reminderTime === value
55-
56- onClicked: {
57- root.reminderTime = value
58- if (checked) {
59- // Ensures only one reminder option is selected
60- for(var i=0; i<reminderModel.count; i++) {
61- if(_reminders.itemAt(i).isChecked &&
62- i !== index) {
63- _reminders.itemAt(i).isChecked = false
64- }
65- }
66- }
67-
68- else {
69- checked = !checked
70- }
71- }
72+ Component.onCompleted: {
73+ for(var i=0; i<reminderModel.count; i++) {
74+ if (root.reminderTime === reminderModel.get(i).value){
75+ _reminders.selectedIndex = i
76+ return;
77 }
78 }
79 }
80 }
81+ Component {
82+ id: selectorDelegate
83+ OptionSelectorDelegate { text: label; }
84+ }
85+
86 }
87 }

Subscribers

People subscribed via source and target branches

to status/vote changes: