mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
implement tabs id features
This commit is contained in:
parent
09c08b2b6f
commit
06cfd72c62
4 changed files with 30 additions and 29 deletions
|
|
@ -11,6 +11,7 @@ pub struct Widget {
|
|||
impl Widget {
|
||||
// Construct
|
||||
pub fn new_arc(
|
||||
keyword: &str, // ID
|
||||
tab_view: &TabView,
|
||||
page: &Box,
|
||||
title: Option<&str>,
|
||||
|
|
@ -18,6 +19,8 @@ impl Widget {
|
|||
) -> Arc<Self> {
|
||||
let gobject = tab_view.append(page);
|
||||
|
||||
gobject.set_keyword(keyword);
|
||||
|
||||
gobject.set_title(match title {
|
||||
Some(value) => value,
|
||||
None => DEFAULT_TITLE,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue