Change PC3 Button and ToolButton implicitWidth and implicitHeight to account for inset values
This commit is contained in:
parent
73865f7171
commit
9e9136bddd
@ -14,10 +14,10 @@ import "private" as Private
|
|||||||
T.Button {
|
T.Button {
|
||||||
id: control
|
id: control
|
||||||
|
|
||||||
implicitWidth: Math.max(units.gridUnit, contentItem.implicitWidth)
|
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||||
+ leftPadding + rightPadding
|
implicitContentWidth + leftPadding + rightPadding)
|
||||||
implicitHeight: Math.max(units.gridUnit, contentItem.implicitHeight)
|
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||||
+ topPadding + bottomPadding
|
implicitContentHeight + topPadding + bottomPadding)
|
||||||
|
|
||||||
Layout.minimumWidth: contentItem.implicitWidth + leftPadding + rightPadding
|
Layout.minimumWidth: contentItem.implicitWidth + leftPadding + rightPadding
|
||||||
|
|
||||||
@ -86,7 +86,5 @@ T.Button {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
background: Private.ButtonBackground {
|
background: Private.ButtonBackground {}
|
||||||
parentControl: control
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -14,10 +14,10 @@ import "private" as Private
|
|||||||
T.ToolButton {
|
T.ToolButton {
|
||||||
id: control
|
id: control
|
||||||
|
|
||||||
implicitWidth: Math.max(units.gridUnit, contentItem.implicitWidth)
|
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||||
+ leftPadding + rightPadding
|
implicitContentWidth + leftPadding + rightPadding)
|
||||||
implicitHeight: Math.max(units.gridUnit, contentItem.implicitHeight)
|
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||||
+ topPadding + bottomPadding
|
implicitContentHeight + topPadding + bottomPadding)
|
||||||
|
|
||||||
Layout.minimumWidth: contentItem.implicitWidth + leftPadding + rightPadding
|
Layout.minimumWidth: contentItem.implicitWidth + leftPadding + rightPadding
|
||||||
|
|
||||||
@ -96,7 +96,5 @@ T.ToolButton {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
background: Private.ButtonBackground {
|
background: Private.ButtonBackground {}
|
||||||
parentControl: control
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user