Take background insets into account

Task-number: QTBUG-60156
Change-Id: I11f59a67f5a319ac5a4eae9b8ccea5d16a983de2
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
This commit is contained in:
J-P Nurmi 2018-04-19 21:55:37 +02:00
parent 31998a21d1
commit 12e22e333d
211 changed files with 417 additions and 417 deletions

View File

@ -40,8 +40,8 @@ import QtQuick.Templates 2.5 as T
T.AbstractButton {
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)
}

View File

@ -42,9 +42,9 @@ import QtQuick.Templates 2.5 as T
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)
padding: 6

View File

@ -42,9 +42,9 @@ import QtQuick.Templates 2.5 as T
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)
padding: 6

View File

@ -42,9 +42,9 @@ import QtQuick.Controls.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)

View File

@ -42,9 +42,9 @@ import QtQuick.Controls.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)

View File

@ -43,9 +43,9 @@ import QtQuick.Templates 2.5 as T
T.ComboBox {
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)

View File

@ -40,8 +40,8 @@ import QtQuick.Templates 2.5 as T
T.Container {
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)
}

View File

@ -40,8 +40,8 @@ import QtQuick.Templates 2.5 as T
T.Control {
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)
}

View File

@ -42,9 +42,9 @@ import QtQuick.Templates 2.5 as T
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)
padding: 6

View File

@ -42,9 +42,9 @@ import QtQuick.Templates 2.5 as T
T.Dial {
id: control
implicitWidth: Math.max(implicitBackgroundWidth,
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
implicitContentWidth + leftPadding + rightPadding) || 184 // ### remove 184 in Qt 6
implicitHeight: Math.max(implicitBackgroundHeight,
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
implicitContentHeight + topPadding + bottomPadding) || 184 // ### remove 184 in Qt 6
background: DialImpl {

View File

@ -42,11 +42,11 @@ import QtQuick.Controls.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))

View File

@ -40,9 +40,9 @@ import QtQuick.Templates 2.5 as T
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)
spacing: 1

View File

@ -44,9 +44,9 @@ T.Drawer {
parent: T.Overlay.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: control.edge === Qt.BottomEdge

View File

@ -42,9 +42,9 @@ import QtQuick.Templates 2.5 as T
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)
padding: 12

View File

@ -42,10 +42,10 @@ import QtQuick.Templates 2.5 as T
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)
spacing: 6

View File

@ -42,9 +42,9 @@ import QtQuick.Templates 2.5 as T
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)

View File

@ -42,9 +42,9 @@ import QtQuick.Templates 2.5 as T
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)
margins: 0

View File

@ -42,9 +42,9 @@ import QtQuick.Controls.impl 2.5
T.MenuBar {
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)
delegate: MenuBarItem { }

View File

@ -42,9 +42,9 @@ import QtQuick.Controls.impl 2.5
T.MenuBarItem {
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)

View File

@ -42,9 +42,9 @@ import QtQuick.Templates 2.5 as T
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)

View File

@ -42,9 +42,9 @@ import QtQuick.Templates 2.5 as T
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)
padding: 2

View File

@ -42,11 +42,11 @@ import QtQuick.Templates 2.5 as T
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))

View File

@ -42,9 +42,9 @@ import QtQuick.Templates 2.5 as T
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)
padding: 6

View File

@ -42,9 +42,9 @@ import QtQuick.Templates 2.5 as T
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)
padding: 12

View File

@ -42,9 +42,9 @@ import QtQuick.Templates 2.5 as T
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)
padding: 12

View File

@ -42,9 +42,9 @@ import QtQuick.Controls.impl 2.5
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)
contentItem: ProgressBarImpl {

View File

@ -42,9 +42,9 @@ import QtQuick.Templates 2.5 as T
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)

View File

@ -42,9 +42,9 @@ import QtQuick.Templates 2.5 as T
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)

View File

@ -42,10 +42,10 @@ import QtQuick.Templates 2.5 as T
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)

