2022-01-13 00:33:02 +01:00
|
|
|
// SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
|
|
2022-11-21 10:10:50 +01:00
|
|
|
use std::collections::HashMap;
|
|
|
|
|
|
2022-01-13 00:33:02 +01:00
|
|
|
use crate::state::{Common, Fps};
|
2022-11-21 10:10:50 +01:00
|
|
|
use egui::{Color32, Vec2};
|
2022-03-22 12:36:03 +01:00
|
|
|
use smithay::{
|
2022-11-17 20:32:54 +01:00
|
|
|
backend::{
|
|
|
|
|
drm::DrmNode,
|
|
|
|
|
renderer::{
|
|
|
|
|
element::texture::TextureRenderElement,
|
|
|
|
|
gles2::{Gles2Error, Gles2Texture},
|
|
|
|
|
glow::GlowRenderer,
|
|
|
|
|
},
|
|
|
|
|
},
|
2022-07-15 14:21:39 +02:00
|
|
|
desktop::layer_map_for_output,
|
|
|
|
|
reexports::wayland_server::Resource,
|
2022-11-17 20:32:54 +01:00
|
|
|
utils::{IsAlive, Logical, Rectangle},
|
2022-03-22 12:36:03 +01:00
|
|
|
};
|
2022-01-13 00:33:02 +01:00
|
|
|
|
2022-11-18 17:20:52 +01:00
|
|
|
pub const ELEMENTS_COLOR: Color32 = Color32::from_rgb(70, 198, 115);
|
|
|
|
|
pub const RENDER_COLOR: Color32 = Color32::from_rgb(29, 114, 58);
|
|
|
|
|
pub const SCREENCOPY_COLOR: Color32 = Color32::from_rgb(253, 178, 39);
|
|
|
|
|
pub const DISPLAY_COLOR: Color32 = Color32::from_rgb(41, 184, 209);
|
|
|
|
|
|
2022-02-04 21:08:11 +01:00
|
|
|
pub fn fps_ui(
|
2022-03-22 12:36:03 +01:00
|
|
|
gpu: Option<&DrmNode>,
|
2022-02-04 21:08:11 +01:00
|
|
|
state: &Common,
|
2022-11-17 20:32:54 +01:00
|
|
|
renderer: &mut GlowRenderer,
|
2022-02-04 21:08:11 +01:00
|
|
|
fps: &mut Fps,
|
2022-11-17 20:32:54 +01:00
|
|
|
area: Rectangle<i32, Logical>,
|
2022-01-18 19:42:56 +01:00
|
|
|
scale: f64,
|
2022-11-17 20:32:54 +01:00
|
|
|
) -> Result<TextureRenderElement<Gles2Texture>, Gles2Error> {
|
2022-11-21 10:10:50 +01:00
|
|
|
use egui::widgets::plot::{Bar, BarChart, Legend, Plot};
|
2022-02-04 21:08:11 +01:00
|
|
|
|
|
|
|
|
let (max, min, avg, avg_fps) = (
|
|
|
|
|
fps.max_frametime().as_secs_f64(),
|
|
|
|
|
fps.min_frametime().as_secs_f64(),
|
|
|
|
|
fps.avg_frametime().as_secs_f64(),
|
|
|
|
|
fps.avg_fps(),
|
|
|
|
|
);
|
2022-11-18 17:20:52 +01:00
|
|
|
let (max_disp, min_disp) = (
|
|
|
|
|
fps.max_time_to_display().as_secs_f64(),
|
|
|
|
|
fps.min_time_to_display().as_secs_f64(),
|
|
|
|
|
);
|
|
|
|
|
|
2022-11-18 18:26:22 +01:00
|
|
|
let amount = avg_fps.round() as usize * 2;
|
2022-11-18 17:20:52 +01:00
|
|
|
let ((bars_elements, bars_render), (bars_screencopy, bars_displayed)): (
|
|
|
|
|
(Vec<Bar>, Vec<Bar>),
|
|
|
|
|
(Vec<Bar>, Vec<Bar>),
|
|
|
|
|
) = fps
|
2022-02-04 21:08:11 +01:00
|
|
|
.frames
|
|
|
|
|
.iter()
|
|
|
|
|
.rev()
|
2022-11-17 20:32:54 +01:00
|
|
|
.take(amount)
|
2022-02-04 21:08:11 +01:00
|
|
|
.rev()
|
|
|
|
|
.enumerate()
|
2022-11-18 17:20:52 +01:00
|
|
|
.map(|(i, frame)| {
|
|
|
|
|
let elements_val = frame.duration_elements.as_secs_f64();
|
|
|
|
|
let render_val = frame.duration_render.as_secs_f64();
|
|
|
|
|
let screencopy_val = frame
|
|
|
|
|
.duration_screencopy
|
|
|
|
|
.as_ref()
|
|
|
|
|
.map(|val| val.as_secs_f64())
|
|
|
|
|
.unwrap_or(0.0);
|
|
|
|
|
let displayed_val = frame.duration_displayed.as_secs_f64();
|
2022-11-17 20:32:54 +01:00
|
|
|
|
2022-11-18 17:20:52 +01:00
|
|
|
let transformed_elements =
|
|
|
|
|
((elements_val - min_disp) / (max_disp - min_disp) * 255.0).round() as u8;
|
|
|
|
|
let transformed_render =
|
|
|
|
|
((render_val - min_disp) / (max_disp - min_disp) * 255.0).round() as u8;
|
|
|
|
|
let transformed_screencopy =
|
|
|
|
|
((screencopy_val - min_disp) / (max_disp - min_disp) * 255.0).round() as u8;
|
|
|
|
|
let transformed_displayed =
|
|
|
|
|
((displayed_val - min_disp) / (max_disp - min_disp) * 255.0).round() as u8;
|
|
|
|
|
(
|
|
|
|
|
(
|
|
|
|
|
Bar::new(i as f64, transformed_elements as f64).fill(ELEMENTS_COLOR),
|
|
|
|
|
Bar::new(i as f64, transformed_render as f64).fill(RENDER_COLOR),
|
|
|
|
|
),
|
|
|
|
|
(
|
|
|
|
|
Bar::new(i as f64, transformed_screencopy as f64).fill(SCREENCOPY_COLOR),
|
|
|
|
|
Bar::new(i as f64, transformed_displayed as f64).fill(DISPLAY_COLOR),
|
|
|
|
|
),
|
|
|
|
|
)
|
2022-02-04 21:08:11 +01:00
|
|
|
})
|
2022-11-18 17:20:52 +01:00
|
|
|
.unzip();
|
2022-02-04 21:08:11 +01:00
|
|
|
|
2022-11-21 10:10:50 +01:00
|
|
|
let vendors = HashMap::from([
|
|
|
|
|
(
|
|
|
|
|
"0x10de",
|
|
|
|
|
fps.state
|
|
|
|
|
.with_image(renderer, "nvidia", |image, ctx| {
|
|
|
|
|
(image.texture_id(ctx), image.size_vec2())
|
|
|
|
|
})
|
|
|
|
|
.expect("Logo images not loaded?"),
|
|
|
|
|
),
|
|
|
|
|
(
|
|
|
|
|
"0x1002",
|
|
|
|
|
fps.state
|
|
|
|
|
.with_image(renderer, "amd", |image, ctx| {
|
|
|
|
|
(image.texture_id(ctx), image.size_vec2())
|
|
|
|
|
})
|
|
|
|
|
.expect("Logo images not loaded?"),
|
|
|
|
|
),
|
|
|
|
|
(
|
|
|
|
|
"0x8086",
|
|
|
|
|
fps.state
|
|
|
|
|
.with_image(renderer, "intel", |image, ctx| {
|
|
|
|
|
(image.texture_id(ctx), image.size_vec2())
|
|
|
|
|
})
|
|
|
|
|
.expect("Logo images not loaded?"),
|
|
|
|
|
),
|
|
|
|
|
]);
|
|
|
|
|
|
2022-11-17 20:32:54 +01:00
|
|
|
fps.state.render(
|
2022-01-13 00:33:02 +01:00
|
|
|
|ctx| {
|
|
|
|
|
egui::Area::new("main")
|
|
|
|
|
.anchor(egui::Align2::LEFT_TOP, (10.0, 10.0))
|
|
|
|
|
.show(ctx, |ui| {
|
2022-11-18 17:20:52 +01:00
|
|
|
ui.label(format!(
|
2022-01-13 00:33:02 +01:00
|
|
|
"cosmic-comp version {}",
|
|
|
|
|
std::env!("CARGO_PKG_VERSION")
|
|
|
|
|
));
|
2022-11-17 20:32:54 +01:00
|
|
|
if let Some(hash) = std::option_env!("GIT_HASH").and_then(|x| x.get(0..10)) {
|
2022-11-18 17:20:52 +01:00
|
|
|
ui.label(format!(" :{hash}"));
|
2022-01-13 00:33:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if !state.egui.active {
|
2022-11-17 20:32:54 +01:00
|
|
|
ui.label("Press Super+Escape for debug menu");
|
2022-01-13 00:33:02 +01:00
|
|
|
} else {
|
2022-11-18 17:20:52 +01:00
|
|
|
ui.set_max_width(300.0);
|
2022-01-13 00:33:02 +01:00
|
|
|
ui.separator();
|
|
|
|
|
|
2022-03-22 12:36:03 +01:00
|
|
|
if let Some(gpu) = gpu {
|
2022-11-21 10:10:50 +01:00
|
|
|
ui.horizontal(|ui| {
|
|
|
|
|
let resp = ui.label(
|
|
|
|
|
egui::RichText::new(format!("renderD{}", gpu.minor())).code(),
|
|
|
|
|
);
|
|
|
|
|
if let Ok(vendor) = std::fs::read_to_string(format!(
|
|
|
|
|
"/sys/class/drm/renderD{}/device/vendor",
|
|
|
|
|
gpu.minor()
|
|
|
|
|
)) {
|
|
|
|
|
if let Some((texture_id, mut size)) = vendors.get(vendor.trim())
|
|
|
|
|
{
|
|
|
|
|
let factor = resp.rect.height() / size.y;
|
|
|
|
|
size = Vec2::from([size.x * factor, resp.rect.height()]);
|
|
|
|
|
ui.image(*texture_id, size);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
2022-03-22 12:36:03 +01:00
|
|
|
}
|
2022-01-13 00:33:02 +01:00
|
|
|
ui.label(egui::RichText::new(format!("FPS: {:>7.3}", avg_fps)).heading());
|
|
|
|
|
ui.label("Frame Times:");
|
|
|
|
|
ui.label(egui::RichText::new(format!("avg: {:>7.6}", avg)).code());
|
|
|
|
|
ui.label(egui::RichText::new(format!("min: {:>7.6}", min)).code());
|
|
|
|
|
ui.label(egui::RichText::new(format!("max: {:>7.6}", max)).code());
|
2022-11-18 17:20:52 +01:00
|
|
|
let elements_chart = BarChart::new(bars_elements).vertical();
|
|
|
|
|
let render_chart = BarChart::new(bars_render)
|
|
|
|
|
.stack_on(&[&elements_chart])
|
|
|
|
|
.vertical();
|
|
|
|
|
let screencopy_chart = BarChart::new(bars_screencopy)
|
|
|
|
|
.stack_on(&[&elements_chart, &render_chart])
|
|
|
|
|
.vertical();
|
|
|
|
|
let display_chart = BarChart::new(bars_displayed)
|
|
|
|
|
.stack_on(&[&elements_chart, &render_chart, &screencopy_chart])
|
|
|
|
|
.vertical();
|
2022-01-13 00:33:02 +01:00
|
|
|
|
|
|
|
|
Plot::new("FPS")
|
|
|
|
|
.legend(Legend::default())
|
2022-11-17 20:32:54 +01:00
|
|
|
.view_aspect(50.0)
|
2022-01-13 00:33:02 +01:00
|
|
|
.include_x(0.0)
|
2022-11-17 20:32:54 +01:00
|
|
|
.include_x(amount as f64)
|
2022-01-13 00:33:02 +01:00
|
|
|
.include_y(0.0)
|
2022-11-17 20:32:54 +01:00
|
|
|
.include_y(300)
|
2022-01-13 00:33:02 +01:00
|
|
|
.show_x(false)
|
|
|
|
|
.show(ui, |plot_ui| {
|
2022-11-18 17:20:52 +01:00
|
|
|
plot_ui.bar_chart(elements_chart);
|
|
|
|
|
plot_ui.bar_chart(render_chart);
|
|
|
|
|
plot_ui.bar_chart(screencopy_chart);
|
|
|
|
|
plot_ui.bar_chart(display_chart);
|
2022-01-13 00:33:02 +01:00
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
2022-02-04 21:08:11 +01:00
|
|
|
},
|
2022-11-17 20:32:54 +01:00
|
|
|
renderer,
|
2022-02-04 21:08:11 +01:00
|
|
|
area,
|
|
|
|
|
scale,
|
2022-11-17 20:32:54 +01:00
|
|
|
0.8,
|
|
|
|
|
state.clock.now().into(),
|
2022-02-04 21:08:11 +01:00
|
|
|
)
|
|
|
|
|
}
|
2022-01-18 19:42:56 +01:00
|
|
|
|
2022-11-17 20:32:54 +01:00
|
|
|
/*
|
2022-02-04 21:08:11 +01:00
|
|
|
pub fn debug_ui(
|
|
|
|
|
state: &mut Common,
|
2022-07-04 16:00:03 +02:00
|
|
|
area: Rectangle<f64, Physical>,
|
2022-02-04 21:08:11 +01:00
|
|
|
scale: f64,
|
|
|
|
|
) -> Option<EguiFrame> {
|
|
|
|
|
if !state.egui.active {
|
|
|
|
|
return None;
|
|
|
|
|
}
|
2022-01-13 00:33:02 +01:00
|
|
|
|
2022-02-05 00:40:17 +01:00
|
|
|
Some(state.egui.debug_state.run(
|
2022-02-04 21:08:11 +01:00
|
|
|
|ctx| {
|
2022-07-04 16:00:03 +02:00
|
|
|
use crate::utils::prelude::*;
|
|
|
|
|
|
2022-02-04 21:08:11 +01:00
|
|
|
egui::Window::new("Workspaces")
|
|
|
|
|
.default_pos([0.0, 300.0])
|
|
|
|
|
.vscroll(true)
|
|
|
|
|
.collapsible(true)
|
|
|
|
|
.show(ctx, |ui| {
|
2022-07-04 16:00:03 +02:00
|
|
|
use crate::{
|
|
|
|
|
config::WorkspaceMode as ConfigMode,
|
|
|
|
|
shell::{OutputBoundState, WorkspaceMode, MAX_WORKSPACES},
|
|
|
|
|
};
|
2022-01-13 00:33:02 +01:00
|
|
|
|
2022-02-04 21:08:11 +01:00
|
|
|
ui.set_min_width(250.0);
|
2022-01-13 00:33:02 +01:00
|
|
|
|
2022-02-04 21:08:11 +01:00
|
|
|
// Mode
|
2022-01-13 00:33:02 +01:00
|
|
|
|
2022-02-04 21:08:11 +01:00
|
|
|
ui.label(egui::RichText::new("Mode").heading());
|
2022-07-04 16:00:03 +02:00
|
|
|
let mut mode = match &state.shell.workspace_mode {
|
|
|
|
|
WorkspaceMode::Global { .. } => ConfigMode::Global,
|
|
|
|
|
WorkspaceMode::OutputBound => ConfigMode::OutputBound,
|
2022-02-04 21:08:11 +01:00
|
|
|
};
|
2022-07-04 16:00:03 +02:00
|
|
|
ui.radio_value(&mut mode, ConfigMode::OutputBound, "Output bound");
|
|
|
|
|
ui.radio_value(&mut mode, ConfigMode::Global, "Global");
|
2022-03-24 20:32:31 +01:00
|
|
|
state.shell.set_mode(mode);
|
2022-02-04 21:08:11 +01:00
|
|
|
|
2022-07-04 16:00:03 +02:00
|
|
|
let mode = match &state.shell.workspace_mode {
|
2022-07-04 16:00:29 +02:00
|
|
|
WorkspaceMode::OutputBound => (ConfigMode::OutputBound, None),
|
|
|
|
|
WorkspaceMode::Global { ref active, .. } => {
|
|
|
|
|
(ConfigMode::Global, Some(*active))
|
|
|
|
|
}
|
2022-07-04 16:00:03 +02:00
|
|
|
};
|
|
|
|
|
match mode {
|
|
|
|
|
(ConfigMode::OutputBound, _) => {
|
2022-02-04 21:08:11 +01:00
|
|
|
ui.label("Workspaces:");
|
2022-03-24 20:32:31 +01:00
|
|
|
for output in state.shell.outputs().cloned().collect::<Vec<_>>() {
|
2022-01-13 00:33:02 +01:00
|
|
|
ui.horizontal(|ui| {
|
2022-02-04 21:08:11 +01:00
|
|
|
let active = output
|
|
|
|
|
.user_data()
|
2022-07-04 16:00:03 +02:00
|
|
|
.get::<OutputBoundState>()
|
2022-02-04 21:08:11 +01:00
|
|
|
.unwrap()
|
2022-07-04 16:00:03 +02:00
|
|
|
.active
|
|
|
|
|
.get();
|
2022-01-13 00:33:02 +01:00
|
|
|
let mut active_val = active as f64;
|
2022-02-04 21:08:11 +01:00
|
|
|
ui.label(output.name());
|
2022-01-18 19:42:56 +01:00
|
|
|
ui.add(
|
|
|
|
|
egui::DragValue::new(&mut active_val)
|
|
|
|
|
.clamp_range(0..=(MAX_WORKSPACES - 1))
|
|
|
|
|
.speed(1.0),
|
|
|
|
|
);
|
2022-01-13 00:33:02 +01:00
|
|
|
if active != active_val as usize {
|
2022-03-30 16:06:35 +02:00
|
|
|
state.shell.activate(
|
|
|
|
|
&state.seats[0],
|
|
|
|
|
&output,
|
|
|
|
|
active_val as usize,
|
|
|
|
|
);
|
2022-01-13 00:33:02 +01:00
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
2022-07-04 16:00:03 +02:00
|
|
|
(ConfigMode::Global, Some(active)) => {
|
2022-02-04 21:08:11 +01:00
|
|
|
ui.horizontal(|ui| {
|
|
|
|
|
let mut active_val = active as f64;
|
|
|
|
|
ui.label("Workspace:");
|
|
|
|
|
ui.add(
|
|
|
|
|
egui::DragValue::new(&mut active_val)
|
|
|
|
|
.clamp_range(0..=(MAX_WORKSPACES - 1))
|
|
|
|
|
.speed(1.0),
|
|
|
|
|
);
|
|
|
|
|
if active != active_val as usize {
|
2022-03-24 20:32:31 +01:00
|
|
|
let output = state.shell.outputs().next().cloned().unwrap();
|
2022-03-30 16:06:35 +02:00
|
|
|
state.shell.activate(
|
|
|
|
|
&state.seats[0],
|
|
|
|
|
&output,
|
|
|
|
|
active_val as usize,
|
|
|
|
|
);
|
2022-02-04 21:08:11 +01:00
|
|
|
}
|
2022-01-13 00:33:02 +01:00
|
|
|
});
|
2022-07-04 16:00:29 +02:00
|
|
|
}
|
2022-07-04 16:00:03 +02:00
|
|
|
_ => unreachable!(),
|
2022-02-04 21:08:11 +01:00
|
|
|
}
|
2022-01-18 19:42:56 +01:00
|
|
|
|
2022-02-04 21:08:11 +01:00
|
|
|
// Spaces
|
2022-03-24 20:32:31 +01:00
|
|
|
for (i, workspace) in state.shell.spaces.iter().enumerate() {
|
2022-02-04 21:08:11 +01:00
|
|
|
ui.collapsing(format!("Space: {}", i), |ui| {
|
|
|
|
|
ui.collapsing(format!("Windows"), |ui| {
|
2022-03-24 20:32:31 +01:00
|
|
|
for window in workspace.space.windows() {
|
2022-02-04 21:08:11 +01:00
|
|
|
ui.collapsing(format!("{:?}", window.toplevel()), |ui| {
|
2022-03-16 20:05:24 +01:00
|
|
|
ui.label(format!("Rect: {:?}", {
|
|
|
|
|
let mut geo = window.geometry();
|
2022-03-24 20:32:31 +01:00
|
|
|
geo.loc += workspace
|
|
|
|
|
.space
|
2022-03-16 20:05:24 +01:00
|
|
|
.window_location(window)
|
|
|
|
|
.unwrap_or((0, 0).into());
|
|
|
|
|
geo
|
|
|
|
|
}));
|
2022-02-04 21:08:11 +01:00
|
|
|
ui.label(format!(
|
|
|
|
|
"Bounding box: {:?}",
|
2022-03-24 20:32:31 +01:00
|
|
|
workspace.space.window_bbox(window)
|
2022-02-04 21:08:11 +01:00
|
|
|
));
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
egui::Window::new("Outputs")
|
|
|
|
|
.collapsible(true)
|
|
|
|
|
.hscroll(true)
|
|
|
|
|
.default_pos([300.0, 300.0])
|
|
|
|
|
.show(ctx, |ui| {
|
2022-03-24 20:32:31 +01:00
|
|
|
ui.label(format!("Global Space: {:?}", state.shell.global_space()));
|
2022-03-16 20:01:34 +01:00
|
|
|
for output in state
|
2022-03-24 20:32:31 +01:00
|
|
|
.shell
|
2022-03-16 20:01:34 +01:00
|
|
|
.outputs()
|
|
|
|
|
.cloned()
|
|
|
|
|
.collect::<Vec<_>>()
|
|
|
|
|
.into_iter()
|
|
|
|
|
{
|
2022-02-04 21:08:11 +01:00
|
|
|
ui.separator();
|
|
|
|
|
ui.collapsing(output.name(), |ui| {
|
2022-07-15 14:21:39 +02:00
|
|
|
ui.label(format!("Mode: {:#?}", output.current_mode()));
|
|
|
|
|
ui.label(format!("Scale: {:#?}", output.current_scale()));
|
|
|
|
|
ui.label(format!("Transform: {:#?}", output.current_transform()));
|
2022-07-04 16:00:29 +02:00
|
|
|
ui.label(format!("Geometry: {:?}", output.geometry()));
|
2022-03-16 20:01:34 +01:00
|
|
|
ui.label(format!(
|
|
|
|
|
"Local Geometry: {:?}",
|
2022-03-24 20:32:31 +01:00
|
|
|
state
|
|
|
|
|
.shell
|
|
|
|
|
.active_space(&output)
|
|
|
|
|
.space
|
|
|
|
|
.output_geometry(&output)
|
2022-03-16 20:01:34 +01:00
|
|
|
));
|
|
|
|
|
ui.label(format!(
|
|
|
|
|
"Relative Geometry: {:?}",
|
2022-07-04 16:00:29 +02:00
|
|
|
state
|
|
|
|
|
.shell
|
|
|
|
|
.space_relative_output_geometry((0i32, 0i32), &output)
|
2022-03-16 20:01:34 +01:00
|
|
|
));
|
2022-07-15 14:21:39 +02:00
|
|
|
ui.separator();
|
|
|
|
|
ui.collapsing("Layers:", |ui| {
|
|
|
|
|
let map = layer_map_for_output(&output);
|
|
|
|
|
for layer in map.layers() {
|
2022-08-30 13:28:36 +02:00
|
|
|
ui.collapsing(
|
|
|
|
|
format!(
|
|
|
|
|
"{}/{:?}",
|
|
|
|
|
layer.wl_surface().id(),
|
|
|
|
|
layer.wl_surface().client_id()
|
|
|
|
|
),
|
|
|
|
|
|ui| {
|
|
|
|
|
ui.label(format!(
|
|
|
|
|
"Alive: {:?} {:?} {:?}",
|
|
|
|
|
layer.alive(),
|
|
|
|
|
layer.layer_surface().alive(),
|
|
|
|
|
layer.wl_surface().alive()
|
|
|
|
|
));
|
|
|
|
|
ui.label(format!("Layer: {:?}", layer.layer()));
|
|
|
|
|
ui.label(format!("Namespace: {:?}", layer.namespace()));
|
|
|
|
|
ui.label(format!("Geometry: {:?}", layer.bbox()));
|
|
|
|
|
ui.label(format!(
|
|
|
|
|
"Anchor: {:?}",
|
|
|
|
|
layer.cached_state().anchor
|
|
|
|
|
));
|
|
|
|
|
ui.label(format!(
|
|
|
|
|
"Margin: {:?}",
|
|
|
|
|
layer.cached_state().margin
|
|
|
|
|
));
|
|
|
|
|
ui.label(format!(
|
|
|
|
|
"Exclusive: {:?}",
|
|
|
|
|
layer.cached_state().exclusive_zone
|
|
|
|
|
));
|
|
|
|
|
},
|
|
|
|
|
);
|
2022-07-15 14:21:39 +02:00
|
|
|
}
|
|
|
|
|
ui.label(format!("{:?}", map));
|
|
|
|
|
});
|
2022-02-04 21:08:11 +01:00
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
2022-01-13 00:33:02 +01:00
|
|
|
},
|
|
|
|
|
area,
|
|
|
|
|
scale,
|
2022-02-04 21:08:11 +01:00
|
|
|
state.egui.alpha,
|
2022-01-13 00:33:02 +01:00
|
|
|
&state.start_time,
|
|
|
|
|
state.egui.modifiers.clone(),
|
2022-02-04 21:08:11 +01:00
|
|
|
))
|
2022-01-13 00:33:02 +01:00
|
|
|
}
|
2022-11-17 20:32:54 +01:00
|
|
|
*/
|