Merge lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/textDocument into lp:ubuntu-ui-toolkit/staging

Proposed by Cris Dywan
Status: Merged
Approved by: Tim Peeters
Approved revision: 1453
Merged at revision: 1516
Proposed branch: lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/textDocument
Merge into: lp:ubuntu-ui-toolkit/staging
Diff against target: 49 lines (+22/-0)
2 files modified
components.api (+3/-0)
modules/Ubuntu/Components/1.3/TextArea.qml (+19/-0)
To merge this branch: bzr merge lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/textDocument
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Tim Peeters Approve
Michael Zanetti (community) Approve
Review via email: mp+252798@code.launchpad.net

Commit message

Expose textDocument of TextField

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1449. By Cris Dywan

Move textDocument from TextField to TextArea

1450. By Cris Dywan

Also expose paintedWidth and paintedHeight on TextArea

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Michael Zanetti (mzanetti) wrote :

paintedWidth/paintedHight does have the values of the TextEdit's paintedWidth/paintedHight, but the TextArea adds some margins around. I wonder if that shouldn't be taken into account on the outer api. If you decide to change the margins around the TextEdit an app using paintedWidth/paintedHight would need to be adjusted as it stands now.

Apart from that, the textDocument property seems to work fine in reminder-app's RTF editor and using that doesn't seem to break anything in the TextArea for me either.

review: Needs Information
1451. By Cris Dywan

Include frameSpacing in paintedWidth/ Height

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Michael Zanetti (mzanetti) wrote :

+1 from a reminders-app point of view. I'll yet you SDK guys judge on whether this requires tests or not.

review: Approve
Revision history for this message
Tim Peeters (tpeeters) wrote :

Should the new API be in Ubuntu.Components 1.3 only?

review: Needs Information
Revision history for this message
Tim Peeters (tpeeters) :
review: Needs Fixing
1452. By Cris Dywan

Merge lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/staging

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Tim Peeters (tpeeters) wrote :

please update components.api

1453. By Cris Dywan

Update components.api

Revision history for this message
Tim Peeters (tpeeters) wrote :

thanks

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'components.api'
2--- components.api 2015-05-20 11:32:11 +0000
3+++ components.api 2015-05-22 11:18:53 +0000
4@@ -1051,6 +1051,8 @@
5 function var remove(var start, var end)
6 function var undo()
7 property int mouseSelectionMode
8+ readonly property double paintedHeight
9+ readonly property double paintedWidth
10 property bool persistentSelection
11 property string placeholderText
12 property var popover
13@@ -1063,6 +1065,7 @@
14 readonly property int selectionEnd
15 readonly property int selectionStart
16 property string text
17+ readonly property QQuickTextDocument textDocument
18 property int textFormat
19 property int verticalAlignment
20 property int wrapMode
21
22=== modified file 'modules/Ubuntu/Components/1.3/TextArea.qml'
23--- modules/Ubuntu/Components/1.3/TextArea.qml 2015-04-29 08:55:31 +0000
24+++ modules/Ubuntu/Components/1.3/TextArea.qml 2015-05-22 11:18:53 +0000
25@@ -315,6 +315,25 @@
26 property alias inputMethodComposing: editor.inputMethodComposing
27
28 /*!
29+ Exposes the QQuickTextDocument which can be used to implement advanced
30+ formatting and syntax highlighting (QSyntaxHighlighter) with C++.
31+ \qmlproperty var textDocument
32+ */
33+ property alias textDocument: editor.textDocument
34+
35+ /*!
36+ Exposes the paintedWidth of the underlying text component. It's required
37+ if the application uses its own Flickable for scrolling.
38+ */
39+ readonly property real paintedWidth: editor.paintedWidth + internal.frameSpacing
40+
41+ /*!
42+ Exposes the paintedHeight of the underlying text component. It's required
43+ if the application uses its own Flickable for scrolling.
44+ */
45+ readonly property real paintedHeight: editor.paintedHeight + internal.frameSpacing
46+
47+ /*!
48 Provides hints to the input method about the expected content of the text
49 edit and how it should operate.
50

Subscribers

People subscribed via source and target branches