mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 06:10:06 -04:00
egui_extras: Improve the auto-sizing of Table (#4756)
This makes the sizing pass of an `egui_table` ensure the table uses as little width as possible. Subsequently, it will redistribute all non-resizable columns on the available space, so that a table better follow the parent container as it is resized. I also added `table.reset()` for forgetting the current column widths.
This commit is contained in:
@@ -68,6 +68,14 @@ impl Label {
|
||||
self
|
||||
}
|
||||
|
||||
/// Set [`Self::wrap_mode`] to [`TextWrapMode::Extend`],
|
||||
/// disabling wrapping and truncating, and instead expanding the parent [`Ui`].
|
||||
#[inline]
|
||||
pub fn extend(mut self) -> Self {
|
||||
self.wrap_mode = Some(TextWrapMode::Extend);
|
||||
self
|
||||
}
|
||||
|
||||
/// Can the user select the text with the mouse?
|
||||
///
|
||||
/// Overrides [`crate::style::Interaction::selectable_labels`].
|
||||
|
||||
Reference in New Issue
Block a user