mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
move new tab button into the tabs start widget
This commit is contained in:
parent
1ffc5c1edb
commit
6aee2edd75
6 changed files with 12 additions and 21 deletions
|
|
@ -1,4 +1,5 @@
|
|||
use adw::{TabBar, TabView};
|
||||
use gtk::prelude::IsA;
|
||||
use std::sync::Arc;
|
||||
|
||||
pub struct Widget {
|
||||
|
|
@ -7,11 +8,12 @@ pub struct Widget {
|
|||
|
||||
impl Widget {
|
||||
// Construct
|
||||
pub fn new_arc(view: &TabView) -> Arc<Self> {
|
||||
pub fn new_arc(view: &TabView, start_action_widget: &impl IsA<gtk::Widget>) -> Arc<Self> {
|
||||
Arc::new(Self {
|
||||
gobject: TabBar::builder()
|
||||
.autohide(false)
|
||||
.expand_tabs(false)
|
||||
.start_action_widget(start_action_widget)
|
||||
.view(&view)
|
||||
.build(),
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue