diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2018-04-19 21:55:37 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2018-04-23 07:49:29 +0000 |
commit | 12e22e333d99d1a2fe9d878bb86108c87626e7ec (patch) | |
tree | a4a0f7ec75a8c858d33197506927e082f29d3262 /src/imports/controls/imagine | |
parent | 31998a21d1ba1ea90a653696225e52f53f256c87 (diff) |
Take background insets into account
Task-number: QTBUG-60156
Change-Id: I11f59a67f5a319ac5a4eae9b8ccea5d16a983de2
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/imports/controls/imagine')
41 files changed, 81 insertions, 81 deletions
diff --git a/src/imports/controls/imagine/BusyIndicator.qml b/src/imports/controls/imagine/BusyIndicator.qml index 0637a467..51b50554 100644 --- a/src/imports/controls/imagine/BusyIndicator.qml +++ b/src/imports/controls/imagine/BusyIndicator.qml @@ -42,9 +42,9 @@ import QtQuick.Controls.Imagine.impl 2.5 T.BusyIndicator { id: control - implicitWidth: Math.max(implicitBackgroundWidth, + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, implicitContentWidth + leftPadding + rightPadding) - implicitHeight: Math.max(implicitBackgroundHeight, + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, implicitContentHeight + topPadding + bottomPadding) topPadding: background ? background.topPadding : 0 diff --git a/src/imports/controls/imagine/Button.qml b/src/imports/controls/imagine/Button.qml index e6a1b259..c9f134c1 100644 --- a/src/imports/controls/imagine/Button.qml +++ b/src/imports/controls/imagine/Button.qml @@ -44,9 +44,9 @@ import QtQuick.Controls.Imagine.impl 2.5 T.Button { id: control - implicitWidth: Math.max(implicitBackgroundWidth, + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, implicitContentWidth + leftPadding + rightPadding) - implicitHeight: Math.max(implicitBackgroundHeight, + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, implicitContentHeight + topPadding + bottomPadding) spacing: 6 // ### diff --git a/src/imports/controls/imagine/CheckBox.qml b/src/imports/controls/imagine/CheckBox.qml index 8a4c398c..b7d950c7 100644 --- a/src/imports/controls/imagine/CheckBox.qml +++ b/src/imports/controls/imagine/CheckBox.qml @@ -42,9 +42,9 @@ import QtQuick.Controls.Imagine.impl 2.5 T.CheckBox { id: control - implicitWidth: Math.max(implicitBackgroundWidth, + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, implicitContentWidth + leftPadding + rightPadding) - implicitHeight: Math.max(implicitBackgroundHeight, + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, implicitContentHeight + topPadding + bottomPadding, implicitIndicatorHeight + topPadding + bottomPadding) diff --git a/src/imports/controls/imagine/CheckDelegate.qml b/src/imports/controls/imagine/CheckDelegate.qml index f8d98274..324dfd29 100644 --- a/src/imports/controls/imagine/CheckDelegate.qml +++ b/src/imports/controls/imagine/CheckDelegate.qml @@ -44,9 +44,9 @@ import QtQuick.Controls.Imagine.impl 2.5 T.CheckDelegate { id: control - implicitWidth: Math.max(implicitBackgroundWidth, + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, implicitContentWidth + leftPadding + rightPadding) - implicitHeight: Math.max(implicitBackgroundHeight, + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, implicitContentHeight + topPadding + bottomPadding, implicitIndicatorHeight + topPadding + bottomPadding) diff --git a/src/imports/controls/imagine/ComboBox.qml b/src/imports/controls/imagine/ComboBox.qml index 0068f6df..a75993fd 100644 --- a/src/imports/controls/imagine/ComboBox.qml +++ b/src/imports/controls/imagine/ComboBox.qml @@ -44,9 +44,9 @@ import QtQuick.Controls.Imagine.impl 2.5 T.ComboBox { id: control - implicitWidth: Math.max(implicitBackgroundWidth, + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, contentItem.implicitWidth + background ? (background.leftPadding + background.rightPadding) : 0) - implicitHeight: Math.max(implicitBackgroundHeight, + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, Math.max(implicitContentHeight, implicitIndicatorHeight) + background ? (background.topPadding + background.bottomPadding) : 0) diff --git a/src/imports/controls/imagine/DelayButton.qml b/src/imports/controls/imagine/DelayButton.qml index 5aa8bb49..6d99c6ce 100644 --- a/src/imports/controls/imagine/DelayButton.qml +++ b/src/imports/controls/imagine/DelayButton.qml @@ -43,9 +43,9 @@ import QtGraphicalEffects 1.0 T.DelayButton { id: control - implicitWidth: Math.max(implicitBackgroundWidth, + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, implicitContentWidth + leftPadding + rightPadding) - implicitHeight: Math.max(implicitBackgroundHeight, + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, implicitContentHeight + topPadding + bottomPadding) topPadding: background ? background.topPadding : 0 diff --git a/src/imports/controls/imagine/Dial.qml b/src/imports/controls/imagine/Dial.qml index 4498b735..b0f4e5ff 100644 --- a/src/imports/controls/imagine/Dial.qml +++ b/src/imports/controls/imagine/Dial.qml @@ -42,9 +42,9 @@ import QtQuick.Controls.Imagine.impl 2.5 T.Dial { id: control - implicitWidth: Math.max(implicitBackgroundWidth, + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, (handle ? handle.implicitWidth : 0) + leftPadding + rightPadding) - implicitHeight: Math.max(implicitBackgroundHeight, + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, (handle ? handle.implicitHeight : 0) + topPadding + bottomPadding) topPadding: background ? background.topPadding : 0 diff --git a/src/imports/controls/imagine/Dialog.qml b/src/imports/controls/imagine/Dialog.qml index 47834259..78deeb7a 100644 --- a/src/imports/controls/imagine/Dialog.qml +++ b/src/imports/controls/imagine/Dialog.qml @@ -43,11 +43,11 @@ import QtQuick.Controls.Imagine.impl 2.5 T.Dialog { id: control - implicitWidth: Math.max(implicitBackgroundWidth, + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, contentWidth + leftPadding + rightPadding, implicitHeaderWidth, implicitFooterWidth) - implicitHeight: Math.max(implicitBackgroundHeight, + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, contentHeight + topPadding + bottomPadding + (implicitHeaderHeight > 0 ? implicitHeaderHeight + spacing : 0) + (implicitFooterHeight > 0 ? implicitFooterHeight + spacing : 0)) diff --git a/src/imports/controls/imagine/DialogButtonBox.qml b/src/imports/controls/imagine/DialogButtonBox.qml index e38ad50b..fa217baa 100644 --- a/src/imports/controls/imagine/DialogButtonBox.qml +++ b/src/imports/controls/imagine/DialogButtonBox.qml @@ -43,9 +43,9 @@ import QtQuick.Controls.Imagine.impl 2.5 T.DialogButtonBox { id: control - implicitWidth: Math.max(implicitBackgroundWidth, + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, (control.count === 1 ? contentWidth * 2 : contentWidth) + leftPadding + rightPadding) - implicitHeight: Math.max(implicitBackgroundHeight, + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, contentHeight + topPadding + bottomPadding) topPadding: background ? background.topPadding : 0 diff --git a/src/imports/controls/imagine/Drawer.qml b/src/imports/controls/imagine/Drawer.qml index 3c39559f..79408276 100644 --- a/src/imports/controls/imagine/Drawer.qml +++ b/src/imports/controls/imagine/Drawer.qml @@ -44,9 +44,9 @@ T.Drawer { parent: T.ApplicationWindow.overlay - implicitWidth: Math.max(implicitBackgroundWidth, + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, contentWidth + leftPadding + rightPadding) - implicitHeight: Math.max(implicitBackgroundHeight, + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, contentHeight + topPadding + bottomPadding) topPadding: background ? background.topPadding : 0 diff --git a/src/imports/controls/imagine/Frame.qml b/src/imports/controls/imagine/Frame.qml index 7c75a562..cedeae8f 100644 --- a/src/imports/controls/imagine/Frame.qml +++ b/src/imports/controls/imagine/Frame.qml @@ -42,9 +42,9 @@ import QtQuick.Controls.Imagine.impl 2.5 T.Frame { id: control - implicitWidth: Math.max(implicitBackgroundWidth, + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, contentWidth + leftPadding + rightPadding) - implicitHeight: Math.max(implicitBackgroundHeight, + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, contentHeight + topPadding + bottomPadding) topPadding: background ? background.topPadding : 0 diff --git a/src/imports/controls/imagine/GroupBox.qml b/src/imports/controls/imagine/GroupBox.qml index f5c70299..816e0c8c 100644 --- a/src/imports/controls/imagine/GroupBox.qml +++ b/src/imports/controls/imagine/GroupBox.qml @@ -43,10 +43,10 @@ import QtQuick.Controls.Imagine.impl 2.5 T.GroupBox { id: control - implicitWidth: Math.max(implicitBackgroundWidth, + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, contentWidth + leftPadding + rightPadding, implicitLabelWidth + leftPadding + rightPadding) - implicitHeight: Math.max(implicitBackgroundHeight, + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, contentHeight + topPadding + bottomPadding) topPadding: (background ? background.topPadding : 0) + (implicitLabelWidth > 0 ? implicitLabelHeight + spacing : 0) diff --git a/src/imports/controls/imagine/ItemDelegate.qml b/src/imports/controls/imagine/ItemDelegate.qml index 6c3b2963..ef779bf6 100644 --- a/src/imports/controls/imagine/ItemDelegate.qml +++ b/src/imports/controls/imagine/ItemDelegate.qml @@ -44,9 +44,9 @@ import QtQuick.Controls.Imagine.impl 2.5 T.ItemDelegate { id: control - implicitWidth: Math.max(implicitBackgroundWidth, + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, implicitContentWidth + leftPadding + rightPadding) - implicitHeight: Math.max(implicitBackgroundHeight, + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, implicitContentHeight + topPadding + bottomPadding, implicitIndicatorHeight + topPadding + bottomPadding) diff --git a/src/imports/controls/imagine/Menu.qml b/src/imports/controls/imagine/Menu.qml index 2748eb25..54b3afb9 100644 --- a/src/imports/controls/imagine/Menu.qml +++ b/src/imports/controls/imagine/Menu.qml @@ -43,9 +43,9 @@ import QtQuick.Controls.Imagine.impl 2.5 T.Menu { id: control - implicitWidth: Math.max(implicitBackgroundWidth, + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, contentWidth + leftPadding + rightPadding) - implicitHeight: Math.max(implicitBackgroundHeight, + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, contentHeight + topPadding + bottomPadding) topMargin: background ? background.topInset : 0 diff --git a/src/imports/controls/imagine/MenuItem.qml b/src/imports/controls/imagine/MenuItem.qml index 73f9b3ea..5f5caeda 100644 --- a/src/imports/controls/imagine/MenuItem.qml +++ b/src/imports/controls/imagine/MenuItem.qml @@ -44,9 +44,9 @@ import QtQuick.Controls.Imagine.impl 2.5 T.MenuItem { id: control - implicitWidth: Math.max(implicitBackgroundWidth, + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, implicitContentWidth + leftPadding + rightPadding) - implicitHeight: Math.max(implicitBackgroundHeight, + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, implicitContentHeight + topPadding + bottomPadding, implicitIndicatorHeight + topPadding + bottomPadding) diff --git a/src/imports/controls/imagine/MenuSeparator.qml b/src/imports/controls/imagine/MenuSeparator.qml index a678a402..5904eb1f 100644 --- a/src/imports/controls/imagine/MenuSeparator.qml +++ b/src/imports/controls/imagine/MenuSeparator.qml @@ -42,9 +42,9 @@ import QtQuick.Controls.Imagine.impl 2.5 T.MenuSeparator { id: control - implicitWidth: Math.max(implicitBackgroundWidth, + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, implicitContentWidth + leftPadding + rightPadding) - implicitHeight: Math.max(implicitBackgroundHeight, + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, implicitContentHeight + topPadding + bottomPadding) topPadding: background ? background.topPadding : 0 diff --git a/src/imports/controls/imagine/Page.qml b/src/imports/controls/imagine/Page.qml index 767d3dbd..40a7050e 100644 --- a/src/imports/controls/imagine/Page.qml +++ b/src/imports/controls/imagine/Page.qml @@ -42,11 +42,11 @@ import QtQuick.Controls.Imagine.impl 2.5 T.Page { id: control - implicitWidth: Math.max(implicitBackgroundWidth, + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, contentWidth + leftPadding + rightPadding, implicitHeaderWidth, implicitFooterWidth) - implicitHeight: Math.max(implicitBackgroundHeight, + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, contentHeight + topPadding + bottomPadding + (implicitHeaderHeight > 0 ? implicitHeaderHeight + spacing : 0) + (implicitFooterHeight > 0 ? implicitFooterHeight + spacing : 0)) diff --git a/src/imports/controls/imagine/PageIndicator.qml b/src/imports/controls/imagine/PageIndicator.qml index bb022c83..faeaebc6 100644 --- a/src/imports/controls/imagine/PageIndicator.qml +++ b/src/imports/controls/imagine/PageIndicator.qml @@ -42,9 +42,9 @@ import QtQuick.Controls.Imagine.impl 2.5 T.PageIndicator { id: control - implicitWidth: Math.max(implicitBackgroundWidth, + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, implicitContentWidth + leftPadding + rightPadding) - implicitHeight: Math.max(implicitBackgroundHeight, + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, implicitContentHeight + topPadding + bottomPadding) topPadding: background ? background.topPadding : 0 diff --git a/src/imports/controls/imagine/Pane.qml b/src/imports/controls/imagine/Pane.qml index ca7cec0f..4012bd69 100644 --- a/src/imports/controls/imagine/Pane.qml +++ b/src/imports/controls/imagine/Pane.qml @@ -42,9 +42,9 @@ import QtQuick.Controls.Imagine.impl 2.5 T.Pane { id: control - implicitWidth: Math.max(implicitBackgroundWidth, + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, contentWidth + leftPadding + rightPadding) - implicitHeight: Math.max(implicitBackgroundHeight, + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, contentHeight + topPadding + bottomPadding) topPadding: background ? background.topPadding : 0 diff --git a/src/imports/controls/imagine/Popup.qml b/src/imports/controls/imagine/Popup.qml index 01f38f84..ea6ddfa4 100644 --- a/src/imports/controls/imagine/Popup.qml +++ b/src/imports/controls/imagine/Popup.qml @@ -42,9 +42,9 @@ import QtQuick.Controls.Imagine.impl 2.5 T.Popup { id: control - implicitWidth: Math.max(implicitBackgroundWidth, + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, contentWidth + leftPadding + rightPadding) - implicitHeight: Math.max(implicitBackgroundHeight, + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, contentHeight + topPadding + bottomPadding) topPadding: background ? background.topPadding : undefined diff --git a/src/imports/controls/imagine/ProgressBar.qml b/src/imports/controls/imagine/ProgressBar.qml index a5bf14e1..3e8609d4 100644 --- a/src/imports/controls/imagine/ProgressBar.qml +++ b/src/imports/controls/imagine/ProgressBar.qml @@ -43,9 +43,9 @@ import QtGraphicalEffects 1.0 T.ProgressBar { id: control - implicitWidth: Math.max(implicitBackgroundWidth, + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, implicitContentWidth + leftPadding + rightPadding) - implicitHeight: Math.max(implicitBackgroundHeight, + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, implicitContentHeight + topPadding + bottomPadding) topPadding: background ? background.topPadding : 0 diff --git a/src/imports/controls/imagine/RadioButton.qml b/src/imports/controls/imagine/RadioButton.qml index a63054e2..ca867637 100644 --- a/src/imports/controls/imagine/RadioButton.qml +++ b/src/imports/controls/imagine/RadioButton.qml @@ -42,9 +42,9 @@ import QtQuick.Controls.Imagine.impl 2.5 T.RadioButton { id: control - implicitWidth: Math.max(implicitBackgroundWidth, + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, implicitContentWidth + leftPadding + rightPadding) - implicitHeight: Math.max(implicitBackgroundHeight, + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, implicitContentHeight + topPadding + bottomPadding, implicitIndicatorHeight + topPadding + bottomPadding) diff --git a/src/imports/controls/imagine/RadioDelegate.qml b/src/imports/controls/imagine/RadioDelegate.qml index 1110c1af..fc51a571 100644 --- a/src/imports/controls/imagine/RadioDelegate.qml +++ b/src/imports/controls/imagine/RadioDelegate.qml @@ -44,9 +44,9 @@ import QtQuick.Controls.Imagine.impl 2.5 T.RadioDelegate { id: control - implicitWidth: Math.max(implicitBackgroundWidth, + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, implicitContentWidth + leftPadding + rightPadding) - implicitHeight: Math.max(implicitBackgroundHeight, + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, implicitContentHeight + topPadding + bottomPadding, implicitIndicatorHeight + topPadding + bottomPadding) diff --git a/src/imports/controls/imagine/RangeSlider.qml b/src/imports/controls/imagine/RangeSlider.qml index cb00887a..fa7fdda0 100644 --- a/src/imports/controls/imagine/RangeSlider.qml +++ b/src/imports/controls/imagine/RangeSlider.qml @@ -42,10 +42,10 @@ import QtQuick.Controls.Imagine.impl 2.5 T.RangeSlider { id: control - implicitWidth: Math.max(implicitBackgroundWidth, + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, first.implicitHandleWidth + leftPadding + rightPadding, second.implicitHandleWidth + leftPadding + rightPadding) - implicitHeight: Math.max(implicitBackgroundHeight, + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, first.implicitHandleHeight + topPadding + bottomPadding, second.implicitHandleHeight + topPadding + bottomPadding) diff --git a/src/imports/controls/imagine/RoundButton.qml b/src/imports/controls/imagine/RoundButton.qml index ffb36578..e696a504 100644 --- a/src/imports/controls/imagine/RoundButton.qml +++ b/src/imports/controls/imagine/RoundButton.qml @@ -44,9 +44,9 @@ import QtQuick.Controls.Imagine.impl 2.5 T.RoundButton { id: control - implicitWidth: Math.max(implicitBackgroundWidth, + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, implicitContentWidth + leftPadding + rightPadding) - implicitHeight: Math.max(implicitBackgroundHeight, + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, implicitContentHeight + topPadding + bottomPadding) topPadding: background ? background.topPadding : 0 diff --git a/src/imports/controls/imagine/ScrollBar.qml b/src/imports/controls/imagine/ScrollBar.qml index 7f302297..8301063f 100644 --- a/src/imports/controls/imagine/ScrollBar.qml +++ b/src/imports/controls/imagine/ScrollBar.qml @@ -42,9 +42,9 @@ import QtQuick.Controls.Imagine.impl 2.5 T.ScrollBar { id: control - implicitWidth: Math.max(implicitBackgroundWidth, + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, implicitContentWidth + leftPadding + rightPadding) - implicitHeight: Math.max(implicitBackgroundHeight, + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, implicitContentHeight + topPadding + bottomPadding) visible: control.policy !== T.ScrollBar.AlwaysOff diff --git a/src/imports/controls/imagine/ScrollIndicator.qml b/src/imports/controls/imagine/ScrollIndicator.qml index c663fce7..7b90cfc1 100644 --- a/src/imports/controls/imagine/ScrollIndicator.qml +++ b/src/imports/controls/imagine/ScrollIndicator.qml @@ -42,9 +42,9 @@ import QtQuick.Controls.Imagine.impl 2.5 T.ScrollIndicator { id: control - implicitWidth: Math.max(implicitBackgroundWidth, + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, implicitContentWidth + leftPadding + rightPadding) - implicitHeight: Math.max(implicitBackgroundHeight, + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, implicitContentHeight + topPadding + bottomPadding) topPadding: background ? background.topPadding : 0 diff --git a/src/imports/controls/imagine/ScrollView.qml b/src/imports/controls/imagine/ScrollView.qml index 346f4b03..be1da69b 100644 --- a/src/imports/controls/imagine/ScrollView.qml +++ b/src/imports/controls/imagine/ScrollView.qml @@ -43,9 +43,9 @@ import QtQuick.Controls.Imagine.impl 2.5 T.ScrollView { id: control - implicitWidth: Math.max(implicitBackgroundWidth, + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, contentWidth + leftPadding + rightPadding) - implicitHeight: Math.max(implicitBackgroundHeight, + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, contentHeight + topPadding + bottomPadding) topPadding: background ? background.topPadding : 0 diff --git a/src/imports/controls/imagine/Slider.qml b/src/imports/controls/imagine/Slider.qml index ff560d00..75a7aaf0 100644 --- a/src/imports/controls/imagine/Slider.qml +++ b/src/imports/controls/imagine/Slider.qml @@ -42,9 +42,9 @@ import QtQuick.Controls.Imagine.impl 2.5 T.Slider { id: control - implicitWidth: Math.max(implicitBackgroundWidth, + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, implicitHandleWidth + leftPadding + rightPadding) - implicitHeight: Math.max(implicitBackgroundHeight, + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, implicitHandleHeight + topPadding + bottomPadding) topPadding: background ? background.topPadding : 0 diff --git a/src/imports/controls/imagine/SpinBox.qml b/src/imports/controls/imagine/SpinBox.qml index 9adc32c9..b7aed75d 100644 --- a/src/imports/controls/imagine/SpinBox.qml +++ b/src/imports/controls/imagine/SpinBox.qml @@ -42,7 +42,7 @@ import QtQuick.Controls.Imagine.impl 2.5 T.SpinBox { id: control - implicitWidth: Math.max(implicitBackgroundWidth, + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, contentItem.implicitWidth + 2 * padding + up.implicitIndicatorWidth + down.implicitIndicatorWidth) diff --git a/src/imports/controls/imagine/SwipeDelegate.qml b/src/imports/controls/imagine/SwipeDelegate.qml index 285033bd..f8006075 100644 --- a/src/imports/controls/imagine/SwipeDelegate.qml +++ b/src/imports/controls/imagine/SwipeDelegate.qml @@ -44,9 +44,9 @@ import QtQuick.Controls.Imagine.impl 2.5 T.SwipeDelegate { id: control - implicitWidth: Math.max(implicitBackgroundWidth, + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, implicitContentWidth + leftPadding + rightPadding) - implicitHeight: Math.max(implicitBackgroundHeight, + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, implicitContentHeight + topPadding + bottomPadding, implicitIndicatorHeight + topPadding + bottomPadding) diff --git a/src/imports/controls/imagine/SwipeView.qml b/src/imports/controls/imagine/SwipeView.qml index aa298ee4..5b1a0ae6 100644 --- a/src/imports/controls/imagine/SwipeView.qml +++ b/src/imports/controls/imagine/SwipeView.qml @@ -42,9 +42,9 @@ import QtQuick.Controls.Imagine.impl 2.5 T.SwipeView { id: control - implicitWidth: Math.max(implicitBackgroundWidth, + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, contentWidth + leftPadding + rightPadding) - implicitHeight: Math.max(implicitBackgroundHeight, + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, contentHeight + topPadding + bottomPadding) topPadding: background ? background.topPadding : 0 diff --git a/src/imports/controls/imagine/Switch.qml b/src/imports/controls/imagine/Switch.qml index 65cb1db4..3d1d30a0 100644 --- a/src/imports/controls/imagine/Switch.qml +++ b/src/imports/controls/imagine/Switch.qml @@ -42,9 +42,9 @@ import QtQuick.Controls.Imagine.impl 2.5 T.Switch { id: control - implicitWidth: Math.max(implicitBackgroundWidth, + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, implicitContentWidth + leftPadding + rightPadding) - implicitHeight: Math.max(implicitBackgroundHeight, + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, implicitContentHeight + topPadding + bottomPadding, implicitIndicatorHeight + topPadding + bottomPadding) diff --git a/src/imports/controls/imagine/SwitchDelegate.qml b/src/imports/controls/imagine/SwitchDelegate.qml index 06ea8922..066fae58 100644 --- a/src/imports/controls/imagine/SwitchDelegate.qml +++ b/src/imports/controls/imagine/SwitchDelegate.qml @@ -44,9 +44,9 @@ import QtQuick.Controls.Imagine.impl 2.5 T.SwitchDelegate { id: control - implicitWidth: Math.max(implicitBackgroundWidth, + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, implicitContentWidth + leftPadding + rightPadding) - implicitHeight: Math.max(implicitBackgroundHeight, + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, implicitContentHeight + topPadding + bottomPadding, implicitIndicatorHeight + topPadding + bottomPadding) diff --git a/src/imports/controls/imagine/TabBar.qml b/src/imports/controls/imagine/TabBar.qml index 925c6d30..50e18c5b 100644 --- a/src/imports/controls/imagine/TabBar.qml +++ b/src/imports/controls/imagine/TabBar.qml @@ -42,9 +42,9 @@ import QtQuick.Controls.Imagine.impl 2.5 T.TabBar { id: control - implicitWidth: Math.max(implicitBackgroundWidth, + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, contentWidth + leftPadding + rightPadding) - implicitHeight: Math.max(implicitBackgroundHeight, + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, contentHeight + topPadding + bottomPadding) topPadding: background ? background.topPadding : 0 diff --git a/src/imports/controls/imagine/TabButton.qml b/src/imports/controls/imagine/TabButton.qml index 499c1ec9..f719b545 100644 --- a/src/imports/controls/imagine/TabButton.qml +++ b/src/imports/controls/imagine/TabButton.qml @@ -44,9 +44,9 @@ import QtQuick.Controls.Imagine.impl 2.5 T.TabButton { id: control - implicitWidth: Math.max(implicitBackgroundWidth, + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, implicitContentWidth + leftPadding + rightPadding) - implicitHeight: Math.max(implicitBackgroundHeight, + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, implicitContentHeight + topPadding + bottomPadding) spacing: 6 // ### diff --git a/src/imports/controls/imagine/ToolBar.qml b/src/imports/controls/imagine/ToolBar.qml index 40461371..2b764c8f 100644 --- a/src/imports/controls/imagine/ToolBar.qml +++ b/src/imports/controls/imagine/ToolBar.qml @@ -42,9 +42,9 @@ import QtQuick.Controls.Imagine.impl 2.5 T.ToolBar { id: control - implicitWidth: Math.max(implicitBackgroundWidth, + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, contentWidth + leftPadding + rightPadding) - implicitHeight: Math.max(implicitBackgroundHeight, + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, contentHeight + topPadding + bottomPadding) topPadding: background ? background.topPadding : 0 diff --git a/src/imports/controls/imagine/ToolButton.qml b/src/imports/controls/imagine/ToolButton.qml index 93afaeb2..7a2e2235 100644 --- a/src/imports/controls/imagine/ToolButton.qml +++ b/src/imports/controls/imagine/ToolButton.qml @@ -44,9 +44,9 @@ import QtQuick.Controls.Imagine.impl 2.5 T.ToolButton { id: control - implicitWidth: Math.max(implicitBackgroundWidth, + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, implicitContentWidth + leftPadding + rightPadding) - implicitHeight: Math.max(implicitBackgroundHeight, + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, implicitContentHeight + topPadding + bottomPadding) spacing: 6 // ### diff --git a/src/imports/controls/imagine/ToolSeparator.qml b/src/imports/controls/imagine/ToolSeparator.qml index 1f9c97e1..e617c504 100644 --- a/src/imports/controls/imagine/ToolSeparator.qml +++ b/src/imports/controls/imagine/ToolSeparator.qml @@ -42,9 +42,9 @@ import QtQuick.Controls.Imagine.impl 2.5 T.ToolSeparator { id: control - implicitWidth: Math.max(implicitBackgroundWidth, + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, implicitContentWidth + leftPadding + rightPadding) - implicitHeight: Math.max(implicitBackgroundHeight, + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, implicitContentHeight + topPadding + bottomPadding) topPadding: background ? background.topPadding : 0 diff --git a/src/imports/controls/imagine/ToolTip.qml b/src/imports/controls/imagine/ToolTip.qml index 92e6cf36..ba33f400 100644 --- a/src/imports/controls/imagine/ToolTip.qml +++ b/src/imports/controls/imagine/ToolTip.qml @@ -45,9 +45,9 @@ T.ToolTip { x: parent ? (parent.width - implicitWidth) / 2 : 0 - (background ? background.leftInset : 0) y: -implicitHeight - (background ? background.topInset : 0) - implicitWidth: Math.max(implicitBackgroundWidth, + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, contentWidth + leftPadding + rightPadding) - implicitHeight: Math.max(implicitBackgroundHeight, + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, contentHeight + topPadding + bottomPadding) topMargin: background ? background.topInset : 0 diff --git a/src/imports/controls/imagine/Tumbler.qml b/src/imports/controls/imagine/Tumbler.qml index 5d8b9835..792d5246 100644 --- a/src/imports/controls/imagine/Tumbler.qml +++ b/src/imports/controls/imagine/Tumbler.qml @@ -44,9 +44,9 @@ import QtQuick.Controls.Imagine.impl 2.5 T.Tumbler { id: control - implicitWidth: Math.max(implicitBackgroundWidth, + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, implicitContentWidth + leftPadding + rightPadding) || 60 // ### remove 60 in Qt 6 - implicitHeight: Math.max(implicitBackgroundHeight, + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, implicitContentHeight + topPadding + bottomPadding) || 200 // ### remove 200 in Qt 6 delegate: Text { |