diff options
author | Nikita Krupenko <krnekit@gmail.com> | 2015-11-12 01:35:57 +0200 |
---|---|---|
committer | Nikita Krupenko <krnekit@gmail.com> | 2015-12-14 13:26:49 +0000 |
commit | f622e60c3d68bfe6eb2f73201fc4f451ab6c2dc7 (patch) | |
tree | 2a07f0c6572bc7fb22d4097e0ba30dc91d9cfcf2 /src/dialogs | |
parent | eabdd3ffefed6334f551e08f0adc2eb9cc5ede84 (diff) | |
download | qtquickcontrols-f622e60c3d68bfe6eb2f73201fc4f451ab6c2dc7.tar.gz |
Dialog: calculate buttons width when there is < 2 right buttons
Dialog wrapper calculate button box width only when there is at least 2
right buttons, which produce wrong button positions in other cases. This
change made Dialog to handle all cases.
[ChangeLog][Dialog] Properly handle width of button box when it has
less than two right buttons
Task-number: QTBUG-49380
Change-Id: Id033803e8b3c15cb465bf942eebc30ca77d58ad6
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'src/dialogs')
-rw-r--r-- | src/dialogs/DefaultDialogWrapper.qml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dialogs/DefaultDialogWrapper.qml b/src/dialogs/DefaultDialogWrapper.qml index c2ffffb7..a34ee97d 100644 --- a/src/dialogs/DefaultDialogWrapper.qml +++ b/src/dialogs/DefaultDialogWrapper.qml @@ -135,7 +135,7 @@ AbstractDialog { function setupButtons() { buttonsLeftRepeater.model = root.__standardButtonsLeftModel() buttonsRightRepeater.model = root.__standardButtonsRightModel() - if (!buttonsRightRepeater.model || buttonsRightRepeater.model.length < 2) + if (buttonsLeftRepeater.count + buttonsRightRepeater.count < 2) return; var calcWidth = 0; |