diff --git a/src/app/core.rs b/src/app/core.rs index 8fa4163..bf779ad 100644 --- a/src/app/core.rs +++ b/src/app/core.rs @@ -13,6 +13,8 @@ pub struct NavBar { #[allow(clippy::struct_excessive_bools)] #[derive(Clone)] pub struct Window { + /// Label to as title in headerbar. + pub header_title: String, pub use_template: bool, pub can_fullscreen: bool, pub sharp_corners: bool, @@ -58,6 +60,7 @@ impl Default for Core { scale_factor: 1.0, title: String::new(), window: Window { + header_title: String::new(), use_template: true, can_fullscreen: false, sharp_corners: false, diff --git a/src/app/mod.rs b/src/app/mod.rs index 603de48..f046b63 100644 --- a/src/app/mod.rs +++ b/src/app/mod.rs @@ -269,7 +269,7 @@ impl ApplicationExt for App { .push_maybe(if core.window.show_headerbar { Some({ let mut header = crate::widget::header_bar() - .title(self.title()) + .title(&core.window.header_title) .on_drag(Message::Cosmic(cosmic::Message::Drag)) .on_close(Message::Cosmic(cosmic::Message::Close));