web-view
web-view copied to clipboard
Frameless Mode has some minor problems.
Thanks for adding frameless mode. It is what I need in order to use my own custom title bar. Unfortunately for that use case the window should also be resizeable. I tested some configurations on Windows 10 and only found the EDGE (non-resizable) version to provide the expected result. I used the following code for testing:
use web_view::*;
fn main() {
web_view::builder()
.content(Content::Html(HTML))
.size(150, 150)
.frameless(true)
.debug(true)
.resizable(false)
.user_data("")
.invoke_handler(|webview, arg| {
match arg {
"exit" => webview.exit(),
_ => (),
}
Ok(())
})
.run()
.unwrap();
}
const HTML: &str = r#"
<!doctype html>
<html>
<body style="background-color:#00dd00">
<button onclick="external.invoke('exit')" style="position:absolute;top:0px;left:0px;height:30px;width:100%">exit</button>
</body>
</html>
"#;
These are the results: