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:
parent
d10afb5d2a
commit
7062c635a9
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user