web-view icon indicating copy to clipboard operation
web-view copied to clipboard

Frameless Mode has some minor problems.

Open FrankenApps opened this issue 4 years ago • 23 comments

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: bug_report

FrankenApps avatar Mar 15 '20 11:03 FrankenApps