34 lines
565 B
Rust
Raw Normal View History

2024-09-20 18:02:10 +03:00
mod menu;
mod tab;
2024-09-23 18:51:48 +03:00
use gtk::prelude::BoxExt;
use gtk::{Box, Orientation};
use menu::Menu;
use tab::Tab;
2024-09-19 11:29:03 +03:00
pub struct Tray {
2024-09-23 18:51:48 +03:00
widget: Box,
}
2024-09-19 11:29:03 +03:00
impl Tray {
pub fn new() -> Tray {
2024-09-23 18:51:48 +03:00
let menu = Menu::new();
let tab = Tab::new();
let widget = Box::builder()
.orientation(Orientation::Horizontal)
.spacing(8)
.build();
widget.append(menu.widget());
widget.append(tab.widget());
Self { widget }
}
2024-09-19 11:29:03 +03:00
// Getters
2024-09-23 18:51:48 +03:00
pub fn widget(&self) -> &Box {
&self.widget
}
2024-09-20 18:02:10 +03:00
}