#8343·egui

Widget x changed id between passes bug when using ui.with_layout(right_to_left, ... within ui.horizontal

Author: AngusCunninghamCreated Jul 25, 2026Updated Sep 28, 2026
Labelsbug

Describe the bug When using ui.horizontal, adding some widgets on the left and then using calling ui.with_layout(layout::right_to_left to add widgets on the right of the same horizontal block, tracing's warnings such as: "Widget x changed id between passes: prev ids: [a, b], new ids: [c, d]" are logged and buttons in the affected right_to_left layout flash with red outlines.

This error does not occur when using identical code but replacing right_to_left with left_to_right

Using egui and eframe on Windows 11

To Reproduce

  1. Make a new egui top level panel
  2. Within this panel use a ui.horizontal()
  3. Within this horizontal add some buttons, followed by a ui.with_layout(right_to_left) and add some buttons within that right to left section
  4. Run the program and click those buttons and you will see the error - This error does not occur when using identical code but replacing right_to_left with left_to_right Expected behavior If you are using tracing for logging you will see: "Widget x changed id between passes: prev ids: [a, b], new ids: [c, d]" each time one of the buttons is used and you will see the button flash with a red outline on the gui

Screenshots

Image

Desktop (please complete the following information):

  • OS: Windows 11