mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 22:30:03 -04:00
egui_glium: add support for transparent windows
Also support non-decorated windows (without border)
This commit is contained in:
@@ -9,18 +9,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
|
||||
|
||||
## 0.10.0 - 2021-02-28
|
||||
|
||||
* [Add shaders for GLSL 1.2, GLSL ES 1.0 and 3.0](https://github.com/emilk/egui/pull/187)
|
||||
- now `egui` works well on old hardware which supports OpenGL 2.1 only like Raspberry Pi 1 and Zero.
|
||||
|
||||
|
||||
## 0.9.0 - 2021-02-07
|
||||
|
||||
* Nothing new
|
||||
|
||||
|
||||
## 0.8.0 - 2021-01-17
|
||||
|
||||
### Fixed 🐛
|
||||
|
||||
* Fix a bug where key releases weren't sent to egui
|
||||
@@ -28,39 +25,31 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
|
||||
|
||||
## 0.7.0 - 2021-01-04
|
||||
|
||||
### Changed
|
||||
|
||||
* `http` `persistence` and `time` are now optional (and opt-in) features.
|
||||
|
||||
|
||||
## 0.6.0 - 2020-12-26
|
||||
|
||||
### Added
|
||||
|
||||
* `egui_glium` will auto-save your app state every 30 seconds.
|
||||
* `egui_glium` can now set windows as fixed size (e.g. the user can't resize the window). See `egui::App::is_resizable()`.
|
||||
|
||||
### Changed
|
||||
|
||||
* `egui_glium` will now save you app state to [a better directory](https://docs.rs/directories-next/2.0.0/directories_next/struct.ProjectDirs.html#method.data_dir).
|
||||
* `egui_glium::run`: the parameter `app` now has signature `Box<dyn App>` (you need to add `Box::new(app)` to your code).
|
||||
* Window title is now passed via the `trait` function `egui::App::name()`.
|
||||
|
||||
### Fixed 🐛
|
||||
|
||||
* Serialize window size in logical points instead of physical pixels.
|
||||
* Window position is now restored on restart.
|
||||
|
||||
|
||||
## 0.5.0 - 2020-12-13
|
||||
|
||||
### Changed
|
||||
|
||||
* FileStorage::from_path now takes `Into<Path>` instead of `String`
|
||||
|
||||
|
||||
## 0.4.0 - 2020-11-28
|
||||
|
||||
Started changelog. Features:
|
||||
|
||||
* Input
|
||||
|
||||
@@ -56,19 +56,19 @@ impl epi::RepaintSignal for GliumRepaintSignal {
|
||||
}
|
||||
|
||||
fn create_display(
|
||||
title: &str,
|
||||
initial_size_points: Option<Vec2>,
|
||||
app: &dyn epi::App,
|
||||
window_settings: Option<WindowSettings>,
|
||||
is_resizable: bool,
|
||||
window_icon: Option<glutin::window::Icon>,
|
||||
event_loop: &glutin::event_loop::EventLoop<RequestRepaintEvent>,
|
||||
) -> glium::Display {
|
||||
let mut window_builder = glutin::window::WindowBuilder::new()
|
||||
.with_decorations(true)
|
||||
.with_resizable(is_resizable)
|
||||
.with_title(title)
|
||||
.with_decorations(app.decorated())
|
||||
.with_resizable(app.is_resizable())
|
||||
.with_title(app.name())
|
||||
.with_window_icon(window_icon)
|
||||
.with_transparent(false);
|
||||
.with_transparent(app.transparent());
|
||||
|
||||
let initial_size_points = app.initial_window_size();
|
||||
|
||||
if let Some(window_settings) = &window_settings {
|
||||
window_builder = window_settings.initialize_size(window_builder);
|
||||
@@ -149,14 +149,7 @@ pub fn run(mut app: Box<dyn epi::App>) -> ! {
|
||||
let window_settings = deserialize_window_settings(&storage);
|
||||
let event_loop = glutin::event_loop::EventLoop::with_user_event();
|
||||
let icon = load_icon(app.icon_data());
|
||||
let display = create_display(
|
||||
app.name(),
|
||||
app.initial_window_size(),
|
||||
window_settings,
|
||||
app.is_resizable(),
|
||||
icon,
|
||||
&event_loop,
|
||||
);
|
||||
let display = create_display(&*app, window_settings, icon, &event_loop);
|
||||
|
||||
let repaint_signal = std::sync::Arc::new(GliumRepaintSignal(std::sync::Mutex::new(
|
||||
event_loop.create_proxy(),
|
||||
|
||||
Reference in New Issue
Block a user