Closed dongjian closed 2 years ago
It's not clear what you want to achieve. Also what's your operating system?
It's not clear what you want to achieve. Also what's your operating system? I have a player like this . when I resize the window , the web view become bigger like this
I am using win10 . Mac did not test yet .
And you don't want it to be resized when the main window is resized?
I don't want webview become big. Is there any way to make webview hight same as vlcview when resize the window. I try flex but it not working.
You can put the webview window inside a group and make the group non-resizable, you'll have to give the window a size.
fn main() {
let a = app::App::default().with_scheme(app::Scheme::Gtk);
let mut win = window::Window::default().with_size(640, 480);
let mut col = group::Flex::new(0, 0, 400, 300, None);
col.set_color(Color::Blue);
col.set_type(group::FlexType::Column);
//main_panel(&mut col);
let mut test_win = window::Window::default();
test_win.set_color(Color::Red);
test_win.end();
let mut grp = group::Group::default();
let mut wv_win = window::Window::default().with_size(400, 200);
wv_win.end();
grp.end();
grp.make_resizable(false);
col.end();
win.resizable(&col);
win.set_color(Color::from_rgb(250, 250, 250));
win.end();
win.show();
win.size_range(600, 400, 0, 0);
let mut wv = fltk_webview::Webview::create(false, &mut wv_win);
wv.navigate("https://google.com");
a.run().unwrap();
}
Thanks! it worked! but It would be nicer if webview behaved like the other window
Hi!
when I try laouts other window works fine , but the webview gets bigger and resizeble. like below
resize webview window here is my code
any help ?