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

Use IdSalt everywhere

This commit is contained in:
lucasmerlin
2026-03-24 14:10:06 +01:00
parent 0686107840
commit 0953c8c285
13 changed files with 43 additions and 42 deletions

View File

@@ -5,7 +5,7 @@ use accesskit_consumer::{FilterResult, Node, NodeId, Tree, TreeChangeHandler};
use eframe::epaint::text::TextWrapMode;
use egui::{
Button, Color32, Event, Frame, FullOutput, Id, Key, KeyboardShortcut, Label, Modifiers, Panel,
Button, Color32, Event, Frame, FullOutput, Id, IdSalt, Key, KeyboardShortcut, Label, Modifiers, Panel,
RawInput, RichText, ScrollArea, Ui, collapsing_header::CollapsingState,
};
@@ -213,7 +213,7 @@ impl AccessibilityInspectorPlugin {
#[expect(unsafe_code)]
let egui_node_id = unsafe { Id::from_high_entropy_bits(node.locate().0.0) };
ui.push_id(node.id(), |ui| {
ui.push_id(IdSalt::new(node.id()), |ui| {
let child_count = node.children().len();
let has_children = child_count > 0;
let default_open = child_count == 1 && node.role() != accesskit::Role::Label;