1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-02 14:50:03 -04:00
This commit is contained in:
Konkitoman
2023-09-01 12:09:01 +03:00
parent 661120dc1d
commit 4eb32c6ccf
10 changed files with 22 additions and 37 deletions

View File

@@ -171,11 +171,6 @@ impl BackendPanel {
frame.set_fullscreen(fullscreen);
}
}
{
let mut force_embedding = ui.ctx().force_embedding();
ui.checkbox(&mut force_embedding, "Force Embedding");
ui.ctx().set_force_embedding(force_embedding);
}
if ui
.button("📱 Phone Size")
@@ -398,39 +393,34 @@ impl EguiWindows {
output_event_history,
} = self;
{
ctx.output(|o| {
for event in &o.events {
output_event_history.push_back(event.clone());
}
});
while output_event_history.len() > 1000 {
output_event_history.pop_front();
ctx.output(|o| {
for event in &o.events {
output_event_history.push_back(event.clone());
}
});
while output_event_history.len() > 1000 {
output_event_history.pop_front();
}
let tmp_ctx = ctx.clone();
egui::Window::new("🔧 Settings")
.open(settings)
.vscroll(true)
.show(ctx, |ui| {
tmp_ctx.settings_ui(ui);
ctx.settings_ui(ui);
});
let tmp_ctx = ctx.clone();
egui::Window::new("🔍 Inspection")
.open(inspection)
.vscroll(true)
.show(ctx, |ui| {
tmp_ctx.inspection_ui(ui);
ctx.inspection_ui(ui);
});
let tmp_ctx = ctx.clone();
egui::Window::new("📝 Memory")
.open(memory)
.resizable(false)
.show(ctx, |ui| {
tmp_ctx.memory_ui(ui);
ctx.memory_ui(ui);
});
egui::Window::new("📤 Output Events")

View File

@@ -447,14 +447,12 @@ impl WrapApp {
});
// Show dropped files (if any):
let is_empty = self.dropped_files.is_empty();
if !is_empty {
if !self.dropped_files.is_empty() {
let mut open = true;
let dropped_files = self.dropped_files.clone();
egui::Window::new("Dropped files")
.open(&mut open)
.show(ctx, |ui| {
for file in &dropped_files {
for file in &self.dropped_files {
let mut info = if let Some(path) = &file.path {
path.display().to_string()
} else if !file.name.is_empty() {