Merge lp:~ubuntu-sdk-team/ubuntu-system-settings/dropDialogSizeHack into lp:ubuntu-system-settings

Proposed by Cris Dywan
Status: Merged
Approved by: Jonas G. Drange
Approved revision: 1146
Merged at revision: 1195
Proposed branch: lp:~ubuntu-sdk-team/ubuntu-system-settings/dropDialogSizeHack
Merge into: lp:ubuntu-system-settings
Diff against target: 55 lines (+0/-45)
1 file modified
plugins/wifi/OtherNetwork.qml (+0/-45)
To merge this branch: bzr merge lp:~ubuntu-sdk-team/ubuntu-system-settings/dropDialogSizeHack
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Jonas G. Drange (community) Approve
Review via email: mp+239297@code.launchpad.net

Commit message

Remove the dialog internals resizing hack

To post a comment you must log in.
Revision history for this message
Jonas G. Drange (jonas-drange) wrote :

LGTM, thanks

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/wifi/OtherNetwork.qml'
2--- plugins/wifi/OtherNetwork.qml 2014-09-18 16:48:38 +0000
3+++ plugins/wifi/OtherNetwork.qml 2014-10-22 20:14:33 +0000
4@@ -31,51 +31,6 @@
5 objectName: "otherNetworkDialog"
6 anchorToKeyboard: true
7
8- /* The following is a (bad) workaround for bugs
9- #1337556
10- #1337555
11-
12- If the Dialog does not shrink after a user chooses e.g. WPA,
13- the anchorToKeyboard setting of OrientationHelper have no effect,
14- since the dialog never shrinks in size.
15-
16- This workaround resizes the Dialog.
17- */
18-
19- property int dialogVisualsHeight
20- function getVisibleChildren () {
21- var children = [feedback, networknameLabel, networkname,
22- securityListLabel, securityList, passwordListLabel,
23- password, passwordVisiblityRow, buttonRow];
24- var ret = [];
25- children.forEach(function (child) {
26- if (child.visible) {
27- ret.push(child);
28- }
29- });
30- return ret;
31- }
32-
33- function getVisibleChildrenHeight () {
34- var h = 0;
35- getVisibleChildren().forEach(function (child) {
36- h = h + child.height;
37- });
38- return h;
39- }
40-
41- Component.onCompleted: {
42- dialogVisualsHeight =
43- __foreground.height - getVisibleChildrenHeight();
44- }
45-
46- Binding {
47- target: __foreground
48- property: "height"
49- value: dialogVisualsHeight + getVisibleChildrenHeight()
50- when: dialogVisualsHeight
51- }
52-
53 function settingsValid() {
54 if(networkname.length == 0) {
55 return false;

Subscribers

People subscribed via source and target branches