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
=== modified file 'Components/NoteItem.qml'
--- Components/NoteItem.qml 2013-10-07 15:20:27 +0000
+++ Components/NoteItem.qml 2013-11-27 01:48:23 +0000
@@ -32,6 +32,7 @@
32 property real expandedHeight32 property real expandedHeight
33 property real actualExpandedHeight: Math.max(noteContent.contentHeight + units.gu(2), expandedHeight)33 property real actualExpandedHeight: Math.max(noteContent.contentHeight + units.gu(2), expandedHeight)
34 property bool isExpanded: false34 property bool isExpanded: false
35 property bool wideAspect: notesMainWindow.width > units.gu(60)
3536
36 signal noteDeleted37 signal noteDeleted
37 signal activated38 signal activated
@@ -93,8 +94,9 @@
9394
94 MixedEdit {95 MixedEdit {
95 id: noteContent96 id: noteContent
96 width: parent.width97 width: wideAspect ? parent.width * 3/4 : parent.width
97 height: noteItem.height98 height: noteItem.height
99 anchors.horizontalCenter: parent.horizontalCenter
98100
99 opacity: noteItem.isExpanded ? 1.0 : 0.0101 opacity: noteItem.isExpanded ? 1.0 : 0.0
100 visible: opacity > 0.0102 visible: opacity > 0.0
@@ -111,7 +113,7 @@
111113
112 CollapsedNote {114 CollapsedNote {
113 id: collapsedContent115 id: collapsedContent
114 anchors.fill: parent116 anchors.fill: noteContent
115 anchors.margins: units.gu(0.5)117 anchors.margins: units.gu(0.5)
116118
117 height: noteItem.collapsedHeight119 height: noteItem.collapsedHeight
@@ -119,7 +121,7 @@
119 }121 }
120122
121 CollapsedNoteDecorations {123 CollapsedNoteDecorations {
122 anchors.fill: parent124 anchors.fill: noteContent
123 anchors.margins: units.gu(0.5)125 anchors.margins: units.gu(0.5)
124126
125 date: noteItem.dateText127 date: noteItem.dateText

Subscribers

People subscribed via source and target branches