mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-31 07:37:24 +00:00
janitor: silence compiler warning
If `fill_text` fails we have different problems :-)
This commit is contained in:
parent
75bb4ac3df
commit
c51cc35544
1 changed files with 3 additions and 5 deletions
|
@ -211,11 +211,9 @@ impl OpenGLContext {
|
|||
context_2d.set_font("20px serif");
|
||||
// We don't know if we're rendering on dark or white background, so choose a "color" in the middle for the text.
|
||||
context_2d.set_fill_style(&wasm_bindgen::JsValue::from_str("red"));
|
||||
context_2d.fill_text(
|
||||
"Slint requires WebGL to be enabled in your browser",
|
||||
0.,
|
||||
30.,
|
||||
);
|
||||
context_2d
|
||||
.fill_text("Slint requires WebGL to be enabled in your browser", 0., 30.)
|
||||
.unwrap();
|
||||
panic!("Cannot proceed without WebGL - aborting")
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue