aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/imagine/DialogButtonBox.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports/controls/imagine/DialogButtonBox.qml')
-rw-r--r--src/imports/controls/imagine/DialogButtonBox.qml31
1 files changed, 15 insertions, 16 deletions
diff --git a/src/imports/controls/imagine/DialogButtonBox.qml b/src/imports/controls/imagine/DialogButtonBox.qml
index 69211ed9..ec1cbde8 100644
--- a/src/imports/controls/imagine/DialogButtonBox.qml
+++ b/src/imports/controls/imagine/DialogButtonBox.qml
@@ -34,24 +34,30 @@
**
****************************************************************************/
-import QtQuick 2.11
-import QtQuick.Templates 2.4 as T
-import QtQuick.Controls 2.4
-import QtQuick.Controls.Imagine 2.4
-import QtQuick.Controls.Imagine.impl 2.4
+import QtQuick 2.12
+import QtQuick.Templates 2.5 as T
+import QtQuick.Controls 2.5
+import QtQuick.Controls.Imagine 2.5
+import QtQuick.Controls.Imagine.impl 2.5
T.DialogButtonBox {
id: control
- implicitWidth: Math.max(background ? background.implicitWidth : 0,
- contentItem.implicitWidth + leftPadding + rightPadding)
- implicitHeight: Math.max(background ? background.implicitHeight : 0,
- contentItem.implicitHeight + topPadding + bottomPadding)
+ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
+ (control.count === 1 ? contentWidth * 2 : contentWidth) + leftPadding + rightPadding)
+ implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
+ contentHeight + topPadding + bottomPadding)
topPadding: background ? background.topPadding : 0
leftPadding: background ? background.leftPadding : 0
rightPadding: background ? background.rightPadding : 0
bottomPadding: background ? background.bottomPadding : 0
+
+ topInset: background ? -background.topInset || 0 : 0
+ leftInset: background ? -background.leftInset || 0 : 0
+ rightInset: background ? -background.rightInset || 0 : 0
+ bottomInset: background ? -background.bottomInset || 0 : 0
+
spacing: 6
delegate: Button {
@@ -60,9 +66,6 @@ T.DialogButtonBox {
}
contentItem: ListView {
- implicitWidth: control.count === 1 ? 200 : contentWidth
- implicitHeight: 32
-
model: control.contentModel
spacing: control.spacing
orientation: ListView.Horizontal
@@ -71,10 +74,6 @@ T.DialogButtonBox {
}
background: NinePatchImage {
- x: -leftInset; y: -topInset
- width: control.width + leftInset + rightInset
- height: control.height + topInset + bottomInset
-
source: Imagine.url + "dialogbuttonbox-background"
NinePatchImageSelector on source {
states: [