-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow creation of large window that can exceed the monitor size #3389
Comments
Hello @emilk , is there any progress on this issue? I would like to know what the motivation is for using largest_monitor_point_size, and whether it is possible to provide a bool value for users to choose whether to apply this option. |
The motivation can be found here: egui/crates/egui-winit/src/window_settings.rs Lines 97 to 99 in 2342788
And yes, we can make that a PRs welcome! |
Thanks for the answer🙇 If the situation on linux is the only thing to consider, then I would try adding this field and then pr. It may take me four or five days (I have three days off next and I have to go to the company to have multiple monitors for testing) |
#4337) Added clamp_size_to_monitor_size field on ViewportBuilder, which means whether clamp the window's size to monitor's size. (default to `true`) * Closes #3389 ### simple example ```rust pub struct MyApp {} impl MyApp { pub fn new() -> MyApp { MyApp {} } } impl eframe::App for MyApp { fn update(&mut self, ctx: &Context, frame: &mut eframe::Frame) { egui::CentralPanel::default() .frame(Frame::none().fill(Color32::DARK_GRAY)) .show(ctx, |ui| { if ctx.input(|i| i.key_pressed(Key::Escape)) { ctx.send_viewport_cmd(ViewportCommand::Close); } }); } } pub fn main() { let option = eframe::NativeOptions { viewport: ViewportBuilder::default() .with_position([10.0, 10.0]) .with_inner_size([3000.0, 2000.0]) .with_clamp_size_to_monitor_size(false), ..Default::default() }; eframe::run_native( "a large window app", option, Box::new(|ctx| Box::new(MyApp::new())), ).unwrap(); } ``` It works on my windows (with 3 monitors), but I don't have a test environment for macos --------- Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
emilk#4337) Added clamp_size_to_monitor_size field on ViewportBuilder, which means whether clamp the window's size to monitor's size. (default to `true`) * Closes emilk#3389 ### simple example ```rust pub struct MyApp {} impl MyApp { pub fn new() -> MyApp { MyApp {} } } impl eframe::App for MyApp { fn update(&mut self, ctx: &Context, frame: &mut eframe::Frame) { egui::CentralPanel::default() .frame(Frame::none().fill(Color32::DARK_GRAY)) .show(ctx, |ui| { if ctx.input(|i| i.key_pressed(Key::Escape)) { ctx.send_viewport_cmd(ViewportCommand::Close); } }); } } pub fn main() { let option = eframe::NativeOptions { viewport: ViewportBuilder::default() .with_position([10.0, 10.0]) .with_inner_size([3000.0, 2000.0]) .with_clamp_size_to_monitor_size(false), ..Default::default() }; eframe::run_native( "a large window app", option, Box::new(|ctx| Box::new(MyApp::new())), ).unwrap(); } ``` It works on my windows (with 3 monitors), but I don't have a test environment for macos --------- Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
Is your feature request related to a problem? Please describe.
When I set
initial_window_size
ineframe::NativeOptions
with large value (bigger than the logical size of the monitor), the size is chop by largest_monitor_point_size, this blocks some cases like displaying a workspace screenshot on multiple monitors, like #3185, or display high resolution pic/videos in actical size. I'm curious about the reason behind it.Describe the solution you'd like
maybe add a option like
unbounded_size: bool
the disable the max window restriction?Describe alternatives you've considered
N/A
Additional context
An simple example(all values are logical)
with this setup, a window across all screen should have the size of
3000x1920
. Settinginitial_window_size
to3000x1920
,initial_window_pos
to0, 0
, a window at0, 0
with size1920x1080
wat created in my case.The text was updated successfully, but these errors were encountered: