Skip to content

Commit

Permalink
Update main.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
rustbasic authored Jan 17, 2024
1 parent 389e371 commit 50da61d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/custom_window_frame/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ fn title_bar_ui(ui: &mut egui::Ui, title_bar_rect: eframe::epaint::Rect, title:
let is_maximized = ui.input(|i| i.viewport().maximized.unwrap_or(false));
ui.ctx()
.send_viewport_cmd(ViewportCommand::Maximized(!is_maximized));
}
}

if title_bar_response.is_pointer_button_down_on() {
ui.ctx().send_viewport_cmd(ViewportCommand::StartDrag);
}
Expand Down

0 comments on commit 50da61d

Please sign in to comment.