View File

@ -42,9 +42,9 @@ import QtQuick.Templates 2.5 as T
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)
padding: 6

View File

@ -42,9 +42,9 @@ import QtQuick.Templates 2.5 as T
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)
padding: 2

View File

@ -42,9 +42,9 @@ import QtQuick.Templates 2.5 as T
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)
padding: 2

View File

@ -42,9 +42,9 @@ import QtQuick.Templates 2.5 as T
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)
ScrollBar.vertical: ScrollBar {

View File

@ -42,9 +42,9 @@ import QtQuick.Templates 2.5 as T
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)
padding: 6

View File

@ -42,7 +42,7 @@ import QtQuick.Templates 2.5 as T
T.SpinBox {
id: control
implicitWidth: Math.max(implicitBackgroundWidth,
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
contentItem.implicitWidth + 2 * padding +
up.implicitIndicatorWidth +
down.implicitIndicatorWidth)

View File

@ -42,9 +42,9 @@ import QtQuick.Templates 2.5 as T
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)

View File

@ -41,9 +41,9 @@ import QtQuick.Templates 2.5 as T
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)
contentItem: ListView {

View File

@ -42,9 +42,9 @@ import QtQuick.Controls.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)

View File

@ -42,9 +42,9 @@ import QtQuick.Controls.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)

View File

@ -40,9 +40,9 @@ import QtQuick.Templates 2.5 as T
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)
spacing: 1

View File

@ -42,9 +42,9 @@ import QtQuick.Templates 2.5 as T
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)
padding: 6

View File

@ -42,9 +42,9 @@ import QtQuick.Templates 2.5 as T
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)
background: Rectangle {

View File

@ -42,9 +42,9 @@ import QtQuick.Templates 2.5 as T
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)
padding: 6

View File

@ -42,9 +42,9 @@ import QtQuick.Templates 2.5 as T
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)
padding: vertical ? 6 : 2

View File

@ -45,9 +45,9 @@ T.ToolTip {
x: parent ? (parent.width - implicitWidth) / 2 : 0
y: -implicitHeight - 3
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)
margins: 6

View File

@ -42,9 +42,9 @@ import QtQuick.Templates 2.5 as T
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 {

View File

@ -44,9 +44,9 @@ import QtQuick.Controls.Fusion.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)
padding: 6

View File

@ -44,9 +44,9 @@ import QtQuick.Controls.Fusion.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)
padding: 4

View File

@ -44,9 +44,9 @@ import QtQuick.Controls.Fusion.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)

View File

@ -44,9 +44,9 @@ import QtQuick.Controls.Fusion.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)

View File

@ -45,9 +45,9 @@ import QtQuick.Controls.Fusion.impl 2.5
T.ComboBox {
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)

View File

@ -44,9 +44,9 @@ import QtQuick.Controls.Fusion.impl 2.5
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)
padding: 6

View File

@ -44,9 +44,9 @@ import QtQuick.Controls.Fusion.impl 2.5
T.Dial {
id: control
implicitWidth: Math.max(implicitBackgroundWidth,
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
implicitContentWidth + leftPadding + rightPadding) || 100 // ### remove 100 in Qt 6
implicitHeight: Math.max(implicitBackgroundHeight,
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
implicitContentHeight + topPadding + bottomPadding) || 100 // ### remove 100 in Qt 6
background: DialImpl {

View File

@ -44,11 +44,11 @@ import QtQuick.Controls.Fusion.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))

View File

@ -44,9 +44,9 @@ import QtQuick.Controls.Fusion.impl 2.5
T.DialogButtonBox {
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)
spacing: 6

View File

@ -46,9 +46,9 @@ T.Drawer {
parent: T.Overlay.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: control.edge === Qt.BottomEdge

View File

@ -44,9 +44,9 @@ import QtQuick.Controls.Fusion.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)
padding: 9

View File

@ -44,10 +44,10 @@ import QtQuick.Controls.Fusion.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)
spacing: 6

