Trying to write application in Rust (gtk4-rs 0.9.1) but titlebar
setter available for v4_6
feature enabled only. What is this mean - the .titlebar
(set_titlebar
) feature is deprecated or just testing?
I’ve used it before in C++, and it is officially documented without deprecation warnings, problem with gtk4-rs
only until I provide this version in Cargo.toml:
[dependencies]
gtk4 = { version = "0.9.1", features = ["v4_6"] }
Here is the code example, where .titlebar
is not found by default:
use gtk4 as gtk;
use gtk::{Application, ApplicationWindow};
pub fn new(app: &Application) -> ApplicationWindow
{
return ApplicationWindow::builder().application(app)
.default_width(640)
.default_height(480)
.titlebar(&header::new()) // feature = "v4_6" required
.child(&main::new())
.build();
}
Thanks for any info as beginner in GTK ecosystem