mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-10 03:10:41 +00:00
Fix focus state in linear layout
This commit is contained in:
parent
df11b4f1f0
commit
4fff7882aa
@ -110,8 +110,8 @@ impl View for LinearLayout {
|
||||
fn draw(&mut self, printer: &Printer) {
|
||||
// Use pre-computed sizes
|
||||
let mut offset = Vec2::zero();
|
||||
for child in self.children.iter_mut() {
|
||||
child.view.draw(&printer.sub_printer(offset, child.size, true));
|
||||
for (i,child) in self.children.iter_mut().enumerate() {
|
||||
child.view.draw(&printer.sub_printer(offset, child.size, i == self.focus));
|
||||
|
||||
*self.orientation.get_ref(&mut offset) += self.orientation.get(&child.size);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user