View File

@ -44,9 +44,9 @@ import QtQuick.Controls.Fusion.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)

View File

@ -44,9 +44,9 @@ import QtQuick.Controls.Fusion.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)
margins: 0

View File

@ -44,9 +44,9 @@ import QtQuick.Controls.Fusion.impl 2.5
T.MenuBar {
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)
delegate: MenuBarItem { }

View File

@ -44,9 +44,9 @@ import QtQuick.Controls.Fusion.impl 2.5
T.MenuBarItem {
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)

View File

@ -44,9 +44,9 @@ import QtQuick.Controls.Fusion.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)

View File

@ -44,9 +44,9 @@ import QtQuick.Controls.Fusion.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)
padding: 5

View File

@ -44,11 +44,11 @@ import QtQuick.Controls.Fusion.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))

View File

@ -44,9 +44,9 @@ import QtQuick.Controls.Fusion.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)
padding: 4

View File

@ -44,9 +44,9 @@ import QtQuick.Controls.Fusion.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)
padding: 9

View File

@ -44,9 +44,9 @@ import QtQuick.Controls.Fusion.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)
padding: 6

View File

@ -44,9 +44,9 @@ import QtQuick.Controls.Fusion.impl 2.5
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)
contentItem: Item {

View File

@ -44,9 +44,9 @@ import QtQuick.Controls.Fusion.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)

View File

@ -44,9 +44,9 @@ import QtQuick.Controls.Fusion.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)

View File

@ -44,10 +44,10 @@ import QtQuick.Controls.Fusion.impl 2.5
T.RangeSlider {
id: control
implicitWidth: Math.max(implicitBackgroundWidth,
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
Math.max(first.implicitHandleWidth,
second.implicitHandleWidth) + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight,
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
Math.max(first.implicitHandleHeight,
second.implicitHandleHeight) + topPadding + bottomPadding)

View File

@ -44,9 +44,9 @@ import QtQuick.Controls.Fusion.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)
padding: 6

View File

@ -44,9 +44,9 @@ import QtQuick.Controls.Fusion.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)
padding: 2

View File

@ -44,9 +44,9 @@ import QtQuick.Controls.Fusion.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)
padding: 2

View File

@ -44,9 +44,9 @@ import QtQuick.Controls.Fusion.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)
handle: SliderHandle {

View File

@ -44,7 +44,7 @@ import QtQuick.Controls.Fusion.impl 2.5
T.SpinBox {
id: control
implicitWidth: Math.max(implicitBackgroundWidth,
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
contentItem.implicitWidth + 2 * padding +
Math.max(up.implicitIndicatorWidth,
down.implicitIndicatorWidth))

View File

@ -44,9 +44,9 @@ import QtQuick.Controls.Fusion.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)

View File

@ -44,9 +44,9 @@ import QtQuick.Controls.Fusion.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)

View File

@ -44,9 +44,9 @@ import QtQuick.Controls.Fusion.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)

View File

@ -44,9 +44,9 @@ import QtQuick.Controls.Fusion.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)
spacing: -1

View File

@ -44,9 +44,9 @@ import QtQuick.Controls.Fusion.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)
padding: 2

View File

@ -44,9 +44,9 @@ import QtQuick.Controls.Fusion.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)
horizontalPadding: 6

View File

@ -44,9 +44,9 @@ import QtQuick.Controls.Fusion.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)
padding: 6

View File

@ -44,9 +44,9 @@ import QtQuick.Controls.Fusion.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)
padding: vertical ? 6 : 2

View File

@ -47,9 +47,9 @@ T.ToolTip {
x: parent ? (parent.width - implicitWidth) / 2 : 0
y: -implicitHeight - 3
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)
margins: 6

View File

@ -44,9 +44,9 @@ import QtQuick.Controls.Fusion.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 {

View File

@ -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

View File

@ -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 // ###

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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))

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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)

Some files were not shown because too many files have changed in this diff Show More