Fix the size of the native CheckBox

This commit is contained in:
Olivier Goffart 2020-10-20 19:00:40 +02:00
parent 4f4d2b10e9
commit e46e0b683c

View file

@ -293,7 +293,7 @@ impl Item for NativeCheckBox {
QStyleOptionButton option;
option.rect = option.fontMetrics.boundingRect(text);
option.text = std::move(text);
return qApp->style()->sizeFromContents(QStyle::CT_PushButton, &option, option.rect.size(), nullptr) * dpr;
return qApp->style()->sizeFromContents(QStyle::CT_CheckBox, &option, option.rect.size(), nullptr) * dpr;
});
LayoutInfo {
min_width: size.width as f32,