mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 17:15:28 +00:00
implement separated mod for window widget, rename getters
This commit is contained in:
parent
13292a977d
commit
1e00c5930c
5 changed files with 58 additions and 64 deletions
20
src/app/browser/window/widget.rs
Normal file
20
src/app/browser/window/widget.rs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
use gtk::{prelude::BoxExt, Box, Notebook, Orientation};
|
||||
|
||||
pub struct Widget {
|
||||
gobject: Box,
|
||||
}
|
||||
|
||||
impl Widget {
|
||||
// Construct
|
||||
pub fn new(tab: &Notebook) -> Self {
|
||||
let gobject = Box::builder().orientation(Orientation::Vertical).build();
|
||||
gobject.append(tab);
|
||||
|
||||
Self { gobject }
|
||||
}
|
||||
|
||||
// Getters
|
||||
pub fn gobject(&self) -> &Box {
|
||||
&self.gobject
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue