You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to use GTK4-rs, the "Hello World" example has more than 100+ memory usage under cargo run --release, is there any way to reduce the memory usage, am I missing some settings?
[package]
name = "gtk_demo1"version = "0.1.0"edition = "2021"# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
gtk4={version = "0.8.2"}
use gtk4::prelude::*;use gtk4::{glib,Application,ApplicationWindow,Button};constAPP_ID:&str = "org.gtk_rs.HelloWorld2";fnmain() -> glib::ExitCode{// Create a new applicationlet app = Application::builder().application_id(APP_ID).build();// Connect to "activate" signal of `app`
app.connect_activate(build_ui);// Run the application
app.run()}fnbuild_ui(app:&Application){// Create a button with label and marginslet button = Button::builder().label("Press me!").margin_top(12).margin_bottom(12).margin_start(12).margin_end(12).build();// Connect to "clicked" signal of `button`
button.connect_clicked(|button| {// Set the label to "Hello World!" after the button has been clicked on
button.set_label("Hello World!");});// Create a windowlet window = ApplicationWindow::builder().application(app).title("My GTK App").child(&button).build();// Present window
window.present();}
The text was updated successfully, but these errors were encountered:
I tried to use GTK4-rs, the "Hello World" example has more than 100+ memory usage under cargo run --release, is there any way to reduce the memory usage, am I missing some settings?
The text was updated successfully, but these errors were encountered: