Merge lp:~andrewsomething/notes-app/note-width into lp:notes-app

Proposed by Andrew Starr-Bochicchio
Status: Needs review
Proposed branch: lp:~andrewsomething/notes-app/note-width
Merge into: lp:notes-app
Diff against target: 40 lines (+5/-3)
1 file modified
Components/NoteItem.qml (+5/-3)
To merge this branch: bzr merge lp:~andrewsomething/notes-app/note-width
Reviewer Review Type Date Requested Status
Ubuntu Phablet Team Pending
Review via email: mp+196811@code.launchpad.net

Commit message

When the width of the app is beyond a certain point, don't make notes fill the entire width.

Description of the change

As it is now, when the app is in a large window, the notes look wider than they should and stretched. This branch makes it so that when the width of the app is beyond a certain point, the notes don't fill the entire width.

The app could probably use some design guidance for when it is used on the desktop or on a tablet, but this at least makes it feel less awkward for now.

To post a comment you must log in.

Unmerged revisions

231. By Andrew Starr-Bochicchio

When the wide of the app is beyond a certain point, don't make notes fill the entire width.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Components/NoteItem.qml'
2--- Components/NoteItem.qml 2013-10-07 15:20:27 +0000
3+++ Components/NoteItem.qml 2013-11-27 01:48:23 +0000
4@@ -32,6 +32,7 @@
5 property real expandedHeight
6 property real actualExpandedHeight: Math.max(noteContent.contentHeight + units.gu(2), expandedHeight)
7 property bool isExpanded: false
8+ property bool wideAspect: notesMainWindow.width > units.gu(60)
9
10 signal noteDeleted
11 signal activated
12@@ -93,8 +94,9 @@
13
14 MixedEdit {
15 id: noteContent
16- width: parent.width
17+ width: wideAspect ? parent.width * 3/4 : parent.width
18 height: noteItem.height
19+ anchors.horizontalCenter: parent.horizontalCenter
20
21 opacity: noteItem.isExpanded ? 1.0 : 0.0
22 visible: opacity > 0.0
23@@ -111,7 +113,7 @@
24
25 CollapsedNote {
26 id: collapsedContent
27- anchors.fill: parent
28+ anchors.fill: noteContent
29 anchors.margins: units.gu(0.5)
30
31 height: noteItem.collapsedHeight
32@@ -119,7 +121,7 @@
33 }
34
35 CollapsedNoteDecorations {
36- anchors.fill: parent
37+ anchors.fill: noteContent
38 anchors.margins: units.gu(0.5)
39
40 date: noteItem.dateText

Subscribers

People subscribed via source and target branches