diff --git a/qrenderdoc/Styles/RDStyle/RDStyle.cpp b/qrenderdoc/Styles/RDStyle/RDStyle.cpp index 37b7c511d..7bbb6a835 100644 --- a/qrenderdoc/Styles/RDStyle/RDStyle.cpp +++ b/qrenderdoc/Styles/RDStyle/RDStyle.cpp @@ -517,8 +517,13 @@ QSize RDStyle::sizeFromContents(ContentsType type, const QStyleOption *opt, cons { QSize ret = size; - ret.setWidth(Constants::ButtonBorder * 2 + ret.width()); - ret.setHeight(Constants::ButtonBorder * 2 + ret.height()); + const QStyleOptionFrame *frame = qstyleoption_cast(opt); + + if(frame && frame->lineWidth > 0) + { + ret.setWidth(Constants::ButtonBorder * 2 + ret.width()); + ret.setHeight(Constants::ButtonBorder * 2 + ret.height()); + } return ret; }