diff options
Diffstat (limited to 'src/imports/controls/imagine')
36 files changed, 72 insertions, 72 deletions
diff --git a/src/imports/controls/imagine/BusyIndicator.qml b/src/imports/controls/imagine/BusyIndicator.qml index e532bb18..57db9b31 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(background ? background.implicitWidth : 0, + implicitWidth: Math.max(implicitBackgroundWidth, contentItem.implicitWidth + leftPadding + rightPadding) - implicitHeight: Math.max(background ? background.implicitHeight : 0, + implicitHeight: Math.max(implicitBackgroundHeight, contentItem.implicitHeight + topPadding + bottomPadding) topPadding: background ? background.topPadding : 0 diff --git a/src/imports/controls/imagine/Button.qml b/src/imports/controls/imagine/Button.qml index c6d84ac0..aa6289c2 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(background ? background.implicitWidth : 0, + implicitWidth: Math.max(implicitBackgroundWidth, contentItem.implicitWidth + leftPadding + rightPadding) - implicitHeight: Math.max(background ? background.implicitHeight : 0, + implicitHeight: Math.max(implicitBackgroundHeight, contentItem.implicitHeight + topPadding + bottomPadding) spacing: 6 // ### diff --git a/src/imports/controls/imagine/CheckBox.qml b/src/imports/controls/imagine/CheckBox.qml index 1ec01210..7e663e8c 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(background ? background.implicitWidth : 0, + implicitWidth: Math.max(implicitBackgroundWidth, contentItem.implicitWidth + leftPadding + rightPadding) - implicitHeight: Math.max(background ? background.implicitHeight : 0, + implicitHeight: Math.max(implicitBackgroundHeight, Math.max(contentItem.implicitHeight, indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding) diff --git a/src/imports/controls/imagine/CheckDelegate.qml b/src/imports/controls/imagine/CheckDelegate.qml index e789cada..254cae54 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(background ? background.implicitWidth : 0, + implicitWidth: Math.max(implicitBackgroundWidth, contentItem.implicitWidth + leftPadding + rightPadding) - implicitHeight: Math.max(background ? background.implicitHeight : 0, + implicitHeight: Math.max(implicitBackgroundHeight, Math.max(contentItem.implicitHeight, indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding) diff --git a/src/imports/controls/imagine/ComboBox.qml b/src/imports/controls/imagine/ComboBox.qml index bdf445d4..a7b835a4 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(background ? background.implicitWidth : 0, + implicitWidth: Math.max(implicitBackgroundWidth, contentItem.implicitWidth + background ? (background.leftPadding + background.rightPadding) : 0) - implicitHeight: Math.max(background ? background.implicitHeight : 0, + implicitHeight: Math.max(implicitBackgroundHeight, Math.max(contentItem.implicitHeight, indicator ? indicator.implicitHeight : 0) + background ? (background.topPadding + background.bottomPadding) : 0) diff --git a/src/imports/controls/imagine/DelayButton.qml b/src/imports/controls/imagine/DelayButton.qml index fbdf109a..8d8ba34b 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(background ? background.implicitWidth : 0, + implicitWidth: Math.max(implicitBackgroundWidth, contentItem.implicitWidth + leftPadding + rightPadding) - implicitHeight: Math.max(background ? background.implicitHeight : 0, + implicitHeight: Math.max(implicitBackgroundHeight, contentItem.implicitHeight + topPadding + bottomPadding) topPadding: background ? background.topPadding : 0 diff --git a/src/imports/controls/imagine/Dial.qml b/src/imports/controls/imagine/Dial.qml index 726fbef2..4498b735 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(background ? background.implicitWidth : 0, + implicitWidth: Math.max(implicitBackgroundWidth, (handle ? handle.implicitWidth : 0) + leftPadding + rightPadding) - implicitHeight: Math.max(background ? background.implicitHeight : 0, + implicitHeight: Math.max(implicitBackgroundHeight, (handle ? handle.implicitHeight : 0) + topPadding + bottomPadding) topPadding: background ? background.topPadding : 0 diff --git a/src/imports/controls/imagine/DialogButtonBox.qml b/src/imports/controls/imagine/DialogButtonBox.qml index e58d5645..e38ad50b 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(background ? background.implicitWidth : 0, + implicitWidth: Math.max(implicitBackgroundWidth, (control.count === 1 ? contentWidth * 2 : contentWidth) + leftPadding + rightPadding) - implicitHeight: Math.max(background ? background.implicitHeight : 0, + implicitHeight: Math.max(implicitBackgroundHeight, 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 a149ae24..a0b83de7 100644 --- a/src/imports/controls/imagine/Frame.qml +++ b/src/imports/controls/imagine/Frame.qml @@ -42,8 +42,8 @@ import QtQuick.Controls.Imagine.impl 2.5 T.Frame { id: control - implicitWidth: Math.max(background ? background.implicitWidth : 0, contentWidth + leftPadding + rightPadding) - implicitHeight: Math.max(background ? background.implicitHeight : 0, contentHeight + topPadding + bottomPadding) + implicitWidth: Math.max(implicitBackgroundWidth, contentWidth + leftPadding + rightPadding) + implicitHeight: Math.max(implicitBackgroundHeight, contentHeight + topPadding + bottomPadding) topPadding: background ? background.topPadding : 0 leftPadding: background ? background.leftPadding : 0 diff --git a/src/imports/controls/imagine/GroupBox.qml b/src/imports/controls/imagine/GroupBox.qml index c16f90e1..d18af5ba 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(background ? background.implicitWidth : 0, + implicitWidth: Math.max(implicitBackgroundWidth, label ? label.implicitWidth + leftPadding + rightPadding : 0, contentWidth + leftPadding + rightPadding) - implicitHeight: Math.max(background ? background.implicitHeight : 0, contentHeight + topPadding + bottomPadding) + implicitHeight: Math.max(implicitBackgroundHeight, contentHeight + topPadding + bottomPadding) topPadding: (background ? background.topPadding : 0) + (label && label.implicitWidth > 0 ? label.implicitHeight + spacing : 0) leftPadding: background ? background.leftPadding : 0 diff --git a/src/imports/controls/imagine/ItemDelegate.qml b/src/imports/controls/imagine/ItemDelegate.qml index 3389394f..48f98cb2 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(background ? background.implicitWidth : 0, + implicitWidth: Math.max(implicitBackgroundWidth, contentItem.implicitWidth + leftPadding + rightPadding) - implicitHeight: Math.max(background ? background.implicitHeight : 0, + implicitHeight: Math.max(implicitBackgroundHeight, Math.max(contentItem.implicitHeight, indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding) diff --git a/src/imports/controls/imagine/MenuItem.qml b/src/imports/controls/imagine/MenuItem.qml index a262b7ce..2971717b 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(background ? background.implicitWidth : 0, + implicitWidth: Math.max(implicitBackgroundWidth, contentItem.implicitWidth + leftPadding + rightPadding) - implicitHeight: Math.max(background ? background.implicitHeight : 0, + implicitHeight: Math.max(implicitBackgroundHeight, Math.max(contentItem.implicitHeight, indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding) diff --git a/src/imports/controls/imagine/MenuSeparator.qml b/src/imports/controls/imagine/MenuSeparator.qml index 42577af4..90cb62ab 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(background ? background.implicitWidth : 0, + implicitWidth: Math.max(implicitBackgroundWidth, contentItem ? contentItem.implicitWidth + leftPadding + rightPadding : 0) - implicitHeight: Math.max(background ? background.implicitHeight : 0, + implicitHeight: Math.max(implicitBackgroundHeight, contentItem ? contentItem.implicitHeight + topPadding + bottomPadding : 0) topPadding: background ? background.topPadding : 0 diff --git a/src/imports/controls/imagine/Page.qml b/src/imports/controls/imagine/Page.qml index 8dcd6dfc..5c0a86eb 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(background ? background.implicitWidth : 0, + implicitWidth: Math.max(implicitBackgroundWidth, Math.max(contentWidth, header && header.visible ? header.implicitWidth : 0, footer && footer.visible ? footer.implicitWidth : 0) + leftPadding + rightPadding) - implicitHeight: Math.max(background ? background.implicitHeight : 0, + implicitHeight: Math.max(implicitBackgroundHeight, contentHeight + topPadding + bottomPadding + (header && header.visible ? header.implicitHeight + spacing : 0) + (footer && footer.visible ? footer.implicitHeight + spacing : 0)) diff --git a/src/imports/controls/imagine/PageIndicator.qml b/src/imports/controls/imagine/PageIndicator.qml index 2234e18c..dc4e8f34 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(background ? background.implicitWidth : 0, + implicitWidth: Math.max(implicitBackgroundWidth, contentItem.implicitWidth + leftPadding + rightPadding) - implicitHeight: Math.max(background ? background.implicitHeight : 0, + implicitHeight: Math.max(implicitBackgroundHeight, contentItem.implicitHeight + topPadding + bottomPadding) topPadding: background ? background.topPadding : 0 diff --git a/src/imports/controls/imagine/Pane.qml b/src/imports/controls/imagine/Pane.qml index 4061bd78..63f328b3 100644 --- a/src/imports/controls/imagine/Pane.qml +++ b/src/imports/controls/imagine/Pane.qml @@ -42,8 +42,8 @@ import QtQuick.Controls.Imagine.impl 2.5 T.Pane { id: control - implicitWidth: Math.max(background ? background.implicitWidth : 0, contentWidth + leftPadding + rightPadding) - implicitHeight: Math.max(background ? background.implicitHeight : 0, contentHeight + topPadding + bottomPadding) + implicitWidth: Math.max(implicitBackgroundWidth, contentWidth + leftPadding + rightPadding) + implicitHeight: Math.max(implicitBackgroundHeight, contentHeight + topPadding + bottomPadding) topPadding: background ? background.topPadding : 0 leftPadding: background ? background.leftPadding : 0 diff --git a/src/imports/controls/imagine/ProgressBar.qml b/src/imports/controls/imagine/ProgressBar.qml index 2d207efb..c85f6246 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(background ? background.implicitWidth : 0, + implicitWidth: Math.max(implicitBackgroundWidth, contentItem.implicitWidth + leftPadding + rightPadding) - implicitHeight: Math.max(background ? background.implicitHeight : 0, + implicitHeight: Math.max(implicitBackgroundHeight, contentItem.implicitHeight + topPadding + bottomPadding) topPadding: background ? background.topPadding : 0 diff --git a/src/imports/controls/imagine/RadioButton.qml b/src/imports/controls/imagine/RadioButton.qml index fd6b4241..6d3c5e19 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(background ? background.implicitWidth : 0, + implicitWidth: Math.max(implicitBackgroundWidth, contentItem.implicitWidth + leftPadding + rightPadding) - implicitHeight: Math.max(background ? background.implicitHeight : 0, + implicitHeight: Math.max(implicitBackgroundHeight, Math.max(contentItem.implicitHeight, indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding) diff --git a/src/imports/controls/imagine/RadioDelegate.qml b/src/imports/controls/imagine/RadioDelegate.qml index 4b7cb6de..23c30f63 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(background ? background.implicitWidth : 0, + implicitWidth: Math.max(implicitBackgroundWidth, contentItem.implicitWidth + leftPadding + rightPadding) - implicitHeight: Math.max(background ? background.implicitHeight : 0, + implicitHeight: Math.max(implicitBackgroundHeight, Math.max(contentItem.implicitHeight, indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding) diff --git a/src/imports/controls/imagine/RangeSlider.qml b/src/imports/controls/imagine/RangeSlider.qml index 45390595..ec688a21 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(background ? background.implicitWidth : 0, + implicitWidth: Math.max(implicitBackgroundWidth, Math.max(first.handle ? first.handle.implicitWidth : 0, second.handle ? second.handle.implicitWidth : 0) + leftPadding + rightPadding) - implicitHeight: Math.max(background ? background.implicitHeight : 0, + implicitHeight: Math.max(implicitBackgroundHeight, Math.max(first.handle ? first.handle.implicitHeight : 0, second.handle ? second.handle.implicitHeight : 0) + topPadding + bottomPadding) diff --git a/src/imports/controls/imagine/RoundButton.qml b/src/imports/controls/imagine/RoundButton.qml index d8e70835..b69f9f6f 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(background ? background.implicitWidth : 0, + implicitWidth: Math.max(implicitBackgroundWidth, contentItem.implicitWidth + leftPadding + rightPadding) - implicitHeight: Math.max(background ? background.implicitHeight : 0, + implicitHeight: Math.max(implicitBackgroundHeight, contentItem.implicitHeight + topPadding + bottomPadding) topPadding: background ? background.topPadding : 0 diff --git a/src/imports/controls/imagine/ScrollBar.qml b/src/imports/controls/imagine/ScrollBar.qml index 2581654c..495d7632 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(background ? background.implicitWidth : 0, + implicitWidth: Math.max(implicitBackgroundWidth, contentItem.implicitWidth + leftPadding + rightPadding) - implicitHeight: Math.max(background ? background.implicitHeight : 0, + implicitHeight: Math.max(implicitBackgroundHeight, contentItem.implicitHeight + 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 45eb139b..c925b772 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(background ? background.implicitWidth : 0, + implicitWidth: Math.max(implicitBackgroundWidth, contentItem.implicitWidth + leftPadding + rightPadding) - implicitHeight: Math.max(background ? background.implicitHeight : 0, + implicitHeight: Math.max(implicitBackgroundHeight, contentItem.implicitHeight + topPadding + bottomPadding) topPadding: background ? background.topPadding : 0 diff --git a/src/imports/controls/imagine/ScrollView.qml b/src/imports/controls/imagine/ScrollView.qml index 0bf0e6d8..71e5abc6 100644 --- a/src/imports/controls/imagine/ScrollView.qml +++ b/src/imports/controls/imagine/ScrollView.qml @@ -43,8 +43,8 @@ import QtQuick.Controls.Imagine.impl 2.5 T.ScrollView { id: control - implicitWidth: Math.max(background ? background.implicitWidth : 0, contentWidth + leftPadding + rightPadding) - implicitHeight: Math.max(background ? background.implicitHeight : 0, contentHeight + topPadding + bottomPadding) + implicitWidth: Math.max(implicitBackgroundWidth, contentWidth + leftPadding + rightPadding) + implicitHeight: Math.max(implicitBackgroundHeight, contentHeight + topPadding + bottomPadding) topPadding: background ? background.topPadding : 0 leftPadding: background ? background.leftPadding : 0 diff --git a/src/imports/controls/imagine/Slider.qml b/src/imports/controls/imagine/Slider.qml index 8a82ec3e..3c2710c7 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(background ? background.implicitWidth : 0, + implicitWidth: Math.max(implicitBackgroundWidth, (handle ? handle.implicitWidth : 0) + leftPadding + rightPadding) - implicitHeight: Math.max(background ? background.implicitHeight : 0, + implicitHeight: Math.max(implicitBackgroundHeight, (handle ? handle.implicitHeight : 0) + topPadding + bottomPadding) topPadding: background ? background.topPadding : 0 diff --git a/src/imports/controls/imagine/SpinBox.qml b/src/imports/controls/imagine/SpinBox.qml index 5e5057a8..ec13106e 100644 --- a/src/imports/controls/imagine/SpinBox.qml +++ b/src/imports/controls/imagine/SpinBox.qml @@ -42,12 +42,12 @@ import QtQuick.Controls.Imagine.impl 2.5 T.SpinBox { id: control - implicitWidth: Math.max(background ? background.implicitWidth : 0, + implicitWidth: Math.max(implicitBackgroundWidth, contentItem.implicitWidth + 2 * padding + (up.indicator ? up.indicator.implicitWidth : 0) + (down.indicator ? down.indicator.implicitWidth : 0)) implicitHeight: Math.max(contentItem.implicitHeight + topPadding + bottomPadding, - background ? background.implicitHeight : 0, + implicitBackgroundHeight, up.indicator ? up.indicator.implicitHeight : 0, down.indicator ? down.indicator.implicitHeight : 0) diff --git a/src/imports/controls/imagine/StackView.qml b/src/imports/controls/imagine/StackView.qml index ffdf4f23..563a84af 100644 --- a/src/imports/controls/imagine/StackView.qml +++ b/src/imports/controls/imagine/StackView.qml @@ -42,8 +42,8 @@ import QtQuick.Controls.Imagine.impl 2.5 T.StackView { id: control - implicitWidth: background ? background.implicitWidth : 0 - implicitHeight: background ? background.implicitHeight : 0 + implicitWidth: implicitBackgroundWidth + implicitHeight: implicitBackgroundHeight topPadding: background ? background.topPadding : 0 leftPadding: background ? background.leftPadding : 0 diff --git a/src/imports/controls/imagine/SwipeDelegate.qml b/src/imports/controls/imagine/SwipeDelegate.qml index 589b6d1a..fbd264fb 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(background ? background.implicitWidth : 0, + implicitWidth: Math.max(implicitBackgroundWidth, contentItem.implicitWidth + leftPadding + rightPadding) - implicitHeight: Math.max(background ? background.implicitHeight : 0, + implicitHeight: Math.max(implicitBackgroundHeight, Math.max(contentItem.implicitHeight, indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding) diff --git a/src/imports/controls/imagine/SwipeView.qml b/src/imports/controls/imagine/SwipeView.qml index 982d8ae3..aa298ee4 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(background ? background.implicitWidth : 0, + implicitWidth: Math.max(implicitBackgroundWidth, contentWidth + leftPadding + rightPadding) - implicitHeight: Math.max(background ? background.implicitHeight : 0, + implicitHeight: Math.max(implicitBackgroundHeight, 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 d0330bf4..7ebf6d23 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(background ? background.implicitWidth : 0, + implicitWidth: Math.max(implicitBackgroundWidth, contentItem.implicitWidth + leftPadding + rightPadding) - implicitHeight: Math.max(background ? background.implicitHeight : 0, + implicitHeight: Math.max(implicitBackgroundHeight, Math.max(contentItem.implicitHeight, indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding) diff --git a/src/imports/controls/imagine/SwitchDelegate.qml b/src/imports/controls/imagine/SwitchDelegate.qml index 2b035e4e..795bacba 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(background ? background.implicitWidth : 0, + implicitWidth: Math.max(implicitBackgroundWidth, contentItem.implicitWidth + leftPadding + rightPadding) - implicitHeight: Math.max(background ? background.implicitHeight : 0, + implicitHeight: Math.max(implicitBackgroundHeight, Math.max(contentItem.implicitHeight, indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding) diff --git a/src/imports/controls/imagine/TabBar.qml b/src/imports/controls/imagine/TabBar.qml index 1e7a2e58..925c6d30 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(background ? background.implicitWidth : 0, + implicitWidth: Math.max(implicitBackgroundWidth, contentWidth + leftPadding + rightPadding) - implicitHeight: Math.max(background ? background.implicitHeight : 0, + implicitHeight: Math.max(implicitBackgroundHeight, 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 3d10d2f4..8f9f38f6 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(background ? background.implicitWidth : 0, + implicitWidth: Math.max(implicitBackgroundWidth, contentItem.implicitWidth + leftPadding + rightPadding) - implicitHeight: Math.max(background ? background.implicitHeight : 0, + implicitHeight: Math.max(implicitBackgroundHeight, contentItem.implicitHeight + topPadding + bottomPadding) spacing: 6 // ### diff --git a/src/imports/controls/imagine/ToolBar.qml b/src/imports/controls/imagine/ToolBar.qml index a391bc9b..56c884d9 100644 --- a/src/imports/controls/imagine/ToolBar.qml +++ b/src/imports/controls/imagine/ToolBar.qml @@ -42,8 +42,8 @@ import QtQuick.Controls.Imagine.impl 2.5 T.ToolBar { id: control - implicitWidth: Math.max(background ? background.implicitWidth : 0, contentWidth + leftPadding + rightPadding) - implicitHeight: Math.max(background ? background.implicitHeight : 0, contentHeight + topPadding + bottomPadding) + implicitWidth: Math.max(implicitBackgroundWidth, contentWidth + leftPadding + rightPadding) + implicitHeight: Math.max(implicitBackgroundHeight, contentHeight + topPadding + bottomPadding) topPadding: background ? background.topPadding : 0 leftPadding: background ? background.leftPadding : 0 diff --git a/src/imports/controls/imagine/ToolButton.qml b/src/imports/controls/imagine/ToolButton.qml index c979cb5f..39c7bdff 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(background ? background.implicitWidth : 0, + implicitWidth: Math.max(implicitBackgroundWidth, contentItem.implicitWidth + leftPadding + rightPadding) - implicitHeight: Math.max(background ? background.implicitHeight : 0, + implicitHeight: Math.max(implicitBackgroundHeight, contentItem.implicitHeight + topPadding + bottomPadding) spacing: 6 // ### diff --git a/src/imports/controls/imagine/ToolSeparator.qml b/src/imports/controls/imagine/ToolSeparator.qml index f61b0e49..ff547c89 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(background ? background.implicitWidth : 0, + implicitWidth: Math.max(implicitBackgroundWidth, contentItem ? contentItem.implicitWidth + leftPadding + rightPadding : 0) - implicitHeight: Math.max(background ? background.implicitHeight : 0, + implicitHeight: Math.max(implicitBackgroundHeight, contentItem ? contentItem.implicitHeight + topPadding + bottomPadding : 0) topPadding: background ? background.topPadding : 0 |