From 7062c635a9bc7186af5d14037ba74cb527bf6386 Mon Sep 17 00:00:00 2001 From: Noah Davis Date: Thu, 13 Aug 2020 16:26:18 -0400 Subject: [PATCH] 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 --- src/declarativeimports/plasmastyle/ToolButtonStyle.qml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/declarativeimports/plasmastyle/ToolButtonStyle.qml b/src/declarativeimports/plasmastyle/ToolButtonStyle.qml index 5f2072b04..95d09641b 100644 --- a/src/declarativeimports/plasmastyle/ToolButtonStyle.qml +++ b/src/declarativeimports/plasmastyle/ToolButtonStyle.qml @@ -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 } } }