We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This is if the window starts on the second monitor:
This is on main screen:
However if i dray the window from second screen to main screen, it works. This is the code i use:
use eframe::egui::*; fn main() { let native_options = eframe::NativeOptions { viewport: ViewportBuilder::default() .with_inner_size(vec2(480.0, 270.0)) .with_min_inner_size(vec2(480.0, 270.0)) .with_transparent(true), ..Default::default() }; let _ = eframe::run_native( &format!("My App{}", env!("CARGO_PKG_VERSION")), native_options, Box::new(|cc| { let mut visuals = Visuals::dark(); // make panels transparent visuals.panel_fill = Color32::from_rgba_premultiplied( visuals.panel_fill.r(), visuals.panel_fill.g(), visuals.panel_fill.b(), 100, ); cc.egui_ctx.set_visuals(visuals); cc.egui_ctx .set_pixels_per_point(cc.egui_ctx.native_pixels_per_point().unwrap_or(1.0) * 1.2); Box::new(App::default()) }), ); } #[derive(Default)] struct App {} impl eframe::App for App { fn update(&mut self, ctx: &eframe::egui::Context, _frame: &mut eframe::Frame) { CentralPanel::default().show(ctx, |ui| { ui.label("main viewport"); }); } fn clear_color(&self, _visuals: &eframe::egui::Visuals) -> [f32; 4] { // fully transparent clear [0.0, 1.0, 0.0, 0.0] } }
I really dont understand what is happening ...
I am using a AMD RX 7000 Gpu.
The text was updated successfully, but these errors were encountered:
When you have clear_color(), try using frame in the following form:
clear_color()
frame
let mut panel_frame = egui::Frame { fill: ctx.style().visuals.window_fill(), ..Default::default() };
OR
let mut panel_frame = egui::Frame { fill: egui::Color32::TRANSPARENT, ..Default::default() };
Try various tests.
Sorry, something went wrong.
with_always_on_top
No branches or pull requests
This is if the window starts on the second monitor:
This is on main screen:
However if i dray the window from second screen to main screen, it works.
This is the code i use:
I really dont understand what is happening ...
I am using a AMD RX 7000 Gpu.
The text was updated successfully, but these errors were encountered: