Skip to content

Release 0.17#281

Merged
anhosh merged 14 commits intomainfrom
release-0.17
Jul 13, 2025
Merged

Release 0.17#281
anhosh merged 14 commits intomainfrom
release-0.17

Conversation

@anhosh
Copy link
Owner

@anhosh anhosh commented Jul 13, 2025

egui_dock 0.17.0 - 2025/07/13

Breaking changes

  • From (#272):
    • Nodes underlying data has been split up into the LeafNode and SplitNode types, meaning that any match
      statements carried out on a node now needs to account for this.
  • Upgraded to egui 0.32 (#280)

Changed

  • From (#272):
    • Tree::set_active_tab now takes impl Into<NodeIndex> and impl Into<TabIndex> to make use slightly easier.
    • Surface now implements Index<NodeIndex>/IndexMut<NodeIndex> which tries to access the surfaces node tree and
      the node at the index. This will always panic when used on an empty surface as they do not have a node tree nor
      nodes.

Added

  • From (#272):
    • DockState::iter_leaves and DockState::iter_leaves_mut - can be used to more efficiently iterate over leaf
      nodes without needing to "unwrap" them from the Node enum.
    • DockState::find_tab_from/Tree::find_tab_from - a more generalized version of the existing find_tab methods
      which doesn't require the tab type to implement PartialEq.
    • New type LeafNode which contains leaf node data and has the following methods:
      • new,
      • set_active_tab,
      • set_rect,
      • rect,
      • len,
      • is_empty,
      • tabs,
      • tabs_mut,
      • append_tab,
      • insert_tab,
      • remove_tab,
      • retain_tabs,
      • active_focused.
    • New type SplitNode which contains data about node splits and has the following methods:
      • new,
      • set_rect,
      • rect.
    • Node::get_leaf/Node::get_leaf_mut - an alternative way of trying to access leaf data in a node.
  • TabBarStyle now has two new fields: inner_margin and
    spacing. (#270)

Fixed

  • DockState::retain_tabs no longer deletes the main surface if it ends up
    empty (#277).
  • From #275:
    • {DockState,Tree}::remove_leaf now removes unused empty node`s at the back of the tree.
    • {DockState,Tree}::retain_tabs no longer deletes leaf nodes it shouldn't delete.

anhosh and others added 14 commits March 20, 2025 18:09
* feat: add on_rect_changed callback to TabViewer

This commit introduces the `on_rect_changed` callback to the `TabViewer` trait.

This callback is triggered whenever the rectangle of a tab's content changes, allowing tabs to adjust their content based on the available space. This is particularly useful when the window is resized, panels are docked or undocked, or when the dock area layout changes.

* feat: add example for saving and loading dock state

This commit adds a new example that demonstrates how to save and load the dock state to a JSON file.

This allows users to persist their preferred layout across sessions.
…Node`` (#272)

* new concrete types for ``Node``

created ``LeafNode`` and ``SplitNode`` types.

* add documentation, get rid of errors

* adding ``iter_leaves``, ``iter_leaves_mut``, and cleaning up some code

* cargo fmt

* implement ``Index<NodeIndex>`` for ``Surface``

* fixed tests, overall improved docs

* added ``is_empty`` method to ``LeafNode`` in accordance with clippy tests

* run ``cargo fmt``

* Update CHANGELOG.md

* A few minor stylistic changes

* Test fix #1

---------

Co-authored-by: Adanos020 <adanos020@gmail.com>
* Add another failing unit test

* Don't delete the main surface

* Just-in-time patching of surfaces
* Add inner_margin to TabBarStyle

* Add tab_spacing to TabStyle
* Add failing unit test

* Add two fixes
* Update popup.rs

update to egui main

* Remove deprecated calls, and call `Memory::keep_popup_open`

* Update to egui 0.32

- this does *not* update to use the new Popup API

* Fix compiler errors and Clippy warnings. Retire widgets/popup.rs as it's now entirely replaced by `egui::Popup`.

---------

Co-authored-by: Adam Gąsior <adanos020@gmail.com>
@anhosh anhosh merged commit afc4ab8 into main Jul 13, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants