Merge lp:~zsombi/ubuntu-ui-toolkit/dialogFacelift into lp:ubuntu-ui-toolkit/staging

Proposed by Zsombor Egri
Status: Merged
Approved by: Zsombor Egri
Approved revision: 1744
Merged at revision: 1744
Proposed branch: lp:~zsombi/ubuntu-ui-toolkit/dialogFacelift
Merge into: lp:ubuntu-ui-toolkit/staging
Diff against target: 106 lines (+20/-28)
3 files modified
components.api (+2/-1)
examples/ubuntu-ui-toolkit-gallery/Dialog.qml (+3/-3)
src/Ubuntu/Components/Popups/1.3/Dialog.qml (+15/-24)
To merge this branch: bzr merge lp:~zsombi/ubuntu-ui-toolkit/dialogFacelift
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Zoltan Balogh Approve
Review via email: mp+279861@code.launchpad.net

Commit message

Add contentWidth and contentHeight to Dialog so foreground can be resized.

Description of the change

Add contentWidth and contentHeight to Dialog so foreground can be resized.

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

Good to go

review: Approve
1744. By Zsombor Egri

API fixed

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
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-12-07 17:02:28 +0000
3+++ components.api 2015-12-08 18:52:39 +0000
4@@ -409,10 +409,11 @@
5 Ubuntu.Components.Popups.Dialog 1.3: PopupBase
6 property Item caller
7 property double callerMargin
8+ property double contentHeight
9+ property double contentWidth
10 default property list<QtObject> contents
11 property double edgeMargins
12 property bool modal
13- property Item pointerTarget
14 property string text
15 property string title
16 Ubuntu.Components.ListItems.Divider 1.0 0.1: QQuickImageBase
17
18=== modified file 'examples/ubuntu-ui-toolkit-gallery/Dialog.qml'
19--- examples/ubuntu-ui-toolkit-gallery/Dialog.qml 2015-05-30 16:35:48 +0000
20+++ examples/ubuntu-ui-toolkit-gallery/Dialog.qml 2015-12-08 18:52:39 +0000
21@@ -26,7 +26,7 @@
22 documentation: "qml-ubuntu-components-popups-%1.html".arg(className.toLowerCase())
23
24 TemplateRow {
25- title: i18n.tr("Standard")
26+ title: i18n.tr("Dialog")
27
28 Button {
29 text: i18n.tr("Open")
30@@ -52,12 +52,12 @@
31 width: parent.width
32 spacing: units.gu(1)
33 Button {
34- width: parent.width/2
35+ width: parent.width/2 - row.spacing/2
36 text: "Cancel"
37 onClicked: PopupUtils.close(dialogue)
38 }
39 Button {
40- width: parent.width/2
41+ width: parent.width/2 - row.spacing/2
42 text: "Confirm"
43 color: UbuntuColors.green
44 onClicked: PopupUtils.close(dialogue)
45
46=== modified file 'src/Ubuntu/Components/Popups/1.3/Dialog.qml'
47--- src/Ubuntu/Components/Popups/1.3/Dialog.qml 2015-11-23 20:19:31 +0000
48+++ src/Ubuntu/Components/Popups/1.3/Dialog.qml 2015-12-08 18:52:39 +0000
49@@ -93,22 +93,13 @@
50 property alias text: foreground.text
51
52 /*!
53+ \deprecated
54 The Item such as a \l Button that the user interacted with to open the Dialog.
55 This property will be used for the automatic positioning of the Dialog next to
56 the caller, if possible.
57 */
58 property Item caller
59-
60- /*!
61- The property holds the item to which the pointer should be anchored to.
62- This can be same as the caller or any child of the caller. By default the
63- property is set to caller.
64- */
65- property Item pointerTarget
66- /*! \internal */
67- onPointerTargetChanged: {
68- console.debug("pointerTarget DEPRECATED")
69- }
70+ onCallerChanged: console.debug("caller DEPRECATED")
71
72 /*!
73 The property holds the margins from the dialog's dismissArea. The property
74@@ -132,19 +123,19 @@
75 */
76 property bool modal: true
77
78- /*
79- QtObject {
80- id: internal
81-
82- function updatePosition() {
83- var pos = new InternalPopupUtils.CallerPositioning(foreground, pointer, dialog, caller, pointerTarget, edgeMargins, callerMargin);
84- pos.auto();
85-
86- }
87- }
88-
89- Pointer { id: pointer }
90- */
91+ /*!
92+ \qmlproperty real contentWidth
93+ \since Ubuntu.Components 1.3
94+ Specifies the width of the dialog content.
95+ */
96+ property alias contentWidth: foreground.width
97+
98+ /*!
99+ \qmlproperty real contentHeight
100+ \since Ubuntu.Components 1.3
101+ Specifies the height of the dialog content.
102+ */
103+ property alias contentHeight: foreground.height
104
105 __foreground: foreground
106 __eventGrabber.enabled: modal

Subscribers

People subscribed via source and target branches