Merged
Conversation
* 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.
…to close the tab (#266)
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
egui_dock 0.17.0 - 2025/07/13
Breaking changes
Nodes underlying data has been split up into theLeafNodeandSplitNodetypes, meaning that any matchstatements carried out on a node now needs to account for this.
Changed
Tree::set_active_tabnow takesimpl Into<NodeIndex>andimpl Into<TabIndex>to make use slightly easier.Surfacenow implementsIndex<NodeIndex>/IndexMut<NodeIndex>which tries to access the surfaces node tree andthe 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
DockState::iter_leavesandDockState::iter_leaves_mut- can be used to more efficiently iterate over leafnodes without needing to "unwrap" them from the
Nodeenum.DockState::find_tab_from/Tree::find_tab_from- a more generalized version of the existingfind_tabmethodswhich doesn't require the tab type to implement
PartialEq.LeafNodewhich 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.SplitNodewhich 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.TabBarStylenow has two new fields:inner_marginandspacing. (#270)Fixed
DockState::retain_tabsno longer deletes the main surface if it ends upempty (#277).
{DockState,Tree}::remove_leafnow removes unused empty node`s at the back of the tree.{DockState,Tree}::retain_tabsno longer deletes leaf nodes it shouldn't delete.