emilk / egui

egui: an easy-to-use immediate mode GUI in Rust that runs on both web and native
https://www.egui.rs/
Apache License 2.0
22.41k stars 1.61k forks source link

Add support for asymmetric sizing to `Sides` #5116

Open abey79 opened 1 month ago

abey79 commented 1 month ago

Currently, Sides treats the left and right content symmetrically. This is not ideal in some cases, for examples support for on-hover right-aligned icons with text on the left side. In such case, we would like the text to be truncated with then icon is displayed (as opposed to have the Side extend to accommodate the icon).

abey79 commented 1 month ago

This could be used to implement cell_with_hover_button_ui() (re_space_view_dataframe/src/dataframe_ui.rs).