diff --git a/src/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp index 5ccc28c..8701df0 100644 --- a/src/gui/styles/qstylesheetstyle.cpp +++ b/src/gui/styles/qstylesheetstyle.cpp @@ -4537,9 +4537,14 @@ int QStyleSheetStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const case PM_MenuPanelWidth: case PM_MenuBarPanelWidth: - if (rule.hasBorder() || rule.hasBox()) - return (rule.border() ? rule.border()->borders[LeftEdge] : 0) - + (rule.hasBox() ? rule.box()->margins[LeftEdge]: 0); + if (rule.hasBorder() ) + { + return 0; + } + if (rule.hasBox()) + { + return rule.box()->margins[LeftEdge]; + } break;