Skip to content

Commit

Permalink
Update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
micfong-z committed May 23, 2024
1 parent 6e56846 commit 370e477
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 40 deletions.
80 changes: 42 additions & 38 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,50 +4,54 @@

### Added

- `Node::is_collapsed` – returns whether the `Node` is collapsed
- `Node::collapsed_leaf_count` – returns the number of collapsed layers of leaf subnodes
- `Node::set_collapsed` – set the collapsing state of the `Node`
- `Node::set_collapsed_leaf_count` – sets the number of collapsed layers of leaf subnodes
- `DockArea::show_leaf_close_all_buttons` – shows a close all button which closes all open tabs in a leaf
- `DockArea::show_leaf_collapse_buttons` – shows a collapsing button which collapses a leaf (no longer collapsing a window)
- Added style configuration for the two buttons:
- `ButtonsStyle::close_all_tabs_color`
- `ButtonsStyle::close_all_tabs_active_color`
- `ButtonsStyle::close_all_tabs_bg_fill`
- `ButtonsStyle::close_all_tabs_border_color`
- `ButtonsStyle::close_all_tabs_disabled_color`
- `ButtonsStyle::collapse_tabs_color`
- `ButtonsStyle::collapse_tabs_active_color`
- `ButtonsStyle::collapse_tabs_bg_fill`
- `ButtonsStyle::collapse_tabs_border_color`
- `Node::Leaf::collapsed` attribute – records whether a leaf is collapsed.
- `Node::Vertical::fully_collapsed` attribute – records whether all subnodes are collapsed.
- `Node::Vertical::collapsed_leaf_count` attribute – records the number of collapsed layers of leaf subnodes.
- `Node::Horizontal::fully_collapsed` attribute – records whether all subnodes are collapsed.
- `Node::Horizontal::collapsed_leaf_count` attribute – records the number of collapsed layers of leaf subnodes.
- `Tree::collapsed` attribute – records whether all subnodes of the tree is collapsed
- `Tree::collapsed_leaf_count` attribute – records the number of collapsed layers of leaf subnodes.
- `Tree::set_collapsed` method – sets the collapsing state of the tree.
- `Tree::is_collapsed` method – returns whether the tree is collapsed.
- `Tree::set_collapsed_leaf_count` method – sets the number of collapsed layers of leaf subnodes in the tree.
- `Tree::collapsed_leaf_count` method – returns the number of collapsed layers of leaf subnodes in the tree.
- `DockArea::tab_close_all` method – draws the close all button on a tab bar.
- `DockArea::tab_collapse` method – draws the collapse button on a tab bar.
- `DockArea::tab_collapse_pressed` method – performs the collapse action when the collapse button is pressed.
- `TabRemoval::Leaf(SurfaceIndex, NodeIndex)` variant – removes a leaf node from a surface.
- From ([#237](https://github.com/Adanos020/egui_dock/pull/237)):
- `Node::is_collapsed` – returns whether the `Node` is collapsed
- `Node::collapsed_leaf_count` – returns the number of collapsed layers of leaf subnodes
- `Node::set_collapsed` – set the collapsing state of the `Node`
- `Node::set_collapsed_leaf_count` – sets the number of collapsed layers of leaf subnodes
- `DockArea::show_leaf_close_all_buttons` – shows a close all button which closes all open tabs in a leaf
- `DockArea::show_leaf_collapse_buttons` – shows a collapsing button which collapses a leaf (no longer collapsing a window)
- Added style configuration for the two buttons:
- `ButtonsStyle::close_all_tabs_color`
- `ButtonsStyle::close_all_tabs_active_color`
- `ButtonsStyle::close_all_tabs_bg_fill`
- `ButtonsStyle::close_all_tabs_border_color`
- `ButtonsStyle::close_all_tabs_disabled_color`
- `ButtonsStyle::collapse_tabs_color`
- `ButtonsStyle::collapse_tabs_active_color`
- `ButtonsStyle::collapse_tabs_bg_fill`
- `ButtonsStyle::collapse_tabs_border_color`
- `Node::Leaf::collapsed` attribute – records whether a leaf is collapsed.
- `Node::Vertical::fully_collapsed` attribute – records whether all subnodes are collapsed.
- `Node::Vertical::collapsed_leaf_count` attribute – records the number of collapsed layers of leaf subnodes.
- `Node::Horizontal::fully_collapsed` attribute – records whether all subnodes are collapsed.
- `Node::Horizontal::collapsed_leaf_count` attribute – records the number of collapsed layers of leaf subnodes.
- `Tree::collapsed` attribute – records whether all subnodes of the tree is collapsed
- `Tree::collapsed_leaf_count` attribute – records the number of collapsed layers of leaf subnodes.
- `Tree::set_collapsed` method – sets the collapsing state of the tree.
- `Tree::is_collapsed` method – returns whether the tree is collapsed.
- `Tree::node_update_collapsed` method – updates the collapsed state of the node and its parents.
- `Tree::set_collapsed_leaf_count` method – sets the number of collapsed layers of leaf subnodes in the tree.
- `Tree::collapsed_leaf_count` method – returns the number of collapsed layers of leaf subnodes in the tree.
- `DockArea::tab_close_all` method – draws the close all button on a tab bar.
- `DockArea::tab_collapse` method – draws the collapse button on a tab bar.
- `DockArea::window_update_collapsed` method – updates the collapsed state of the node and its parents in a window.
- `TabRemoval::Leaf(SurfaceIndex, NodeIndex)` variant – removes a leaf node from a surface.

### Breaking changes

- Renamed `Translations::WindowTranslations` to `Translations::LeafTranslations`.
- `WindowState::create_window` now returns a `egui::Window` only, instead of `(egui::Window, bool)`.
- Removed `DockArea::show_window_body`.
- Removed `DockArea::show_close_button`.
- Removed `close_button` from `window_surface.rs`.
- From ([#237](https://github.com/Adanos020/egui_dock/pull/237)):
- Renamed `Translations::WindowTranslations` to `Translations::LeafTranslations`.
- `WindowState::create_window` now returns a `egui::Window` only, instead of `(egui::Window, bool)`.
- Removed `DockArea::show_window_body`.
- Removed `DockArea::show_close_button`.
- Removed `close_button` from `window_surface.rs`.

### Deprecated

- `DockArea::show_window_close_buttons` – no longer has any effect; use `DockArea::show_leaf_close_all_buttons` instead.
- `DockArea::show_window_collapse_buttons` – no longer has any effect; use `DockArea::show_leaf_collapse_buttons` instead.
- From ([#237](https://github.com/Adanos020/egui_dock/pull/237)):
- `DockArea::show_window_close_buttons` – no longer has any effect; use `DockArea::show_leaf_close_all_buttons` instead.
- `DockArea::show_window_collapse_buttons` – no longer has any effect; use `DockArea::show_leaf_collapse_buttons` instead.

## 0.12.0 - 2024-04-05

Expand Down
4 changes: 2 additions & 2 deletions src/widgets/dock_area/show/leaf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -699,12 +699,12 @@ impl<'tree, Tab> DockArea<'tree, Tab> {
if response.clicked() {
self.dock_state[surface_index][node_index].set_collapsed(!collapsed);
self.dock_state[surface_index].node_update_collapsed(node_index);
self.update_window_collapsed(surface_index, node_index);
self.window_update_collapsed(surface_index, node_index);
}
}

/// Updates the collapsed state of the node and its parents.
fn update_window_collapsed(&mut self, surface_index: SurfaceIndex, node_index: NodeIndex) {
fn window_update_collapsed(&mut self, surface_index: SurfaceIndex, node_index: NodeIndex) {
let surface = &mut self.dock_state[surface_index];
let collapsed = surface[node_index].is_collapsed();
if !collapsed {
Expand Down

0 comments on commit 370e477

Please sign in to comment.