mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-01-30 13:04:13 +00:00
implement tab close public method
This commit is contained in:
parent
a7bd2ae078
commit
ea64d486a2
@ -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…
x
Reference in New Issue
Block a user