You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Drawing a widget within dnd_drop_zone draws a frame of the color defined in ui.visuals.widgets.inactive.bg_fill over the widget. This means a widget drawn in a drop zone looks different from a widget that is not in a drop zone.
I do think its desirable for the drop zone to be highlighted when active, but I don't think it should be highlighted when nothing is being dragged.
^ This line ultimately leads to the inactive style being applied if nothing is being dragged.
Expected behavior
I expect a widget drawn inside of a drop zone look the same as a widget drawn not inside of a drop zone, until something is being dragged.
Additional context
I was able to work around this by setting the inactive.bg_fill to transparent, as in ui.visuals_mut().widgets.inactive.bg_fill = egui::Color32::TRANSPARENT;, but this is not a good solution because the docs say bg_fill should not be set to TRANSPARENT and also because other parts of the UI may have a valid use for inactive.bg_fill which I'd be breaking.
The text was updated successfully, but these errors were encountered:
Describe the bug
Drawing a widget within
dnd_drop_zone
draws a frame of the color defined inui.visuals.widgets.inactive.bg_fill
over the widget. This means a widget drawn in a drop zone looks different from a widget that is not in a drop zone.I do think its desirable for the drop zone to be highlighted when active, but I don't think it should be highlighted when nothing is being dragged.
https://docs.rs/egui/0.30.0/src/egui/ui.rs.html#2832
^ This line ultimately leads to the
inactive
style being applied if nothing is being dragged.Expected behavior
I expect a widget drawn inside of a drop zone look the same as a widget drawn not inside of a drop zone, until something is being dragged.
Additional context
I was able to work around this by setting the
inactive.bg_fill
to transparent, as inui.visuals_mut().widgets.inactive.bg_fill = egui::Color32::TRANSPARENT;
, but this is not a good solution because the docs saybg_fill
should not be set toTRANSPARENT
and also because other parts of the UI may have a valid use forinactive.bg_fill
which I'd be breaking.The text was updated successfully, but these errors were encountered: