insert new tab after current on middle click

This commit is contained in:
yggverse 2024-10-15 15:55:14 +03:00
parent 29588c0d0b
commit 18d0da99f2
5 changed files with 18 additions and 6 deletions

View file

@ -20,10 +20,14 @@ impl Widget {
tab_view: &TabView,
page: &Box,
title: Option<&str>,
position: Option<i32>,
is_pinned: bool,
is_selected: bool,
) -> Arc<Self> {
let gobject = tab_view.append(page);
let gobject = match position {
Some(number) => tab_view.insert(page, number),
None => tab_view.append(page),
};
gobject.set_keyword(keyword);