diff options
author | Tor Arne Vestbø <[email protected]> | 2024-12-16 11:54:40 +0100 |
---|---|---|
committer | Tor Arne Vestbø <[email protected]> | 2024-12-18 20:37:27 +0100 |
commit | ae7a573fe9d74f8d8355ca95f66ba160fa176270 (patch) | |
tree | 8957c88a3dea4406fb1f06b74adb6c34787436ae /src/quickcontrols | |
parent | 7c968ac1512b8eede38f213708f314701547c784 (diff) |
Compute implicitSize based on implicitContentSize in Pane and subclasses
Now that Pane reflects its explicitly set contentWidth/Height through
implicitContentWidth/Height we can use the same expression for implicit
width/height as regular controls, which hooks us into the safe area
binding loop detection as well.
Pick-to: 6.9
Change-Id: Ie31b740a1e405341fc5f0ed9673b213292e4afd9
Reviewed-by: Oliver Eftevaag <[email protected]>
Diffstat (limited to 'src/quickcontrols')
38 files changed, 76 insertions, 76 deletions
diff --git a/src/quickcontrols/basic/Frame.qml b/src/quickcontrols/basic/Frame.qml index d1ecc4b9df..b299a5afee 100644 --- a/src/quickcontrols/basic/Frame.qml +++ b/src/quickcontrols/basic/Frame.qml @@ -9,9 +9,9 @@ T.Frame { id: control implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - contentWidth + leftPadding + rightPadding) + implicitContentWidth + leftPadding + rightPadding) implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - contentHeight + topPadding + bottomPadding) + implicitContentHeight + topPadding + bottomPadding) padding: 12 diff --git a/src/quickcontrols/basic/GroupBox.qml b/src/quickcontrols/basic/GroupBox.qml index 510acf1586..03afd873ca 100644 --- a/src/quickcontrols/basic/GroupBox.qml +++ b/src/quickcontrols/basic/GroupBox.qml @@ -9,10 +9,10 @@ T.GroupBox { id: control implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - contentWidth + leftPadding + rightPadding, + implicitContentWidth + leftPadding + rightPadding, implicitLabelWidth + leftPadding + rightPadding) implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - contentHeight + topPadding + bottomPadding) + implicitContentHeight + topPadding + bottomPadding) spacing: 6 padding: 12 diff --git a/src/quickcontrols/basic/Page.qml b/src/quickcontrols/basic/Page.qml index b6d503e65d..3687d3cf57 100644 --- a/src/quickcontrols/basic/Page.qml +++ b/src/quickcontrols/basic/Page.qml @@ -9,11 +9,11 @@ T.Page { id: control implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - contentWidth + leftPadding + rightPadding, + implicitContentWidth + leftPadding + rightPadding, implicitHeaderWidth, implicitFooterWidth) implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - contentHeight + topPadding + bottomPadding + implicitContentHeight + topPadding + bottomPadding + (implicitHeaderHeight > 0 ? implicitHeaderHeight + spacing : 0) + (implicitFooterHeight > 0 ? implicitFooterHeight + spacing : 0)) diff --git a/src/quickcontrols/basic/Pane.qml b/src/quickcontrols/basic/Pane.qml index 46e15e2966..dabf0a5aea 100644 --- a/src/quickcontrols/basic/Pane.qml +++ b/src/quickcontrols/basic/Pane.qml @@ -9,9 +9,9 @@ T.Pane { id: control implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - contentWidth + leftPadding + rightPadding) + implicitContentWidth + leftPadding + rightPadding) implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - contentHeight + topPadding + bottomPadding) + implicitContentHeight + topPadding + bottomPadding) padding: 12 diff --git a/src/quickcontrols/basic/ScrollView.qml b/src/quickcontrols/basic/ScrollView.qml index aab91a3bcc..f4d6b06058 100644 --- a/src/quickcontrols/basic/ScrollView.qml +++ b/src/quickcontrols/basic/ScrollView.qml @@ -9,9 +9,9 @@ T.ScrollView { id: control implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - contentWidth + leftPadding + rightPadding) + implicitContentWidth + leftPadding + rightPadding) implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - contentHeight + topPadding + bottomPadding) + implicitContentHeight + topPadding + bottomPadding) ScrollBar.vertical: ScrollBar { parent: control diff --git a/src/quickcontrols/basic/ToolBar.qml b/src/quickcontrols/basic/ToolBar.qml index 6ef70bc99c..dd621356b7 100644 --- a/src/quickcontrols/basic/ToolBar.qml +++ b/src/quickcontrols/basic/ToolBar.qml @@ -9,9 +9,9 @@ T.ToolBar { id: control implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - contentWidth + leftPadding + rightPadding) + implicitContentWidth + leftPadding + rightPadding) implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - contentHeight + topPadding + bottomPadding) + implicitContentHeight + topPadding + bottomPadding) background: Rectangle { implicitHeight: 40 diff --git a/src/quickcontrols/fluentwinui3/Frame.qml b/src/quickcontrols/fluentwinui3/Frame.qml index 27af99633e..2def16b685 100644 --- a/src/quickcontrols/fluentwinui3/Frame.qml +++ b/src/quickcontrols/fluentwinui3/Frame.qml @@ -10,10 +10,10 @@ T.Frame { implicitWidth: Math.max((background.minimumWidth || implicitBackgroundWidth) + leftInset + rightInset, - contentWidth + leftPadding + rightPadding) + implicitContentWidth + leftPadding + rightPadding) implicitHeight: Math.max((background.minimumHeight || implicitBackgroundHeight) + topInset + bottomInset, - contentHeight + topPadding + bottomPadding) + implicitContentHeight + topPadding + bottomPadding) topPadding: config.topPadding || 0 bottomPadding: config.bottomPadding || 0 diff --git a/src/quickcontrols/fluentwinui3/GroupBox.qml b/src/quickcontrols/fluentwinui3/GroupBox.qml index 808c6837cb..d36432bc29 100644 --- a/src/quickcontrols/fluentwinui3/GroupBox.qml +++ b/src/quickcontrols/fluentwinui3/GroupBox.qml @@ -9,10 +9,10 @@ T.GroupBox { id: control implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - contentWidth + leftPadding + rightPadding, + implicitContentWidth + leftPadding + rightPadding, implicitLabelWidth + leftPadding + rightPadding) implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - contentHeight + topPadding + bottomPadding) + implicitContentHeight + topPadding + bottomPadding) readonly property real __deltaY: (config.background.y - config.label.y) || 0 readonly property real __deltaX: (config.background.x - config.label.x) || 0 diff --git a/src/quickcontrols/fluentwinui3/ToolBar.qml b/src/quickcontrols/fluentwinui3/ToolBar.qml index 97fe41c335..8c962bb4d9 100644 --- a/src/quickcontrols/fluentwinui3/ToolBar.qml +++ b/src/quickcontrols/fluentwinui3/ToolBar.qml @@ -8,9 +8,9 @@ T.ToolBar { id: control implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - contentWidth + leftPadding + rightPadding) + implicitContentWidth + leftPadding + rightPadding) implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - contentHeight + topPadding + bottomPadding) + implicitContentHeight + topPadding + bottomPadding) spacing: config.spacing || 0 diff --git a/src/quickcontrols/fusion/Frame.qml b/src/quickcontrols/fusion/Frame.qml index 0512639f4e..b43c65f44f 100644 --- a/src/quickcontrols/fusion/Frame.qml +++ b/src/quickcontrols/fusion/Frame.qml @@ -11,9 +11,9 @@ T.Frame { id: control implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - contentWidth + leftPadding + rightPadding) + implicitContentWidth + leftPadding + rightPadding) implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - contentHeight + topPadding + bottomPadding) + implicitContentHeight + topPadding + bottomPadding) padding: 9 diff --git a/src/quickcontrols/fusion/GroupBox.qml b/src/quickcontrols/fusion/GroupBox.qml index 5e949dc5cb..2979214e26 100644 --- a/src/quickcontrols/fusion/GroupBox.qml +++ b/src/quickcontrols/fusion/GroupBox.qml @@ -11,10 +11,10 @@ T.GroupBox { id: control implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - contentWidth + leftPadding + rightPadding, + implicitContentWidth + leftPadding + rightPadding, implicitLabelWidth + leftPadding + rightPadding) implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - contentHeight + topPadding + bottomPadding) + implicitContentHeight + topPadding + bottomPadding) spacing: 6 padding: 9 diff --git a/src/quickcontrols/fusion/Page.qml b/src/quickcontrols/fusion/Page.qml index 65a752318d..44bffbda1f 100644 --- a/src/quickcontrols/fusion/Page.qml +++ b/src/quickcontrols/fusion/Page.qml @@ -11,11 +11,11 @@ T.Page { id: control implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - contentWidth + leftPadding + rightPadding, + implicitContentWidth + leftPadding + rightPadding, implicitHeaderWidth, implicitFooterWidth) implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - contentHeight + topPadding + bottomPadding + implicitContentHeight + topPadding + bottomPadding + (implicitHeaderHeight > 0 ? implicitHeaderHeight + spacing : 0) + (implicitFooterHeight > 0 ? implicitFooterHeight + spacing : 0)) diff --git a/src/quickcontrols/fusion/Pane.qml b/src/quickcontrols/fusion/Pane.qml index 366c2fffe0..ad735e5c69 100644 --- a/src/quickcontrols/fusion/Pane.qml +++ b/src/quickcontrols/fusion/Pane.qml @@ -11,9 +11,9 @@ T.Pane { id: control implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - contentWidth + leftPadding + rightPadding) + implicitContentWidth + leftPadding + rightPadding) implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - contentHeight + topPadding + bottomPadding) + implicitContentHeight + topPadding + bottomPadding) padding: 9 diff --git a/src/quickcontrols/fusion/ScrollView.qml b/src/quickcontrols/fusion/ScrollView.qml index 60789313c9..a465f97f63 100644 --- a/src/quickcontrols/fusion/ScrollView.qml +++ b/src/quickcontrols/fusion/ScrollView.qml @@ -9,9 +9,9 @@ T.ScrollView { id: control implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - contentWidth + leftPadding + rightPadding) + implicitContentWidth + leftPadding + rightPadding) implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - contentHeight + topPadding + bottomPadding) + implicitContentHeight + topPadding + bottomPadding) ScrollBar.vertical: ScrollBar { parent: control diff --git a/src/quickcontrols/fusion/ToolBar.qml b/src/quickcontrols/fusion/ToolBar.qml index 13b269e9df..697ca35663 100644 --- a/src/quickcontrols/fusion/ToolBar.qml +++ b/src/quickcontrols/fusion/ToolBar.qml @@ -11,9 +11,9 @@ T.ToolBar { id: control implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - contentWidth + leftPadding + rightPadding) + implicitContentWidth + leftPadding + rightPadding) implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - contentHeight + topPadding + bottomPadding) + implicitContentHeight + topPadding + bottomPadding) horizontalPadding: 6 topPadding: control.position === T.ToolBar.Footer ? 1 : 0 diff --git a/src/quickcontrols/imagine/Frame.qml b/src/quickcontrols/imagine/Frame.qml index a3076171f5..75d476125c 100644 --- a/src/quickcontrols/imagine/Frame.qml +++ b/src/quickcontrols/imagine/Frame.qml @@ -10,9 +10,9 @@ T.Frame { id: control implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - contentWidth + leftPadding + rightPadding) + implicitContentWidth + leftPadding + rightPadding) implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - contentHeight + topPadding + bottomPadding) + implicitContentHeight + topPadding + bottomPadding) topPadding: background ? background.topPadding : 0 leftPadding: background ? background.leftPadding : 0 diff --git a/src/quickcontrols/imagine/GroupBox.qml b/src/quickcontrols/imagine/GroupBox.qml index e833a92da1..b528661c2d 100644 --- a/src/quickcontrols/imagine/GroupBox.qml +++ b/src/quickcontrols/imagine/GroupBox.qml @@ -10,10 +10,10 @@ T.GroupBox { id: control implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - contentWidth + leftPadding + rightPadding, + implicitContentWidth + leftPadding + rightPadding, implicitLabelWidth + leftPadding + rightPadding) implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - contentHeight + topPadding + bottomPadding) + implicitContentHeight + topPadding + bottomPadding) topPadding: ((background as NinePatchImage)?.topPadding ?? 0) + (implicitLabelWidth > 0 ? implicitLabelHeight + spacing : 0) leftPadding: ((background as NinePatchImage)?.leftPadding ?? 0) diff --git a/src/quickcontrols/imagine/Page.qml b/src/quickcontrols/imagine/Page.qml index 9e32db27b7..5bb0e4c16a 100644 --- a/src/quickcontrols/imagine/Page.qml +++ b/src/quickcontrols/imagine/Page.qml @@ -10,11 +10,11 @@ T.Page { id: control implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - contentWidth + leftPadding + rightPadding, + implicitContentWidth + leftPadding + rightPadding, implicitHeaderWidth, implicitFooterWidth) implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - contentHeight + topPadding + bottomPadding + implicitContentHeight + topPadding + bottomPadding + (implicitHeaderHeight > 0 ? implicitHeaderHeight + spacing : 0) + (implicitFooterHeight > 0 ? implicitFooterHeight + spacing : 0)) diff --git a/src/quickcontrols/imagine/Pane.qml b/src/quickcontrols/imagine/Pane.qml index f74ea96d23..71e3c8f7b4 100644 --- a/src/quickcontrols/imagine/Pane.qml +++ b/src/quickcontrols/imagine/Pane.qml @@ -10,9 +10,9 @@ T.Pane { id: control implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - contentWidth + leftPadding + rightPadding) + implicitContentWidth + leftPadding + rightPadding) implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - contentHeight + topPadding + bottomPadding) + implicitContentHeight + topPadding + bottomPadding) topPadding: background ? background.topPadding : 0 leftPadding: background ? background.leftPadding : 0 diff --git a/src/quickcontrols/imagine/ScrollView.qml b/src/quickcontrols/imagine/ScrollView.qml index 4e7d1a8afe..8e57cc5263 100644 --- a/src/quickcontrols/imagine/ScrollView.qml +++ b/src/quickcontrols/imagine/ScrollView.qml @@ -10,9 +10,9 @@ T.ScrollView { id: control implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - contentWidth + leftPadding + rightPadding) + implicitContentWidth + leftPadding + rightPadding) implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - contentHeight + topPadding + bottomPadding) + implicitContentHeight + topPadding + bottomPadding) topPadding: background ? background.topPadding : 0 leftPadding: background ? background.leftPadding : 0 diff --git a/src/quickcontrols/imagine/ToolBar.qml b/src/quickcontrols/imagine/ToolBar.qml index 9e1467e90e..d2746e359b 100644 --- a/src/quickcontrols/imagine/ToolBar.qml +++ b/src/quickcontrols/imagine/ToolBar.qml @@ -10,9 +10,9 @@ T.ToolBar { id: control implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - contentWidth + leftPadding + rightPadding) + implicitContentWidth + leftPadding + rightPadding) implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - contentHeight + topPadding + bottomPadding) + implicitContentHeight + topPadding + bottomPadding) topPadding: background ? background.topPadding : 0 leftPadding: background ? background.leftPadding : 0 diff --git a/src/quickcontrols/ios/Frame.qml b/src/quickcontrols/ios/Frame.qml index 066017d029..2b30b46db4 100644 --- a/src/quickcontrols/ios/Frame.qml +++ b/src/quickcontrols/ios/Frame.qml @@ -8,9 +8,9 @@ T.Frame { id: control implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - contentWidth + leftPadding + rightPadding) + implicitContentWidth + leftPadding + rightPadding) implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - contentHeight + topPadding + bottomPadding) + implicitContentHeight + topPadding + bottomPadding) padding: 16 leftPadding: 20 diff --git a/src/quickcontrols/ios/GroupBox.qml b/src/quickcontrols/ios/GroupBox.qml index 79214b9933..18a084721f 100644 --- a/src/quickcontrols/ios/GroupBox.qml +++ b/src/quickcontrols/ios/GroupBox.qml @@ -8,10 +8,10 @@ T.GroupBox { id: control implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - contentWidth + leftPadding + rightPadding, + implicitContentWidth + leftPadding + rightPadding, implicitLabelWidth + leftPadding + rightPadding) implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - contentHeight + topPadding + bottomPadding) + implicitContentHeight + topPadding + bottomPadding) padding: 16 leftPadding: 20 diff --git a/src/quickcontrols/ios/ToolBar.qml b/src/quickcontrols/ios/ToolBar.qml index 0c02403630..5ae9d2a88a 100644 --- a/src/quickcontrols/ios/ToolBar.qml +++ b/src/quickcontrols/ios/ToolBar.qml @@ -9,9 +9,9 @@ T.ToolBar { id: control implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - contentWidth + leftPadding + rightPadding) + implicitContentWidth + leftPadding + rightPadding) implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - contentHeight + topPadding + bottomPadding) + implicitContentHeight + topPadding + bottomPadding) background: Rectangle { implicitHeight: 49 diff --git a/src/quickcontrols/macos/ScrollView.qml b/src/quickcontrols/macos/ScrollView.qml index 86e6bc1a15..40e7620aa2 100644 --- a/src/quickcontrols/macos/ScrollView.qml +++ b/src/quickcontrols/macos/ScrollView.qml @@ -10,9 +10,9 @@ T.ScrollView { id: control implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - contentWidth + leftPadding + rightPadding) + implicitContentWidth + leftPadding + rightPadding) implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - contentHeight + topPadding + bottomPadding) + implicitContentHeight + topPadding + bottomPadding) rightPadding: effectiveScrollBarWidth bottomPadding: effectiveScrollBarHeight diff --git a/src/quickcontrols/material/Frame.qml b/src/quickcontrols/material/Frame.qml index da9cd65581..6e5016d6f4 100644 --- a/src/quickcontrols/material/Frame.qml +++ b/src/quickcontrols/material/Frame.qml @@ -10,9 +10,9 @@ T.Frame { id: control implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - contentWidth + leftPadding + rightPadding) + implicitContentWidth + leftPadding + rightPadding) implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - contentHeight + topPadding + bottomPadding) + implicitContentHeight + topPadding + bottomPadding) padding: 12 verticalPadding: Material.frameVerticalPadding diff --git a/src/quickcontrols/material/GroupBox.qml b/src/quickcontrols/material/GroupBox.qml index f0cee7c854..068987f9f4 100644 --- a/src/quickcontrols/material/GroupBox.qml +++ b/src/quickcontrols/material/GroupBox.qml @@ -10,10 +10,10 @@ T.GroupBox { id: control implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - contentWidth + leftPadding + rightPadding, + implicitContentWidth + leftPadding + rightPadding, implicitLabelWidth + leftPadding + rightPadding) implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - contentHeight + topPadding + bottomPadding) + implicitContentHeight + topPadding + bottomPadding) spacing: 6 padding: 12 diff --git a/src/quickcontrols/material/Page.qml b/src/quickcontrols/material/Page.qml index f8a1804f32..e4ce362412 100644 --- a/src/quickcontrols/material/Page.qml +++ b/src/quickcontrols/material/Page.qml @@ -10,11 +10,11 @@ T.Page { id: control implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - contentWidth + leftPadding + rightPadding, + implicitContentWidth + leftPadding + rightPadding, implicitHeaderWidth, implicitFooterWidth) implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - contentHeight + topPadding + bottomPadding + implicitContentHeight + topPadding + bottomPadding + (implicitHeaderHeight > 0 ? implicitHeaderHeight + spacing : 0) + (implicitFooterHeight > 0 ? implicitFooterHeight + spacing : 0)) diff --git a/src/quickcontrols/material/Pane.qml b/src/quickcontrols/material/Pane.qml index 80385a073f..cd7e463eae 100644 --- a/src/quickcontrols/material/Pane.qml +++ b/src/quickcontrols/material/Pane.qml @@ -10,9 +10,9 @@ T.Pane { id: control implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - contentWidth + leftPadding + rightPadding) + implicitContentWidth + leftPadding + rightPadding) implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - contentHeight + topPadding + bottomPadding) + implicitContentHeight + topPadding + bottomPadding) padding: 12 Material.roundedScale: control.Material.elevation > 0 ? Material.ExtraSmallScale : Material.NotRounded diff --git a/src/quickcontrols/material/ScrollView.qml b/src/quickcontrols/material/ScrollView.qml index 60789313c9..a465f97f63 100644 --- a/src/quickcontrols/material/ScrollView.qml +++ b/src/quickcontrols/material/ScrollView.qml @@ -9,9 +9,9 @@ T.ScrollView { id: control implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - contentWidth + leftPadding + rightPadding) + implicitContentWidth + leftPadding + rightPadding) implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - contentHeight + topPadding + bottomPadding) + implicitContentHeight + topPadding + bottomPadding) ScrollBar.vertical: ScrollBar { parent: control diff --git a/src/quickcontrols/material/ToolBar.qml b/src/quickcontrols/material/ToolBar.qml index 71eb56833e..9838d47c36 100644 --- a/src/quickcontrols/material/ToolBar.qml +++ b/src/quickcontrols/material/ToolBar.qml @@ -12,9 +12,9 @@ T.ToolBar { Material.elevation: 0 implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - contentWidth + leftPadding + rightPadding) + implicitContentWidth + leftPadding + rightPadding) implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - contentHeight + topPadding + bottomPadding) + implicitContentHeight + topPadding + bottomPadding) Material.foreground: Material.toolTextColor diff --git a/src/quickcontrols/universal/Frame.qml b/src/quickcontrols/universal/Frame.qml index 2e650d7913..357e33bdf5 100644 --- a/src/quickcontrols/universal/Frame.qml +++ b/src/quickcontrols/universal/Frame.qml @@ -9,9 +9,9 @@ T.Frame { id: control implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - contentWidth + leftPadding + rightPadding) + implicitContentWidth + leftPadding + rightPadding) implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - contentHeight + topPadding + bottomPadding) + implicitContentHeight + topPadding + bottomPadding) padding: 12 diff --git a/src/quickcontrols/universal/GroupBox.qml b/src/quickcontrols/universal/GroupBox.qml index b0b211bd95..29dd3e3de9 100644 --- a/src/quickcontrols/universal/GroupBox.qml +++ b/src/quickcontrols/universal/GroupBox.qml @@ -9,10 +9,10 @@ T.GroupBox { id: control implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - contentWidth + leftPadding + rightPadding, + implicitContentWidth + leftPadding + rightPadding, implicitLabelWidth + leftPadding + rightPadding) implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - contentHeight + topPadding + bottomPadding) + implicitContentHeight + topPadding + bottomPadding) spacing: 12 padding: 12 diff --git a/src/quickcontrols/universal/Page.qml b/src/quickcontrols/universal/Page.qml index 7e2c69aa5b..dd1bdd8a6d 100644 --- a/src/quickcontrols/universal/Page.qml +++ b/src/quickcontrols/universal/Page.qml @@ -9,11 +9,11 @@ T.Page { id: control implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - contentWidth + leftPadding + rightPadding, + implicitContentWidth + leftPadding + rightPadding, implicitHeaderWidth, implicitFooterWidth) implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - contentHeight + topPadding + bottomPadding + implicitContentHeight + topPadding + bottomPadding + (implicitHeaderHeight > 0 ? implicitHeaderHeight + spacing : 0) + (implicitFooterHeight > 0 ? implicitFooterHeight + spacing : 0)) diff --git a/src/quickcontrols/universal/Pane.qml b/src/quickcontrols/universal/Pane.qml index 2f27979c4b..6c7d4b400c 100644 --- a/src/quickcontrols/universal/Pane.qml +++ b/src/quickcontrols/universal/Pane.qml @@ -9,9 +9,9 @@ T.Pane { id: control implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - contentWidth + leftPadding + rightPadding) + implicitContentWidth + leftPadding + rightPadding) implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - contentHeight + topPadding + bottomPadding) + implicitContentHeight + topPadding + bottomPadding) padding: 12 diff --git a/src/quickcontrols/universal/ScrollView.qml b/src/quickcontrols/universal/ScrollView.qml index 60789313c9..a465f97f63 100644 --- a/src/quickcontrols/universal/ScrollView.qml +++ b/src/quickcontrols/universal/ScrollView.qml @@ -9,9 +9,9 @@ T.ScrollView { id: control implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - contentWidth + leftPadding + rightPadding) + implicitContentWidth + leftPadding + rightPadding) implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - contentHeight + topPadding + bottomPadding) + implicitContentHeight + topPadding + bottomPadding) ScrollBar.vertical: ScrollBar { parent: control diff --git a/src/quickcontrols/universal/ToolBar.qml b/src/quickcontrols/universal/ToolBar.qml index 33aa490c08..2870445be5 100644 --- a/src/quickcontrols/universal/ToolBar.qml +++ b/src/quickcontrols/universal/ToolBar.qml @@ -9,9 +9,9 @@ T.ToolBar { id: control implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - contentWidth + leftPadding + rightPadding) + implicitContentWidth + leftPadding + rightPadding) implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - contentHeight + topPadding + bottomPadding) + implicitContentHeight + topPadding + bottomPadding) background: Rectangle { implicitHeight: 48 // AppBarThemeCompactHeight diff --git a/src/quickcontrols/windows/ScrollView.qml b/src/quickcontrols/windows/ScrollView.qml index 65d65899ca..f4e7b01bb5 100644 --- a/src/quickcontrols/windows/ScrollView.qml +++ b/src/quickcontrols/windows/ScrollView.qml @@ -9,9 +9,9 @@ T.ScrollView { id: control implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - contentWidth + leftPadding + rightPadding) + implicitContentWidth + leftPadding + rightPadding) implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - contentHeight + topPadding + bottomPadding) + implicitContentHeight + topPadding + bottomPadding) rightPadding: effectiveScrollBarWidth bottomPadding: effectiveScrollBarHeight |