Fix PC2 ToolButtonStyle margins

Previously, it was trying to use the margins of toolbutton-hover for flat buttons, but toolbutton-hover doesn't have real margins (0.001 since 0 isn't valid).

BUG: #425255
This commit is contained in:
Noah Davis 2020-08-13 16:26:18 -04:00
parent d10afb5d2a
commit 7062c635a9

View File

@ -397,10 +397,10 @@ QtQuickControlStyle.ButtonStyle {
]
Component.onCompleted: {
padding.top = surfaceNormal.margins.top
padding.left = surfaceNormal.margins.left
padding.right = surfaceNormal.margins.right
padding.bottom = surfaceNormal.margins.bottom
padding.top = control.flat ? surfacePressed.margins.top : surfaceNormal.margins.top
padding.left = control.flat ? surfacePressed.margins.left : surfaceNormal.margins.left
padding.right = control.flat ? surfacePressed.margins.right : surfaceNormal.margins.right
padding.bottom = control.flat ? surfacePressed.margins.bottom : surfaceNormal.margins.bottom
}
}
}