mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 14:21:16 +00:00
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:
parent
14c6819791
commit
aacb47dfaf
1 changed files with 2 additions and 2 deletions
|
@ -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(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue