Merge lp:~zsombi/ubuntu-ui-toolkit/dialog-size-fix into lp:ubuntu-ui-toolkit/staging

Proposed by Zsombor Egri
Status: Merged
Approved by: Zsombor Egri
Approved revision: 1270
Merged at revision: 1275
Proposed branch: lp:~zsombi/ubuntu-ui-toolkit/dialog-size-fix
Merge into: lp:ubuntu-ui-toolkit/staging
Diff against target: 86 lines (+47/-6)
2 files modified
modules/Ubuntu/Components/Popups/Dialog.qml (+3/-1)
tests/resources/popover/DialogTest.qml (+44/-5)
To merge this branch: bzr merge lp:~zsombi/ubuntu-ui-toolkit/dialog-size-fix
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Zoltan Balogh Approve
Review via email: mp+236654@code.launchpad.net

Commit message

Fix Dialog foreground sizing.

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 :

OK

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
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 'modules/Ubuntu/Components/Popups/Dialog.qml'
2--- modules/Ubuntu/Components/Popups/Dialog.qml 2014-08-27 12:12:06 +0000
3+++ modules/Ubuntu/Components/Popups/Dialog.qml 2014-10-01 10:22:47 +0000
4@@ -171,7 +171,7 @@
5 property real itemSpacing: units.gu(2)
6 property Item dismissArea: dialog.dismissArea
7
8- height: Math.min(childrenRect.height, dialog.height)
9+ height: Math.min(contentsColumn.height + foreground.margins, dialog.height)
10
11 Column {
12 id: contentsColumn
13@@ -193,6 +193,7 @@
14 elide: Text.ElideRight
15 fontSize: "large"
16 color: UbuntuColors.darkGrey
17+ visible: (text !== "")
18 }
19
20 Label {
21@@ -201,6 +202,7 @@
22 fontSize: "medium"
23 color: UbuntuColors.darkGrey
24 wrapMode: Text.Wrap
25+ visible: (text !== "")
26 }
27
28 onChildrenChanged: updateChildrenWidths()
29
30=== modified file 'tests/resources/popover/DialogTest.qml'
31--- tests/resources/popover/DialogTest.qml 2014-08-27 13:16:58 +0000
32+++ tests/resources/popover/DialogTest.qml 2014-10-01 10:22:47 +0000
33@@ -36,9 +36,48 @@
34 }
35 }
36
37- Button {
38- text: "Open dialog"
39- onClicked: PopupUtils.open(dialog)
40- }
41-
42+ Component {
43+ id: expanding
44+ Dialog {
45+ id: stylesDialog
46+ property real labelwidth: units.gu(11)
47+// title: "Title"
48+ //text: "text"
49+
50+ OptionSelector {
51+ model: ["One", "Two", "Three"]
52+ }
53+
54+ Row {
55+ Label {
56+ text: "Slider"
57+ verticalAlignment: Text.AlignVCenter
58+ width: labelwidth
59+ height: fontScaleSlider.height
60+ }
61+
62+ Slider {
63+ id: fontScaleSlider
64+ width: parent.width - labelwidth
65+ minimumValue: 0
66+ maximumValue: 12
67+ }
68+ }
69+ Button {
70+ text: i18n.tr("Close")
71+ onClicked: PopupUtils.close(stylesDialog)
72+ }
73+ }
74+ }
75+
76+ Column {
77+ Button {
78+ text: "Open dialog"
79+ onClicked: PopupUtils.open(dialog)
80+ }
81+ Button {
82+ text: "Open expanding dialog"
83+ onClicked: PopupUtils.open(expanding)
84+ }
85+ }
86 }

Subscribers

People subscribed via source and target branches