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

Merge branch 'main' into update-wgpu-28

This commit is contained in:
SuchAFuriousDeath
2026-02-15 16:43:11 +01:00
committed by GitHub
8 changed files with 30 additions and 30 deletions

View File

@@ -1066,7 +1066,7 @@ impl CentralPanel {
id,
UiBuilder::new()
.layer_id(LayerId::background())
.max_rect(ctx.available_rect().round_ui()),
.max_rect(ctx.available_rect()),
);
panel_ui.set_clip_rect(ctx.content_rect());

View File

@@ -798,7 +798,7 @@ impl Context {
Id::new((ctx.viewport_id(), "__top_ui")),
UiBuilder::new()
.layer_id(LayerId::background())
.max_rect(ctx.available_rect().round_ui()),
.max_rect(ctx.available_rect()),
);
{

View File

@@ -543,22 +543,19 @@ impl Focus {
..
} = event
&& let Some(cardinality) = match key {
crate::Key::ArrowUp => Some(FocusDirection::Up),
crate::Key::ArrowRight => Some(FocusDirection::Right),
crate::Key::ArrowDown => Some(FocusDirection::Down),
crate::Key::ArrowLeft => Some(FocusDirection::Left),
crate::Key::ArrowUp if !modifiers.any() => Some(FocusDirection::Up),
crate::Key::ArrowRight if !modifiers.any() => Some(FocusDirection::Right),
crate::Key::ArrowDown if !modifiers.any() => Some(FocusDirection::Down),
crate::Key::ArrowLeft if !modifiers.any() => Some(FocusDirection::Left),
crate::Key::Tab => {
if modifiers.shift {
Some(FocusDirection::Previous)
} else {
Some(FocusDirection::Next)
}
}
crate::Key::Escape => {
crate::Key::Tab if !modifiers.any() => Some(FocusDirection::Next),
crate::Key::Tab if modifiers.shift_only() => Some(FocusDirection::Previous),
crate::Key::Escape if !modifiers.any() => {
self.focused_widget = None;
Some(FocusDirection::None)
}
_ => None,
}
{

View File

@@ -1,4 +1,5 @@
use crate::{Layout, Painter, Pos2, Rect, Region, Vec2, grid, vec2};
use emath::GuiRounding as _;
#[cfg(debug_assertions)]
use crate::{Align2, Color32, Stroke};
@@ -92,6 +93,7 @@ impl Placer {
} else {
self.layout.available_rect_before_wrap(&self.region)
}
.round_ui()
}
/// Amount of space available for a widget.

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:604f716e687fc26abba92769fe2dae75d850b18598d2e8a9524451ab0f760251
size 65403
oid sha256:56b44d26946770c0878e11e3197633697ad339a7e8fcffe7279a6b4c45cd3582
size 65384

View File

@@ -859,6 +859,7 @@ impl From<SnapshotResults> for Vec<SnapshotError> {
}
impl Drop for SnapshotResults {
#[track_caller]
fn drop(&mut self) {
// Don't panic if we are already panicking (the test probably failed for another reason)
if std::thread::panicking() {