small fixes

This commit is contained in:
Emil Ernerfeldt 2020-05-20 21:31:34 +02:00
parent e98896aa58
commit c0f9c5f7e1
2 changed files with 2 additions and 2 deletions

View file

@ -179,7 +179,6 @@ impl<'open> Window<'open> {
&mut collapsing,
);
// TODO: fix collapsing window animation
let content = collapsing
.add_contents(ui, |ui| {
resize.show(ui, |ui| {
@ -237,6 +236,8 @@ impl<'open> Window<'open> {
);
let new_rect = ctx.round_rect_to_pixels(new_rect);
if new_rect != pre_resize {
// TODO: add this to a Window state instead as a command "move here next frame"
let mut area_state = ctx.memory().areas.get(area_layer.id).unwrap();
area_state.pos = new_rect.min;
ctx.memory().areas.set_state(area_layer, area_state);

View file

@ -132,7 +132,6 @@ fn show_menu_bar(ui: &mut Ui, windows: &mut OpenWindows) {
});
menu::menu(ui, "Windows", |ui| {
ui.add(Checkbox::new(&mut windows.examples, "Examples"));
ui.add(Checkbox::new(&mut windows.examples, "Examples Trees"));
ui.add(Checkbox::new(&mut windows.fractal_clock, "Fractal Clock"));
ui.add(Separator::new());
ui.add(Checkbox::new(&mut windows.settings, "Settings"));