You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But it removes the ability to resize and "roundness" of the window.
Desired solution
I would love to to tap into WindowBuilder with a hook similar to EventLoopBuilder.
Something like that
let options = eframe::NativeOptions{// proposed API for window builderwindow_builder:Some(Box::new(|builder| {#[cfg(target_os = "macos")]{use winit::platform::macos::WindowBuilderExtMacOS;
builder
.with_titlebar_buttons_hidden(true).with_title_hidden(true).with_titlebar_transparent(true)}})),// existing hook for event loopevent_loop_builder:Some(Box::new(|builder| {#[cfg(target_os = "macos")]{use winit::platform::macos::{ActivationPolicy,EventLoopBuilderExtMacOS};
builder.with_activation_policy(ActivationPolicy::Accessory);}})),
..Default::default()};
Alternative
Mimic winit window builder API in eframe::NativeOptions. It feels less desirable to me because
There is already a precedent for EventLoop hook
It seems that eframe::NativeOptions is mostly 1:1 to winit options, thus it feels repetitive.
With little code in eframe this provides access to a lot of features, AND it is future proof, e.g. when winit adds features eframe gets these features for "free".
Happy to contribute the code
The text was updated successfully, but these errors were encountered:
This would be a breaking change because NativeOptions isn't marked exhaustive, the PR should probably mark it as such to make it non-breaking to add new options in the future.
Problem
I would love to customize appearance beyond what is available in
eframe::NativeOptions
(example below is on macOS).Specifically I would love to achieve this look (top window, code snippet is taken from
winit
):It is a combination of these
winit
settings:Note that these methods are specific to macOS (defined in
WindowBuilderExtMacOS
).The closest that
eframe
provides today isBut it removes the ability to resize and "roundness" of the window.
Desired solution
I would love to to tap into
WindowBuilder
with a hook similar toEventLoopBuilder
.Something like that
Alternative
Mimic
winit
window builder API ineframe::NativeOptions
. It feels less desirable to me becauseEventLoop
hookeframe::NativeOptions
is mostly 1:1 towinit
options, thus it feels repetitive.eframe
this provides access to a lot of features, AND it is future proof, e.g. whenwinit
adds featureseframe
gets these features for "free".Happy to contribute the code
The text was updated successfully, but these errors were encountered: