add missing property preferredWidth

This commit is contained in:
Marco Martin 2012-10-18 17:22:34 +02:00
parent 58d9657594
commit 6b32e0426c

View File

@ -92,7 +92,7 @@ Item {
enabled: defaultAction == undefined || defaultAction.enabled
//icon + label + left margin + right margin + spacing between icon and text
property real minimumWidth: icon.width + label.preferredWidth + delegate.margins.left + delegate.margins.right + ((icon.valid) ? delegate.margins.left : 0)
property real minimumWidth: theme.smallIconSize + label.preferredWidth + delegate.margins.left + delegate.margins.right + ((icon.valid) ? delegate.margins.left : 0)
property real minimumHeight: Math.max(theme.smallIconSize, label.paintedHeight) + delegate.margins.top + delegate.margins.bottom
implicitWidth: {
@ -370,6 +370,8 @@ Item {
icon.anchors.left = label.paintedWidth > 0 ? icon.parent.left : undefined
}
property int preferredWidth: button.width < button.implicitWidth ? paintedWidth: paintedWidth
anchors {
top: parent.top
bottom: parent.bottom