Yoda/src/app/browser/window/header/bar/widget.rs
2024-11-11 01:14:09 +02:00

27 lines
588 B
Rust

use adw::TabBar;
use gtk::{prelude::BoxExt, Box, MenuButton, Orientation, WindowControls};
pub struct Widget {
gobject: Box,
}
impl Widget {
// Construct
pub fn new(control: &WindowControls, menu: &MenuButton, tab: &TabBar) -> Self {
let gobject = Box::builder()
.orientation(Orientation::Horizontal)
.spacing(8)
.build();
gobject.append(tab);
gobject.append(menu);
gobject.append(control);
Self { gobject }
}
// Getters
pub fn gobject(&self) -> &Box {
&self.gobject
}
}