1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 13:50:04 -04:00

Improve multi-viewports across monitors with different scales (#3663)

It required some ugly code in `egui-winit` in order to fix this without
breaking sem-ver (I want this to land in a 0.24.1 patch release). I'll
clean up in time for 0.25.

There is still a font rendering bug when using immediate viewports
across multiple viewports, but that's harder to fix.
This commit is contained in:
Emil Ernerfeldt
2023-11-30 12:08:53 +01:00
committed by GitHub
parent 37244e3632
commit 61a7b90d5b
8 changed files with 213 additions and 116 deletions

View File

@@ -55,6 +55,13 @@ impl<T: Float> Hash for OrderedFloat<T> {
}
}
impl<T> From<T> for OrderedFloat<T> {
#[inline]
fn from(val: T) -> Self {
OrderedFloat(val)
}
}
// ----------------------------------------------------------------------------
/// Extension trait to provide `ord()` method.