slint-ui / slint

Slint is a declarative GUI toolkit to build native user interfaces for Rust, C++, or JavaScript apps.
https://slint.dev
Other
17.72k stars 615 forks source link

No icons on buttons with text Slint 1.8.0 #6594

Open d3im opened 1 month ago

d3im commented 1 month ago

Gentoo linux here, Rust 1.82.0, Slint 1.8.0. I have two kinds of button - with icon and text and with icon only. Icon only button displays icon well (first snippet) Icon and text button => Icon is not displayed - only text. (second snippet)

It worked with older version.

                Button {
                    icon: @image-url("icons/setup.svg");
                    clicked => {
                        root.play-settings-visible = !root.play-settings-visible;
                    }
                }
                Button {
                    text: root.init-tools ? "Update" : "Init";
                    clicked => {
                        root.update_button();
                    }
                    icon: root.update_results == 0 ? @image-url("icons/update.svg") : root.update_results == 1 ? @image-url("icons/ok.svg") : root.update_results == 2 ? @image-url("icons/err.svg") : @image-url("icons/busy.svg");
                }
ogoffart commented 1 month ago

Our gallery has buttons with icons, and they show properly: https://docs.slint.dev/latest/demos/gallery Maybe the files are not existing? What platform/OS are you using. Where are the icon not showing?