From aacb47dfaf75056918187f42ac66cdea7a3cf96c Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Tue, 27 Jul 2021 19:18:22 +0200 Subject: [PATCH] qt native button: Apply suggestions from code review Add the icon type explicitly to make it easier to do "eye" based type matching with the cpp! macro. Co-authored-by: Olivier Goffart --- sixtyfps_runtime/rendering_backends/qt/widgets.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sixtyfps_runtime/rendering_backends/qt/widgets.rs b/sixtyfps_runtime/rendering_backends/qt/widgets.rs index 32491e280..2e73930a5 100644 --- a/sixtyfps_runtime/rendering_backends/qt/widgets.rs +++ b/sixtyfps_runtime/rendering_backends/qt/widgets.rs @@ -178,7 +178,7 @@ impl Item for NativeButton { _window: &WindowRc, ) -> LayoutInfo { let mut text: qttypes::QString = self.text().as_str().into(); - let icon = crate::qt_window::load_image_from_resource( + let icon : qttypes::QPixmap = crate::qt_window::load_image_from_resource( (&self.icon()).into(), None, Default::default(), @@ -255,7 +255,7 @@ impl Item for NativeButton { fn_render! { this dpr size painter => let down: bool = this.pressed(); let text: qttypes::QString = this.text().as_str().into(); - let icon = crate::qt_window::load_image_from_resource( + let icon : qttypes::QPixmap = crate::qt_window::load_image_from_resource( (&this.icon()).into(), None, Default::default(),