Skip to content

Commit 3396138

Browse files
committed
Update changelog
1 parent 7495cb8 commit 3396138

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ While some features like the clipboard, menus or file dialogs are not yet availa
3131
- `MouseButtons` to `MouseEvent` to track which buttons are being held down during an event. ([#843] by [@xStrom])
3232
- `Env` and `Key` gained methods for inspecting an `Env` at runtime ([#880] by [@Zarenor])
3333
- `UpdateCtx::request_timer` and `UpdateCtx::request_anim_frame`. ([#898] by [@finnerale])
34+
- `WidgetExt::debug_widget_id`, for displaying widget ids on hover. ([#876] by [@cmyr])
3435

3536
### Changed
3637

@@ -143,6 +144,7 @@ While some features like the clipboard, menus or file dialogs are not yet availa
143144
[#857]: https://github.com/xi-editor/druid/pull/857
144145
[#861]: https://github.com/xi-editor/druid/pull/861
145146
[#869]: https://github.com/xi-editor/druid/pull/869
147+
[#876]: https://github.com/xi-editor/druid/pull/876
146148
[#878]: https://github.com/xi-editor/druid/pull/878
147149
[#880]: https://github.com/xi-editor/druid/pull/880
148150
[#889]: https://github.com/xi-editor/druid/pull/889

druid/src/core.rs

+7-6
Original file line numberDiff line numberDiff line change
@@ -360,15 +360,16 @@ impl<T: Data, W: Widget<T>> WidgetPod<T, W> {
360360
};
361361
self.inner.paint(&mut inner_ctx, data, env);
362362

363-
let debug_layout = env.get(Env::DEBUG_PAINT);
364-
let debug_ids = env.get(Env::DEBUG_WIDGET_ID) && inner_ctx.is_hot();
365-
366-
if debug_layout {
367-
self.debug_paint_layout_bounds(&mut inner_ctx, env);
368-
}
363+
let debug_ids = inner_ctx.is_hot() && env.get(Env::DEBUG_WIDGET_ID);
369364
if debug_ids {
365+
// this also draws layout bounds
370366
self.debug_paint_widget_ids(&mut inner_ctx, env);
371367
}
368+
369+
if !debug_ids && env.get(Env::DEBUG_PAINT) {
370+
self.debug_paint_layout_bounds(&mut inner_ctx, env);
371+
}
372+
372373
ctx.z_ops.append(&mut inner_ctx.z_ops);
373374
self.state.invalid = Region::EMPTY;
374375
}

0 commit comments

Comments
 (0)