on prepainted working
This commit is contained in:
parent
cac80e2ebd
commit
0aaf14e03c
1 changed files with 10 additions and 1 deletions
|
@ -35,13 +35,16 @@ pub struct StatusBar {
|
|||
_observe_active_pane: Subscription,
|
||||
}
|
||||
|
||||
use log::{info, warn};
|
||||
|
||||
|
||||
impl Render for StatusBar {
|
||||
fn render(&mut self, window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
|
||||
h_flex()
|
||||
.w_full()
|
||||
.justify_between()
|
||||
.gap(DynamicSpacing::Base08.rems(cx))
|
||||
.py(DynamicSpacing::Base04.rems(cx))
|
||||
// .py(DynamicSpacing::Base04.rems(cx))
|
||||
.px(DynamicSpacing::Base06.rems(cx))
|
||||
.bg(cx.theme().colors().status_bar_background)
|
||||
.map(|el| match window.window_decorations() {
|
||||
|
@ -60,6 +63,12 @@ impl Render for StatusBar {
|
|||
})
|
||||
.child(self.render_left_tools())
|
||||
.child(self.render_right_tools())
|
||||
.on_children_prepainted(|bounds, _, _| {
|
||||
if bounds.iter().any(|&b| b.size.height > px(0.0)) {
|
||||
warn!("bar, this is hit.");
|
||||
}
|
||||
warn!("foo: {bounds:?}");
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue