Skip to content

Commit

Permalink
Behavior::on_tab_button can now add context menus, on hover ui etc. (
Browse files Browse the repository at this point in the history
…#23)

Allows the user to set a context menu on each tab.

Co-authored-by: Mike Krüger <mkrueger@posteo.de>
  • Loading branch information
mkrueger and Mike Krüger committed Nov 10, 2023
1 parent 8aaa57b commit 1e63bd2
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/behavior.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,7 @@ pub trait Behavior<Pane> {
);
}

self.on_tab_button(tiles, tile_id, &response);

response
self.on_tab_button(tiles, tile_id, response)
}

/// Show the ui for the tab being dragged.
Expand All @@ -106,8 +104,9 @@ pub trait Behavior<Pane> {
&mut self,
_tiles: &Tiles<Pane>,
_tile_id: TileId,
_button_response: &Response,
) {
button_response: Response,
) -> Response {
button_response
}

/// Return `false` if a given pane should be removed from its parent.
Expand Down

0 comments on commit 1e63bd2

Please sign in to comment.