- The "Eject" button is not available on tabs which are disallowed in windows. (#188)
TabViewer::clear_background
now works as intended. (#185)
- (Breaking) Renamed
OverlayStyle::selection_storke_width
toOverlayStyle::selection_stroke_width
.
This is the biggest update so far, introducing the long awaited undocking feature: tabs can now be dragged out into new egui windows. Massive thanks to Vickerinox for implementing it!
This update also includes an overhaul of the documentation, aiming to not only be more readable and correct, but also provide a guide of how to use the library.
- Adjusted the styling of tabs to closer follow the egui default styling. (#139)
- Double-clicking on a separator resets the size of both adjacent nodes. (#146)
- Tabs can now only be dragged with the primary pointer button (e.g. left mouse button). (#177)
- Correctly draw a border around a dock area using the
Style::border
property. (#139) - Non-closable tabs now cannot be closed by clicking with the middle mouse button. (9cdef8c)
- Dragging tabs around now works on touchscreens. (#180)
- From #139:
Style::main_surface_border_rounding
for the rounding of the dock area border.TabStyle::active
for the active style of a tab.TabStyle::inactive
for the inactive style of a tab.TabStyle::focused
for the focused style of a tab.TabStyle::hovered
for the hovered style of a tab.TabStyle::tab_body
for styling the body of the tab including background color, stroke color, rounding and inner margin.TabStyle::minimum_width
to set the minimum width of the tab.TabInteractionStyle
to style the active/inactive/focused/hovered states of a tab.
AllowedSplits
enum which lets you choose in which directions aDockArea
can be split. (#145)- From #149:
DockState<Tab>
containing the entire state of the tab hierarchies stored in a collection ofSurfaces
.Surface<Tab>
enum which represents an area (e.g. a window) with its ownTree<Tab>
.SurfaceIndex
to identify aSurface
stored in theDockState
.Split::is_tob_bottom
andSplit::is_left_right
.TabInsert
which replaces currentTabDestination
(see breaking changes).impl From<(SurfaceIndex, NodeIndex, TabInsert)> for TabDestination
.impl From<SurfaceIndex> for TabDestination
.TabDestination::is_window
(see breaking changes).Tree::root_node
andTree::root_node_mut
.Node::rect
returning theRect
occupied by the node.Node::tabs
andNode::tabs_mut
returning an optional slice of tabs if the node is a leaf.WindowState
representing the current state of aSurface::Window
and allowing you to manipulate the window.OverlayStyle
(stored asStyle::overlay
) andOverlayFeel
: they specify the look and feel of the drag-and-drop overlay.OverlayType
letting you choose if the overlay should be the new icon buttons or the old highlighted rectangles.LeafHighlighting
specifying how a currently hovered leaf should be highlighted.DockArea::window_bounds
setting the area which windows are constrained by.DockArea::show_window_close_buttons
setting determining if windows should have a close button or not.DockArea::show_window_collapse_buttons
setting determining if windows should have a collapse button or not.TabViewer::allowed_in_windows
specifying if a given tab can be shown in a window.
TabViewer::closable
lets individual tabs be closable or not. (#150)TabViewer::scroll_bars
specifying if horizontal and vertical scrolling is enabled for given tab – replacesDockArea::scroll_area_in_tabs
(see breaking changes). (#160)Translations
specifying what text will be displayed in some parts of theDockingArea
, e.g. the tab context menus (defined inTabContextMenuTranslations
). (#178)
- From #139:
- Moved
TabStyle::inner_margin
toTabBodyStyle::inner_margin
. - Moved
TabStyle::fill_tab_bar
toTabBarStyle::fill_tab_bar
. - Moved
TabStyle::outline_color
toTabInteractionStyle::outline_color
. - Moved
TabStyle::rounding
toTabInteractionStyle::rounding
. - Moved
TabStyle::bg_fill
toTabInteractionStyle::bg_fill
. - Moved
TabStyle::text_color_unfocused
toTabStyle::inactive.text_color
. - Moved
TabStyle::text_color_active_focused
toTabStyle::focused.text_color
. - Moved
TabStyle::text_color_active_unfocused
toTabStyle::active.text_color
. - Renamed
Style::tabs
toStyle::tab
. - Removed
TabStyle::text_color_focused
. This style was practically never reachable.
- Moved
- From #149:
TabDestination
now specifies if a tab will be moved to aWindow
, aNode
, or anEmptySurface
. Its original purpose is now served byTabInsert
.Tree::split
now panics if suppliedfraction
is not in range 0..=1.- Moved
Tree::move_tab
toDockState::move_tab
. - Renamed
Style::border
toStyle::main_surface_border_stroke
. - Moved
Style::selection_color
toOverlayStyle::selection_color
. DockArea::new
now takes in aDockState
instead of aTree
.
- Removed
DockArea::scroll_area_in_tabs
– overrideTabViewer::scroll_bars
instead. (#160) - Methods
TabViewer::{context_menu,on_add,add_popup}
now take in an additionalSurfaceIndex
parameter. (#167)
- Made the
DockArea
always allocate an area (#143)
- Make the
max_size
oftabbar_inner_rect
finite (#141)
- Ensure rect size are calculated before drawing node bodies (#134)
TabViewer::tab_style_override
that lets you define a customTabsStyle
for an individual tab (99333b0)ButtonsStyle::add_tab_border_color
for the+
button's left border (99333b0)TabBarStyle::rounding
for rounding of the tab bar, independent from tab rounding (99333b0)- Separate
from_egui
methods forButtonsStyle
,SeparatorStyle
,TabBarStyle
, andTabStyle
(a660497)
- Upgraded
egui
to version 0.22 (c2e8fee) - Renamed
TabsStyle
toTabStyle
(89f3248) - Removed
StyleBuilder
(9a9b275) - Removed
TabViewer::inner_margin_override
– no deprecation as it's in direct conflict withTabViewer::tab_style_override
(99333b0) - Moved
Style::default_inner_margin
toTabsStyle::inner_margin
(78ecf3a) - Moved
TabStyle::hline_color
toTabBarStyle::hline_color
(99333b0)
- Ensure rect size are calculated before drawing node bodies (#134)
- Ensure close button can be scrolled to when tab bar is small (#129)
SeparatorStyle::extra_interact_width
option that adds "logical" width to separators so that they are easier to grab (#128)
- Ensure
Tab
have a stableegui::Id
when moved (#121) - Don't display the "grab" cursor icon on tabs when hovered and the
draggable_tabs
flag is unset (#123)
Tree::move_tab
method that allows moving a tab from one node to the other (#115)Tree::remove_leaf
method that deletes a selected leaf node (#115)- New methods in
DockArea
(#115)show_add_popup
show_add_buttons
show_close_buttons
draggable_tabs
tab_context_menus
scroll_area_in_tabs
show_tab_name_on_hover
- Make tabs scrollable when they overflow (#116)
TabViewer::id
method that allows specifying a custom id for each tab (#121)
- Removed
remove_empty_leaf
which was used for internal usage and should not be needed by users (#115) - Removed
show_close_buttons
fromStyleBuilder
(#115) - Moved the following fields from
Style
toDockArea
(#115)show_add_popup
show_add_buttons
show_close_buttons
tabs_are_draggable
(renamed todraggable_tabs
)show_context_menu
(renamed totab_context_menus
)tab_include_scrollarea
(renamed toscroll_area_in_tabs
)tab_hover_name
(renamed toshow_tab_name_on_hover
)
Style
is now split up into smaller structs for maintainability and consistence withegui::Style
(#115)
Old names and locations | New names and locations |
---|---|
Style::border_color and Style::border_width |
Style::border (which is now an egui::Stroke ) |
Style::separator_width |
Separator::width |
Style::separator_extra |
Separator::extra |
Style::separator_color_idle |
Separator::color_idle |
Style::separator_color_hovered |
Separator::color_hovered |
Style::separator_color_dragged |
Separator::color_dragged |
Style::tab_bar_background_color |
TabBar::bg_fill |
Style::tab_bar_height |
TabBar::height |
Style::tab_outline_color |
Tabs::outline_color |
Style::hline_color |
Tabs::hline_color |
Style::hline_below_active_tab_name |
Tabs::hline_below_active_tab_name |
Style::tab_rounding |
Tabs::rounding |
Style::tab_background_color |
Tabs::bg_fill |
Style::tab_text_color_unfocused |
Tabs::text_color_unfocused |
Style::tab_text_color_focused |
Tabs::text_color_focused |
Style::tab_text_color_active_unfocused |
Tabs::text_color_active_unfocused |
Style::tab_text_color_active_focused |
Tabs::text_color_active_focused |
Style::expand_tabs |
Tabs::fill_tab_bar |
Style::close_tab_color |
Buttons::close_tab_color |
Style::close_tab_active_color |
Buttons::close_tab_active_color |
Style::close_tab_background_color |
Buttons::close_tab_bg_fill |
Style::add_tab_align |
Buttons::add_tab_align |
Style::add_tab_color |
Buttons::add_tab_color |
Style::add_tab_active_color |
Buttons::add_tab_active_color |
Style::add_tab_background_color |
Buttons::add_tab_bg_fill |
StyleBuilder
TabViewer::clear_background
works again (#110)
- Light mode now works in tabs (528b892)
DockArea::show_inside
no longer obscures previously added elements (#102)- Splitter drag now behaves like egui
DragValue
(#103)
- Added
TabViewer::on_tab_button
(#93).
- Updated to egui 0.21
- Deleted
dynamic_tab
which was deprecated in 0.3.0
- Make splitter drag behave like egui
DragValue
(#103)
Style
now includes an option to change the tab's height -tab_bar_height
. (#62)- Implemented the
std::fmt::Debug
trait on all exported types. (#84)
- Errors in the README
TabViewer::clear_background
method that returns if current tab's background should be cleared. (#35)- You can now close tabs with middle mouse button if
Style::show_close_buttons
is true. (#34) - Option to disable dragging tabs.
- New option
expand_tabs
inStyle
andStyleBuiler
causes tab titles to expand to match the width of their tab bars. StyleBuilder::from_egui
. (#40)Tree::find_active_focused
. (#40)- Added
context_menu
intoTabViewer
. (#46) - The
ScrollArea
inside a tab is now optional viaStyle
. (#49) Tree::tabs
: an iterator over the tabs in a tree. (#53)Style
now includes an option to show the hovered tab's name. (#56)Style
now includes an option to change default inner_margin. (#67)- The split separator now highlights on hover (#68)
- Tabs can now be removed with
Tree::remove_tab
(#70)
- Renamed
TabViewer::inner_margin
toTabViewer::inner_margin_override
. (#67) Style::with_separator_color
has been split intoseparator_color_idle
,separator_color_hovered
,separator_color_dragged
(#68)- Updated
egui
to 0.20.0 #77
dynamic_tab::TabContent
dynamic_tab::OnClose
dynamic_tab::ForceClose
dynamic_tab::TabBuilder
dynamic_tab::Tab
dynamic_tab::BuiltTab
dynamic_tab::DynamicTree
dynamic_tab::DynamicTabViewer
- Added opt-in
serde
feature to enable serialization ofTree
. - You can now change the tab text color with
Style::tab_text_color_unfocused
andStyle::tab_text_color_focused
.
Tree::push_to_first_leaf
no longer panics when used on an emptyTree
.- The tab text color will now follow the egui text color.
- It is now possible to close tabs with a close button that can be shown/hidden through
Style
. - When dragging tabs onto the tab bar if the tab will be inserted a highlighted region will show where the tab will end up if dropped.
- The dock will keep track of the currently focused leaf.
- Using
Tree::push_to_focused_leaf
will push the given tab to the currently active leaf. StyleBuilder
for theStyle
.- New fields in
Style:
separator_color
,border_color
, andborder_width
(last two for the cases when usedMargin
). TabBuilder
for theBuiltTab
.- Support for all implementations of
Into<WidgetText>
in tab titles. - Style editor in the
hello
example. - Added
Tree::find_tab
,TabViewer
,DynamicTabViewer
,DynamicTree
. - Added a
text_editor
example.
- If a tab is dropped onto the tab bar it will be inserted into the index that it is dropped onto.
- Now when you drag a tab it has an outline along the entire length of the edges of it.
- Bumped MSRV to
1.62
. Tree
is now generic over how you want to represent a tab.
- Ui code of the dock has been moved into
DockArea
and is displayed withDockArea::show
orDockArea::show_inside
. - Renamed
Style::border_size
toStyle::border_width
. - Renamed
Style::separator_size
toStyle::separator_width
. - Removed
Style::tab_text_color
as you can now set the tab text color of a tab by passingRichText
for its title. - Removed the requirement of creating your own Context type.
- Renamed
Tree::set_focused
toTree::set_focused_node
. - Renamed
Node::None
toNode::Empty
.
- Now selection color of the placing area for the tab isn't showing if the tab is targeted on its own node when the tab is the only member of this node.
- Dock vertical and horizontal separators are now displayed properly.
- Prevent Id clashes from multiple tabs being displayed at once.
- Tab content is now displayed inside a
egui::ScrollArea
, so it's now accessible in its entirety even if the tab is too small to fit all of it. - Fixed an issue where some tabs couldn't be resized.