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 <ogoffart@sixtyfps.io>
This commit is contained in:
Simon Hausmann 2021-07-27 19:18:22 +02:00 committed by Simon Hausmann
parent 14c6819791
commit aacb47dfaf

View file

@ -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(),