Commit b32c3b2b authored by Jeremy Soller's avatar Jeremy Soller

Fixes for drawing grid entries

parent 1a3a9184
[package]
name = "orbtk"
version = "0.2.28"
version = "0.2.29"
authors = ["Jeremy Soller <jackpot51@gmail.com>"]
description = "The Orbital Widget Toolkit"
documentation = "https://docs.rs/orbtk"
......
......@@ -132,6 +132,8 @@ impl Grid {
rect.height = rows[row].height;
}
entry.rect().set(rect);
entry.arrange();
}
}
}
......@@ -175,8 +177,17 @@ impl Widget for Grid {
}
fn draw(&self, renderer: &mut Renderer, _focused: bool, theme: &Theme) {
fn draw_widget(widget: &Arc<Widget>, renderer: &mut Renderer, focused: bool, theme: &Theme) {
widget.update();
widget.draw(renderer, focused, theme);
for child in widget.children().borrow().iter() {
draw_widget(child, renderer, focused, theme);
}
}
for (&(col, row), entry) in self.entries.borrow().iter() {
entry.draw(renderer, self.focused.get() == Some((col, row)), theme);
draw_widget(entry, renderer, self.focused.get() == Some((col, row)), theme);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment