mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Make sure not to account for an invisible frame when sizing line edits
This commit is contained in:
@@ -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<const QStyleOptionFrame *>(opt);
|
||||
|
||||
if(frame && frame->lineWidth > 0)
|
||||
{
|
||||
ret.setWidth(Constants::ButtonBorder * 2 + ret.width());
|
||||
ret.setHeight(Constants::ButtonBorder * 2 + ret.height());
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user