mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 17:15:28 +00:00
implement bar box as trait
This commit is contained in:
parent
8b4d184ad7
commit
137a1c72b6
3 changed files with 24 additions and 55 deletions
|
|
@ -1,30 +0,0 @@
|
|||
use gtk::{
|
||||
prelude::{BoxExt, IsA},
|
||||
Box, Orientation,
|
||||
};
|
||||
|
||||
pub struct Widget {
|
||||
pub g_box: Box,
|
||||
}
|
||||
|
||||
impl Widget {
|
||||
// Constructors
|
||||
|
||||
/// Build new `Self`
|
||||
pub fn build(
|
||||
control: &impl IsA<gtk::Widget>,
|
||||
menu: &impl IsA<gtk::Widget>,
|
||||
tab: &impl IsA<gtk::Widget>,
|
||||
) -> Self {
|
||||
let g_box = Box::builder()
|
||||
.orientation(Orientation::Horizontal)
|
||||
.spacing(8)
|
||||
.build();
|
||||
|
||||
g_box.append(tab);
|
||||
g_box.append(menu);
|
||||
g_box.append(control);
|
||||
|
||||
Self { g_box }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue