mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
use modern (2018) pattern for modules
This commit is contained in:
parent
1627902b8f
commit
cdc3fe3388
28 changed files with 0 additions and 0 deletions
|
|
@ -1,33 +0,0 @@
|
|||
mod menu;
|
||||
mod tab;
|
||||
|
||||
use gtk::prelude::BoxExt;
|
||||
use gtk::{Box, Orientation};
|
||||
use menu::Menu;
|
||||
use tab::Tab;
|
||||
|
||||
pub struct Tray {
|
||||
widget: Box,
|
||||
}
|
||||
|
||||
impl Tray {
|
||||
pub fn new() -> Self {
|
||||
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 }
|
||||
}
|
||||
|
||||
// Getters
|
||||
pub fn widget(&self) -> &Box {
|
||||
&self.widget
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue