1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-01 14:20:04 -04:00

Rename id_source to id_salt (#5025)

* Closes <https://github.com/emilk/egui/issues/5020 >
* [x] I have followed the instructions in the PR template
This commit is contained in:
Nicolas
2024-09-02 09:29:01 +02:00
committed by GitHub
parent edea5a40b9
commit be944f0915
19 changed files with 169 additions and 121 deletions

View File

@@ -116,7 +116,7 @@ impl<'l> StripLayout<'l> {
flags: StripLayoutFlags,
width: CellSize,
height: CellSize,
child_ui_id_source: Id,
child_ui_id_salt: Id,
add_cell_contents: impl FnOnce(&mut Ui),
) -> (Rect, Response) {
let max_rect = self.cell_rect(&width, &height);
@@ -149,7 +149,7 @@ impl<'l> StripLayout<'l> {
);
}
let child_ui = self.cell(flags, max_rect, child_ui_id_source, add_cell_contents);
let child_ui = self.cell(flags, max_rect, child_ui_id_salt, add_cell_contents);
let used_rect = child_ui.min_rect();
@@ -197,11 +197,11 @@ impl<'l> StripLayout<'l> {
&mut self,
flags: StripLayoutFlags,
max_rect: Rect,
child_ui_id_source: egui::Id,
child_ui_id_salt: egui::Id,
add_cell_contents: impl FnOnce(&mut Ui),
) -> Ui {
let mut ui_builder = UiBuilder::new()
.id_source(child_ui_id_source)
.id_salt(child_ui_id_salt)
.ui_stack_info(egui::UiStackInfo::new(egui::UiKind::TableCell))
.max_rect(max_rect)
.layout(self.cell_layout);