summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Krupenko <krnekit@gmail.com>2015-11-12 01:35:57 +0200
committerNikita Krupenko <krnekit@gmail.com>2015-12-14 13:26:49 +0000
commitf622e60c3d68bfe6eb2f73201fc4f451ab6c2dc7 (patch)
tree2a07f0c6572bc7fb22d4097e0ba30dc91d9cfcf2
parenteabdd3ffefed6334f551e08f0adc2eb9cc5ede84 (diff)
downloadqtquickcontrols-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>
-rw-r--r--src/dialogs/DefaultDialogWrapper.qml2
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;