From 135c03146adfce216bfdbe78fec8fc298d469a73 Mon Sep 17 00:00:00 2001 From: yggverse Date: Mon, 23 Sep 2024 02:39:49 +0300 Subject: [PATCH] use namespace --- src/browser/widget.rs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/browser/widget.rs b/src/browser/widget.rs index c992a240..cd7f2ca2 100644 --- a/src/browser/widget.rs +++ b/src/browser/widget.rs @@ -1,17 +1,19 @@ +use gtk::{Application, ApplicationWindow, Box, HeaderBar}; + pub struct Browser { - gtk: gtk::ApplicationWindow, + gtk: ApplicationWindow, } impl Browser { pub fn new( - application: >k::Application, - titlebar: >k::HeaderBar, - child: >k::Box, + application: &Application, + titlebar: &HeaderBar, + child: &Box, default_width: i32, default_height: i32, ) -> Browser { Self { - gtk: gtk::ApplicationWindow::builder() + gtk: ApplicationWindow::builder() .application(application) .default_width(default_width) .default_height(default_height) @@ -21,7 +23,7 @@ impl Browser { } } - pub fn gtk(&self) -> >k::ApplicationWindow { + pub fn gtk(&self) -> &ApplicationWindow { &self.gtk } }