Struct egui_dock::StyleBuilder
source · pub struct StyleBuilder { /* private fields */ }
Expand description
Builds a Style
with custom configuration values.
Implementations§
source§impl StyleBuilder
impl StyleBuilder
sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new StyleBuilder.
sourcepub fn from_egui(style: &Style) -> Self
pub fn from_egui(style: &Style) -> Self
Derives relevant fields from egui::Style
and sets the remaining fields to their default values.
See also: Style::from_egui
.
sourcepub fn with_padding(self, padding: Margin) -> Self
pub fn with_padding(self, padding: Margin) -> Self
Sets padding
to indent from the edges of the window. By Default
it’s None
.
sourcepub fn with_border_color(self, border_color: Color32) -> Self
pub fn with_border_color(self, border_color: Color32) -> Self
Sets border_color
for the window of “working area”. By Default
it’s [egui::Color32::BLACK
].
sourcepub fn with_border_width(self, border_width: f32) -> Self
pub fn with_border_width(self, border_width: f32) -> Self
Sets border_width
for the border. By Default
it’s 0.0
.
sourcepub fn with_selection_color(self, selection_color: Color32) -> Self
pub fn with_selection_color(self, selection_color: Color32) -> Self
Sets selection color
for the placing area of the tab where this tab targeted on it. By Default
it’s (0, 191, 255)
(light blue) with 0.5
capacity.
sourcepub fn with_separator_width(self, separator_width: f32) -> Self
pub fn with_separator_width(self, separator_width: f32) -> Self
Sets separator_size
for the rectangle separator between nodes. By Default
it’s 1.0
.
sourcepub fn with_separator_extra(self, separator_extra: f32) -> Self
pub fn with_separator_extra(self, separator_extra: f32) -> Self
Sets separator_extra
it sets limit for the allowed area for the separator offset. By Default
it’s 175.0
.
bigger value > less allowed offset
for the current window size.
sourcepub fn with_separator_color_idle(self, separator_color_idle: Color32) -> Self
pub fn with_separator_color_idle(self, separator_color_idle: Color32) -> Self
Sets the idle color for the rectangle separator. By Default
it’s [Color32::BLACK
].
sourcepub fn with_separator_color_hovered(
self,
separator_color_hovered: Color32
) -> Self
pub fn with_separator_color_hovered( self, separator_color_hovered: Color32 ) -> Self
Sets the hovered color for the rectangle separator. By Default
it’s [Color32::GRAY
].
sourcepub fn with_separator_color_dragged(
self,
separator_color_dragged: Color32
) -> Self
pub fn with_separator_color_dragged( self, separator_color_dragged: Color32 ) -> Self
Sets the dragged color for the rectangle separator. By Default
it’s [Color32::WHITE
].
sourcepub fn with_tab_bar_background(self, tab_bar_background_color: Color32) -> Self
pub fn with_tab_bar_background(self, tab_bar_background_color: Color32) -> Self
Sets tab_bar_background_color
for the color of tab bar. By Default
it’s [Color32::WHITE
].
sourcepub fn with_tab_bar_height(self, tab_bar_height: f32) -> Self
pub fn with_tab_bar_height(self, tab_bar_height: f32) -> Self
Sets tab_bar_height
for the color of tab bar. By Default
it’s 24.0
.
sourcepub fn with_tab_outline_color(self, tab_outline_color: Color32) -> Self
pub fn with_tab_outline_color(self, tab_outline_color: Color32) -> Self
Sets tab_outline_color
for the outline color of tabs. By Default
it’s [Color32::BLACK
].
sourcepub fn with_hline_color(self, hline_color: Color32) -> Self
pub fn with_hline_color(self, hline_color: Color32) -> Self
Sets Style::hline_color
, the line separating the tab name area from the tab content area.
By Default
it’s [Color32::BLACK
].
sourcepub fn with_hline_below_active_tab_name(
self,
hline_below_active_tab_name: bool
) -> Self
pub fn with_hline_below_active_tab_name( self, hline_below_active_tab_name: bool ) -> Self
Sets Style::hline_below_active_tab_name
.
If true
, show the hline below the active tabs name.
If false
, show the active tab as merged with the tab ui area.
Default: false
.
sourcepub fn with_tab_rounding(self, tab_rounding: Rounding) -> Self
pub fn with_tab_rounding(self, tab_rounding: Rounding) -> Self
Sets tab_rounding
for the tab rounding.
sourcepub fn with_tab_background_color(self, tab_background: Color32) -> Self
pub fn with_tab_background_color(self, tab_background: Color32) -> Self
Sets tab_background_color
for the current tab background color.
sourcepub fn with_close_tab_color(self, close_tab_color: Color32) -> Self
pub fn with_close_tab_color(self, close_tab_color: Color32) -> Self
Sets close_tab_color
for the close tab button color.
sourcepub fn with_close_tab_active_color_color(
self,
close_tab_active_color: Color32
) -> Self
pub fn with_close_tab_active_color_color( self, close_tab_active_color: Color32 ) -> Self
Sets close_tab_active_color
for the active close tab button color.
sourcepub fn with_close_tab_background_color_color(
self,
close_tab_background_color: Color32
) -> Self
pub fn with_close_tab_background_color_color( self, close_tab_background_color: Color32 ) -> Self
Sets close_tab_background_color
for the background close tab button color.
Shows / Hides the tab close buttons.
sourcepub fn with_add_tab_align(self, add_tab_align: TabAddAlign) -> Self
pub fn with_add_tab_align(self, add_tab_align: TabAddAlign) -> Self
Sets add_tab_align
for the add tab button color.
sourcepub fn with_add_tab_color(self, add_tab_color: Color32) -> Self
pub fn with_add_tab_color(self, add_tab_color: Color32) -> Self
Sets add_tab_color
for the add tab button color.
sourcepub fn with_add_tab_active_color_color(
self,
add_tab_active_color: Color32
) -> Self
pub fn with_add_tab_active_color_color( self, add_tab_active_color: Color32 ) -> Self
Sets add_tab_active_color
for the active add tab button color.
sourcepub fn with_add_tab_background_color_color(
self,
add_tab_background_color: Color32
) -> Self
pub fn with_add_tab_background_color_color( self, add_tab_background_color: Color32 ) -> Self
Sets add_tab_background_color
for the background add tab button color.
Shows / Hides the tab add buttons.
sourcepub fn show_add_popup(self, show_add_popup: bool) -> Self
pub fn show_add_popup(self, show_add_popup: bool) -> Self
Shows / Hides the add button popup.
sourcepub fn with_tab_text_color_unfocused(
self,
tab_text_color_unfocused: Color32
) -> Self
pub fn with_tab_text_color_unfocused( self, tab_text_color_unfocused: Color32 ) -> Self
Color of tab title when an inactive tab is unfocused.
sourcepub fn with_tab_text_color_focused(
self,
tab_text_color_focused: Color32
) -> Self
pub fn with_tab_text_color_focused( self, tab_text_color_focused: Color32 ) -> Self
Color of tab title when an inactive tab is focused.
sourcepub fn with_tab_text_color_active_unfocused(
self,
tab_text_color_active_unfocused: Color32
) -> Self
pub fn with_tab_text_color_active_unfocused( self, tab_text_color_active_unfocused: Color32 ) -> Self
Color of tab title when an active tab is unfocused.
sourcepub fn with_tab_text_color_active_focused(
self,
tab_text_color_active_focused: Color32
) -> Self
pub fn with_tab_text_color_active_focused( self, tab_text_color_active_focused: Color32 ) -> Self
Color of tab title when an active tab is focused.
sourcepub fn tabs_are_draggable(self, tabs_are_draggable: bool) -> Self
pub fn tabs_are_draggable(self, tabs_are_draggable: bool) -> Self
Whether tabs can be dragged between nodes and reordered on the tab bar.
sourcepub fn expand_tabs(self, expand_tabs: bool) -> Self
pub fn expand_tabs(self, expand_tabs: bool) -> Self
Whether tab titles expand to fill the width of their tab bars.
Whether tabs show a context menu.
sourcepub fn with_tab_scroll_area(self, tab_include_scrollarea: bool) -> Self
pub fn with_tab_scroll_area(self, tab_include_scrollarea: bool) -> Self
Whether tabs have a ScrollArea
out of the box.
sourcepub fn show_name_when_hovered(self, tab_hover_name: bool) -> Self
pub fn show_name_when_hovered(self, tab_hover_name: bool) -> Self
Whether tabs show their name when hovered over them.