Add copy-button to the recording link table item#11242
Conversation
|
Web viewer built successfully.
Note: This comment is updated whenever you push a commit. |
| UiBuilder::new().max_rect(ui.max_rect()).layout( | ||
| Layout::left_to_right(Align::Center) | ||
| .with_main_justify(true) | ||
| Layout::right_to_left(Align::Center) | ||
| .with_cross_justify(true) | ||
| .with_main_align(Align::Min), | ||
| ), |
There was a problem hiding this comment.
I believe you could use egui::Sides for this. See e.g. how the table headers (which have a right aligned menu button) is implemented, in header_cell_ui (datafusion_table_widget.rs)
There was a problem hiding this comment.
ahh thanks! I felt like there had to be some better way to do it, still a bit finicky to get the whole cell clickable, but managed to do it :)
Good catch, wish there was some less ugly way to do this, but it seems Actually maybe I can use the Sides::height function here |
|
In the design I also noticed that this is something we want for a lot of stuff, so might be nice to be able to extract adding a copy button that's only visible on hover into some util function, but can probably be left for the future. |
Yes, that's definitely something we want in the tables in general. In particular for data that is formatted for display (e.g. thousand separators, etc.). In this case, the copy button should copy the unformatted data represnetation. |

Related
Part of #10815
What
Adds a copy button that's shown on hover in table url entries
