remove extra getters, give name to gobjects

This commit is contained in:
yggverse 2024-12-12 14:35:53 +02:00
parent 58f9ed537d
commit 582bef28b0
4 changed files with 16 additions and 21 deletions

View file

@ -32,7 +32,7 @@ impl Bar {
widget: Rc::new(Widget::new(
&control.widget.gobject,
&menu.widget.gobject,
&tab.widget.gobject,
&tab.widget.tab_bar,
)),
}
}

View file

@ -2,14 +2,14 @@ use adw::{TabBar, TabView};
use gtk::prelude::IsA;
pub struct Widget {
pub gobject: TabBar,
pub tab_bar: TabBar,
}
impl Widget {
// Construct
pub fn new(view: &TabView, start_action_widget: &impl IsA<gtk::Widget>) -> Self {
Self {
gobject: TabBar::builder()
tab_bar: TabBar::builder()
.autohide(false)
.expand_tabs(false)
.end_action_widget(start_action_widget) // @TODO find solution to append after tabs