mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
fix dynamic resize redraw bug
for some reason I was setting the state of a canvas to not drawable when the clip rectangle was being reset, causing dynamic dialog boxes to become static if the content inside changes size. I think this is an artifact of a previous generation of this code, so commenting that out, but left a breadcrumb is case I'm wrong.
This commit is contained in:
parent
4f915cd4df
commit
741a6ab45e
1 changed files with 7 additions and 1 deletions
|
|
@ -78,7 +78,13 @@ impl Canvas {
|
|||
}
|
||||
pub fn pan_offset(&self) -> Point { self.pan_offset }
|
||||
pub fn clip_rect(&self) -> Rectangle { self.clip_rect }
|
||||
pub fn set_clip(&mut self, cr: Rectangle) { self.clip_rect = cr; *self.state.borrow_mut() = CanvasState::OffScreenDrawable }
|
||||
pub fn set_clip(&mut self, cr: Rectangle) {
|
||||
self.clip_rect = cr;
|
||||
// I think this line is in error -- I don't remember *why* we would set this, but with this line here,
|
||||
// any box that dynamically updates size would become instantly not drawable, with no way to restore that state.
|
||||
// log::info!("set_clip would side effect {:?} to OffScreenDrawable", self.state.borrow());
|
||||
// *self.state.borrow_mut() = CanvasState::OffScreenDrawable
|
||||
}
|
||||
pub fn gid(&self) -> Gid { self.gid }
|
||||
pub fn trust_level(&self) -> u8 { self.trust_level }
|
||||
pub fn set_trust_level(&mut self, level: u8) {self.trust_level = level;}
|
||||
|
|
|
|||
Loading…
Reference in a new issue