From e46e0b683c3843131fceddb5646a2d73a2bc8111 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 20 Oct 2020 19:00:40 +0200 Subject: [PATCH] Fix the size of the native CheckBox --- sixtyfps_runtime/rendering_backends/qt/widgets.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sixtyfps_runtime/rendering_backends/qt/widgets.rs b/sixtyfps_runtime/rendering_backends/qt/widgets.rs index 8b15dc3de..420b37c4b 100644 --- a/sixtyfps_runtime/rendering_backends/qt/widgets.rs +++ b/sixtyfps_runtime/rendering_backends/qt/widgets.rs @@ -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,