mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
implement tab close public method
This commit is contained in:
parent
a7bd2ae078
commit
ea64d486a2
2 changed files with 10 additions and 3 deletions
|
|
@ -63,6 +63,13 @@ void Tab::append(
|
|||
}
|
||||
};
|
||||
|
||||
void Tab::close()
|
||||
{
|
||||
remove_page(
|
||||
get_current_page()
|
||||
);
|
||||
}
|
||||
|
||||
void Tab::on_label_click(
|
||||
int n,
|
||||
double x,
|
||||
|
|
@ -70,8 +77,6 @@ void Tab::on_label_click(
|
|||
) {
|
||||
if (n == 2) // double click
|
||||
{
|
||||
remove_page(
|
||||
get_current_page()
|
||||
);
|
||||
Tab::close();
|
||||
}
|
||||
}
|
||||
|
|
@ -49,6 +49,8 @@ namespace app::browser::main
|
|||
bool focus
|
||||
);
|
||||
|
||||
void close();
|
||||
|
||||
void update();
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue