sciter-sdk / rust-sciter

Rust bindings for Sciter

Home Page:https://sciter.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WindowBuilder::fixed() doesn't work with window-frame transparent

Zettexe opened this issue · comments

Description

The data window can still be resized no matter if fixed is set or not

Environment

OS: Windows 10
sciter-rs: 0.5.54
sciter-sdk: 4.4.5.11

Rust

#![windows_subsystem = "windows"]

extern crate sciter;

fn main() {
  sciter::set_options(sciter::RuntimeOptions::ScriptFeatures(
  sciter::SCRIPT_RUNTIME_FEATURES::ALLOW_SYSINFO as u8
  | sciter::SCRIPT_RUNTIME_FEATURES::ALLOW_FILE_IO as u8,
  ))
  .unwrap();
  
  sciter::set_options(sciter::RuntimeOptions::DebugMode(true)).unwrap();
  
  let mut data = sciter::WindowBuilder::main()
  .fixed()
  .with_pos((0, 0))
  .closeable()
  .create();
  let data_html = include_bytes!("data.htm");
  data.load_html(data_html, Some("example://data.htm"));
  data.expand(false);

  let mut main = sciter::Window::new();

  if cfg!(target_os = "macos") {
  main.set_options(sciter::window::Options::DebugMode(true))
	  .unwrap();
  }

  let main_html = include_bytes!("settings.htm");
  main.load_html(main_html, Some("example://settings.htm"));
  main.run_app();
}

HTML

<html  window-frame="transparent" role=window-caption>

<head>
    <title>Test</title>
    <style>
        html {
            background: transparent;
        }

        body {
            margin: 0px;
            background: rgba(255, 0, 0, 0.5);
        }
    </style>
</head>

<body>

</body>

</html>

Well, I believe this is a Sciter-specific issue. Could you file this on http://sciter.com/forums?

Well, there was an answer.