1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 05:40:03 -04:00

egui_web: by default, use full web browser size (#1378)

* egui_web: by default, use full web browser size

Closes https://github.com/emilk/egui/issues/1377

* Remove max_size_points from demo app
This commit is contained in:
Emil Ernerfeldt
2022-03-19 13:47:30 +01:00
committed by GitHub
parent 6ce8594351
commit 465c96122c
7 changed files with 8 additions and 37 deletions

View File

@@ -176,13 +176,12 @@ pub trait App {
/// The size limit of the web app canvas.
///
/// By default the size if limited to 1024x2048.
/// By default the max size is [`egui::Vec2::INFINITY`], i.e. unlimited.
///
/// A larger canvas can lead to bad frame rates on some browsers on some platforms.
/// In particular, Firefox on Mac and Linux is really bad at handling large WebGL canvases:
/// <https://bugzilla.mozilla.org/show_bug.cgi?id=1010527#c0> (unfixed since 2014).
/// A large canvas can lead to bad frame rates on some older browsers on some platforms
/// (see <https://bugzilla.mozilla.org/show_bug.cgi?id=1010527#c0>).
fn max_size_points(&self) -> egui::Vec2 {
egui::Vec2::new(1024.0, 2048.0)
egui::Vec2::INFINITY
}
/// Background color for the app, e.g. what is sent to `gl.clearColor`.