`egui_extras`: always depend on `log` crate (#3336)
* egui_extras: always depend on `log` crate * syntax_highlighting fix: "serde" is always on * Add "serde" flag to egui when using egui_extras
This commit is contained in:
parent
5e785ae00a
commit
e367c20779
|
|
@ -47,7 +47,6 @@ log = { version = "0.4", features = ["std"] }
|
||||||
|
|
||||||
bytemuck = { version = "1.7.1", optional = true }
|
bytemuck = { version = "1.7.1", optional = true }
|
||||||
egui_extras = { version = "0.22.0", path = "../egui_extras", features = [
|
egui_extras = { version = "0.22.0", path = "../egui_extras", features = [
|
||||||
"log",
|
|
||||||
"image",
|
"image",
|
||||||
] }
|
] }
|
||||||
rfd = { version = "0.11", optional = true }
|
rfd = { version = "0.11", optional = true }
|
||||||
|
|
|
||||||
|
|
@ -33,9 +33,7 @@ syntect = ["egui_extras/syntect"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
egui = { version = "0.22.0", path = "../egui", default-features = false }
|
egui = { version = "0.22.0", path = "../egui", default-features = false }
|
||||||
egui_extras = { version = "0.22.0", path = "../egui_extras", features = [
|
egui_extras = { version = "0.22.0", path = "../egui_extras" }
|
||||||
"log",
|
|
||||||
] }
|
|
||||||
egui_plot = { version = "0.22.0", path = "../egui_plot" }
|
egui_plot = { version = "0.22.0", path = "../egui_plot" }
|
||||||
log = { version = "0.4", features = ["std"] }
|
log = { version = "0.4", features = ["std"] }
|
||||||
unicode_names2 = { version = "0.6.0", default-features = false }
|
unicode_names2 = { version = "0.6.0", default-features = false }
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ all-features = true
|
||||||
default = ["dep:mime_guess"]
|
default = ["dep:mime_guess"]
|
||||||
|
|
||||||
## Shorthand for enabling the different types of image loaders (`file`, `http`, `image`, `svg`).
|
## Shorthand for enabling the different types of image loaders (`file`, `http`, `image`, `svg`).
|
||||||
all-loaders = ["svg", "image", "http", "file"]
|
all-loaders = ["file", "http", "image", "svg"]
|
||||||
|
|
||||||
## Enable [`DatePickerButton`] widget.
|
## Enable [`DatePickerButton`] widget.
|
||||||
datepicker = ["chrono"]
|
datepicker = ["chrono"]
|
||||||
|
|
@ -35,9 +35,6 @@ datepicker = ["chrono"]
|
||||||
## Add support for loading images from `file://` URIs.
|
## Add support for loading images from `file://` URIs.
|
||||||
file = ["dep:mime_guess"]
|
file = ["dep:mime_guess"]
|
||||||
|
|
||||||
## Log warnings using [`log`](https://docs.rs/log) crate.
|
|
||||||
log = ["dep:log", "egui/log"]
|
|
||||||
|
|
||||||
## Add support for loading images via HTTP.
|
## Add support for loading images via HTTP.
|
||||||
http = ["dep:ehttp"]
|
http = ["dep:ehttp"]
|
||||||
|
|
||||||
|
|
@ -54,8 +51,11 @@ syntect = ["dep:syntect"]
|
||||||
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
egui = { version = "0.22.0", path = "../egui", default-features = false }
|
egui = { version = "0.22.0", path = "../egui", default-features = false, features = [
|
||||||
|
"serde",
|
||||||
|
] }
|
||||||
enum-map = { version = "2", features = ["serde"] }
|
enum-map = { version = "2", features = ["serde"] }
|
||||||
|
log = { version = "0.4", features = ["std"] }
|
||||||
serde = { version = "1", features = ["derive"] }
|
serde = { version = "1", features = ["derive"] }
|
||||||
|
|
||||||
#! ### Optional dependencies
|
#! ### Optional dependencies
|
||||||
|
|
@ -79,9 +79,6 @@ document-features = { version = "0.2", optional = true }
|
||||||
## ```
|
## ```
|
||||||
image = { version = "0.24", optional = true, default-features = false }
|
image = { version = "0.24", optional = true, default-features = false }
|
||||||
|
|
||||||
# feature "log"
|
|
||||||
log = { version = "0.4", optional = true, features = ["std"] }
|
|
||||||
|
|
||||||
# file feature
|
# file feature
|
||||||
mime_guess = { version = "2.0.4", optional = true, default-features = false }
|
mime_guess = { version = "2.0.4", optional = true, default-features = false }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -66,21 +66,6 @@ pub(crate) use profiling_scopes::*;
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
/// Log an error with either `log` or `eprintln`
|
|
||||||
macro_rules! log_err {
|
|
||||||
($fmt: literal) => {$crate::log_err!($fmt,)};
|
|
||||||
($fmt: literal, $($arg: tt)*) => {{
|
|
||||||
#[cfg(feature = "log")]
|
|
||||||
log::error!($fmt, $($arg)*);
|
|
||||||
|
|
||||||
#[cfg(not(feature = "log"))]
|
|
||||||
eprintln!(
|
|
||||||
concat!("egui_extras: ", $fmt), $($arg)*
|
|
||||||
);
|
|
||||||
}};
|
|
||||||
}
|
|
||||||
pub(crate) use log_err;
|
|
||||||
|
|
||||||
/// Panic in debug builds, log otherwise.
|
/// Panic in debug builds, log otherwise.
|
||||||
macro_rules! log_or_panic {
|
macro_rules! log_or_panic {
|
||||||
($fmt: literal) => {$crate::log_or_panic!($fmt,)};
|
($fmt: literal) => {$crate::log_or_panic!($fmt,)};
|
||||||
|
|
@ -88,36 +73,8 @@ macro_rules! log_or_panic {
|
||||||
if cfg!(debug_assertions) {
|
if cfg!(debug_assertions) {
|
||||||
panic!($fmt, $($arg)*);
|
panic!($fmt, $($arg)*);
|
||||||
} else {
|
} else {
|
||||||
$crate::log_err!($fmt, $($arg)*);
|
log::error!($fmt, $($arg)*);
|
||||||
}
|
}
|
||||||
}};
|
}};
|
||||||
}
|
}
|
||||||
pub(crate) use log_or_panic;
|
pub(crate) use log_or_panic;
|
||||||
|
|
||||||
#[allow(unused_macros)]
|
|
||||||
macro_rules! log_warn {
|
|
||||||
($fmt: literal) => {$crate::log_warn!($fmt,)};
|
|
||||||
($fmt: literal, $($arg: tt)*) => {{
|
|
||||||
#[cfg(feature = "log")]
|
|
||||||
log::warn!($fmt, $($arg)*);
|
|
||||||
|
|
||||||
#[cfg(not(feature = "log"))]
|
|
||||||
println!(
|
|
||||||
concat!("egui_extras: warning: ", $fmt), $($arg)*
|
|
||||||
)
|
|
||||||
}};
|
|
||||||
}
|
|
||||||
|
|
||||||
#[allow(unused_imports)]
|
|
||||||
pub(crate) use log_warn;
|
|
||||||
|
|
||||||
#[allow(unused_macros)]
|
|
||||||
macro_rules! log_trace {
|
|
||||||
($fmt: literal) => {$crate::log_trace!($fmt,)};
|
|
||||||
($fmt: literal, $($arg: tt)*) => {{
|
|
||||||
#[cfg(feature = "log")]
|
|
||||||
log::trace!($fmt, $($arg)*);
|
|
||||||
}};
|
|
||||||
}
|
|
||||||
#[allow(unused_imports)]
|
|
||||||
pub(crate) use log_trace;
|
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ pub fn install(ctx: &egui::Context) {
|
||||||
#[cfg(all(not(target_arch = "wasm32"), feature = "file"))]
|
#[cfg(all(not(target_arch = "wasm32"), feature = "file"))]
|
||||||
if !ctx.is_loader_installed(self::file_loader::FileLoader::ID) {
|
if !ctx.is_loader_installed(self::file_loader::FileLoader::ID) {
|
||||||
ctx.add_bytes_loader(std::sync::Arc::new(self::file_loader::FileLoader::default()));
|
ctx.add_bytes_loader(std::sync::Arc::new(self::file_loader::FileLoader::default()));
|
||||||
crate::log_trace!("installed FileLoader");
|
log::trace!("installed FileLoader");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "http")]
|
#[cfg(feature = "http")]
|
||||||
|
|
@ -63,7 +63,7 @@ pub fn install(ctx: &egui::Context) {
|
||||||
ctx.add_bytes_loader(std::sync::Arc::new(
|
ctx.add_bytes_loader(std::sync::Arc::new(
|
||||||
self::ehttp_loader::EhttpLoader::default(),
|
self::ehttp_loader::EhttpLoader::default(),
|
||||||
));
|
));
|
||||||
crate::log_trace!("installed EhttpLoader");
|
log::trace!("installed EhttpLoader");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "image")]
|
#[cfg(feature = "image")]
|
||||||
|
|
@ -71,13 +71,13 @@ pub fn install(ctx: &egui::Context) {
|
||||||
ctx.add_image_loader(std::sync::Arc::new(
|
ctx.add_image_loader(std::sync::Arc::new(
|
||||||
self::image_loader::ImageCrateLoader::default(),
|
self::image_loader::ImageCrateLoader::default(),
|
||||||
));
|
));
|
||||||
crate::log_trace!("installed ImageCrateLoader");
|
log::trace!("installed ImageCrateLoader");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "svg")]
|
#[cfg(feature = "svg")]
|
||||||
if !ctx.is_loader_installed(self::svg_loader::SvgLoader::ID) {
|
if !ctx.is_loader_installed(self::svg_loader::SvgLoader::ID) {
|
||||||
ctx.add_image_loader(std::sync::Arc::new(self::svg_loader::SvgLoader::default()));
|
ctx.add_image_loader(std::sync::Arc::new(self::svg_loader::SvgLoader::default()));
|
||||||
crate::log_trace!("installed SvgLoader");
|
log::trace!("installed SvgLoader");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(all(
|
#[cfg(all(
|
||||||
|
|
@ -86,7 +86,7 @@ pub fn install(ctx: &egui::Context) {
|
||||||
not(feature = "image"),
|
not(feature = "image"),
|
||||||
not(feature = "svg")
|
not(feature = "svg")
|
||||||
))]
|
))]
|
||||||
crate::log_warn!("`loaders::install` was called, but no loaders are enabled");
|
log::warn!("`loaders::install` was called, but no loaders are enabled");
|
||||||
|
|
||||||
let _ = ctx;
|
let _ = ctx;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ impl BytesLoader for EhttpLoader {
|
||||||
Poll::Pending => Ok(BytesPoll::Pending { size: None }),
|
Poll::Pending => Ok(BytesPoll::Pending { size: None }),
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
crate::log_trace!("started loading {uri:?}");
|
log::trace!("started loading {uri:?}");
|
||||||
|
|
||||||
let uri = uri.to_owned();
|
let uri = uri.to_owned();
|
||||||
cache.insert(uri.clone(), Poll::Pending);
|
cache.insert(uri.clone(), Poll::Pending);
|
||||||
|
|
@ -90,11 +90,11 @@ impl BytesLoader for EhttpLoader {
|
||||||
Ok(response) => File::from_response(&uri, response),
|
Ok(response) => File::from_response(&uri, response),
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
// Log details; return summary
|
// Log details; return summary
|
||||||
crate::log_err!("Failed to load {uri:?}: {err}");
|
log::error!("Failed to load {uri:?}: {err}");
|
||||||
Err(format!("Failed to load {uri:?}"))
|
Err(format!("Failed to load {uri:?}"))
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
crate::log_trace!("finished loading {uri:?}");
|
log::trace!("finished loading {uri:?}");
|
||||||
let prev = cache.lock().insert(uri, Poll::Ready(result));
|
let prev = cache.lock().insert(uri, Poll::Ready(result));
|
||||||
assert!(matches!(prev, Some(Poll::Pending)));
|
assert!(matches!(prev, Some(Poll::Pending)));
|
||||||
ctx.request_repaint();
|
ctx.request_repaint();
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ impl BytesLoader for FileLoader {
|
||||||
Poll::Pending => Ok(BytesPoll::Pending { size: None }),
|
Poll::Pending => Ok(BytesPoll::Pending { size: None }),
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
crate::log_trace!("started loading {uri:?}");
|
log::trace!("started loading {uri:?}");
|
||||||
// We need to load the file at `path`.
|
// We need to load the file at `path`.
|
||||||
|
|
||||||
// Set the file to `pending` until we finish loading it.
|
// Set the file to `pending` until we finish loading it.
|
||||||
|
|
@ -85,7 +85,7 @@ impl BytesLoader for FileLoader {
|
||||||
let prev = cache.lock().insert(path, Poll::Ready(result));
|
let prev = cache.lock().insert(path, Poll::Ready(result));
|
||||||
assert!(matches!(prev, Some(Poll::Pending)));
|
assert!(matches!(prev, Some(Poll::Pending)));
|
||||||
ctx.request_repaint();
|
ctx.request_repaint();
|
||||||
crate::log_trace!("finished loading {_uri:?}");
|
log::trace!("finished loading {_uri:?}");
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.expect("failed to spawn thread");
|
.expect("failed to spawn thread");
|
||||||
|
|
|
||||||
|
|
@ -62,9 +62,9 @@ impl ImageLoader for ImageCrateLoader {
|
||||||
return Err(LoadError::NotSupported);
|
return Err(LoadError::NotSupported);
|
||||||
}
|
}
|
||||||
|
|
||||||
crate::log_trace!("started loading {uri:?}");
|
log::trace!("started loading {uri:?}");
|
||||||
let result = crate::image::load_image_bytes(&bytes).map(Arc::new);
|
let result = crate::image::load_image_bytes(&bytes).map(Arc::new);
|
||||||
crate::log_trace!("finished loading {uri:?}");
|
log::trace!("finished loading {uri:?}");
|
||||||
cache.insert(uri.into(), result.clone());
|
cache.insert(uri.into(), result.clone());
|
||||||
match result {
|
match result {
|
||||||
Ok(image) => Ok(ImagePoll::Ready { image }),
|
Ok(image) => Ok(ImagePoll::Ready { image }),
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ impl ImageLoader for SvgLoader {
|
||||||
} else {
|
} else {
|
||||||
match ctx.try_load_bytes(&uri) {
|
match ctx.try_load_bytes(&uri) {
|
||||||
Ok(BytesPoll::Ready { bytes, .. }) => {
|
Ok(BytesPoll::Ready { bytes, .. }) => {
|
||||||
crate::log_trace!("started loading {uri:?}");
|
log::trace!("started loading {uri:?}");
|
||||||
let fit_to = match size_hint {
|
let fit_to = match size_hint {
|
||||||
SizeHint::Scale(factor) => usvg::FitTo::Zoom(factor.into_inner()),
|
SizeHint::Scale(factor) => usvg::FitTo::Zoom(factor.into_inner()),
|
||||||
SizeHint::Width(w) => usvg::FitTo::Width(w),
|
SizeHint::Width(w) => usvg::FitTo::Width(w),
|
||||||
|
|
@ -56,7 +56,7 @@ impl ImageLoader for SvgLoader {
|
||||||
};
|
};
|
||||||
let result =
|
let result =
|
||||||
crate::image::load_svg_bytes_with_size(&bytes, fit_to).map(Arc::new);
|
crate::image::load_svg_bytes_with_size(&bytes, fit_to).map(Arc::new);
|
||||||
crate::log_trace!("finished loading {uri:?}");
|
log::trace!("finished loading {uri:?}");
|
||||||
cache.insert((uri, size_hint), result.clone());
|
cache.insert((uri, size_hint), result.clone());
|
||||||
match result {
|
match result {
|
||||||
Ok(image) => Ok(ImagePoll::Ready { image }),
|
Ok(image) => Ok(ImagePoll::Ready { image }),
|
||||||
|
|
|
||||||
|
|
@ -50,9 +50,7 @@ pub fn highlight(ctx: &egui::Context, theme: &CodeTheme, code: &str, language: &
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[cfg(not(feature = "syntect"))]
|
#[cfg(not(feature = "syntect"))]
|
||||||
#[derive(Clone, Copy, PartialEq)]
|
#[derive(Clone, Copy, PartialEq, serde::Deserialize, serde::Serialize, enum_map::Enum)]
|
||||||
#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
|
|
||||||
#[derive(enum_map::Enum)]
|
|
||||||
enum TokenType {
|
enum TokenType {
|
||||||
Comment,
|
Comment,
|
||||||
Keyword,
|
Keyword,
|
||||||
|
|
@ -63,8 +61,7 @@ enum TokenType {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "syntect")]
|
#[cfg(feature = "syntect")]
|
||||||
#[derive(Clone, Copy, Hash, PartialEq)]
|
#[derive(Clone, Copy, Hash, PartialEq, serde::Deserialize, serde::Serialize)]
|
||||||
#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
|
|
||||||
enum SyntectTheme {
|
enum SyntectTheme {
|
||||||
Base16EightiesDark,
|
Base16EightiesDark,
|
||||||
Base16MochaDark,
|
Base16MochaDark,
|
||||||
|
|
@ -128,9 +125,8 @@ impl SyntectTheme {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A selected color theme.
|
/// A selected color theme.
|
||||||
#[derive(Clone, Hash, PartialEq)]
|
#[derive(Clone, Hash, PartialEq, serde::Deserialize, serde::Serialize)]
|
||||||
#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
|
#[serde(default)]
|
||||||
#[cfg_attr(feature = "serde", serde(default))]
|
|
||||||
pub struct CodeTheme {
|
pub struct CodeTheme {
|
||||||
dark_mode: bool,
|
dark_mode: bool,
|
||||||
|
|
||||||
|
|
@ -160,7 +156,6 @@ impl CodeTheme {
|
||||||
/// Load code theme from egui memory.
|
/// Load code theme from egui memory.
|
||||||
///
|
///
|
||||||
/// There is one dark and one light theme stored at any one time.
|
/// There is one dark and one light theme stored at any one time.
|
||||||
#[cfg(feature = "serde")]
|
|
||||||
pub fn from_memory(ctx: &egui::Context) -> Self {
|
pub fn from_memory(ctx: &egui::Context) -> Self {
|
||||||
if ctx.style().visuals.dark_mode {
|
if ctx.style().visuals.dark_mode {
|
||||||
ctx.data_mut(|d| {
|
ctx.data_mut(|d| {
|
||||||
|
|
@ -178,7 +173,6 @@ impl CodeTheme {
|
||||||
/// Store theme to egui memory.
|
/// Store theme to egui memory.
|
||||||
///
|
///
|
||||||
/// There is one dark and one light theme stored at any one time.
|
/// There is one dark and one light theme stored at any one time.
|
||||||
#[cfg(feature = "serde")]
|
|
||||||
pub fn store_in_memory(self, ctx: &egui::Context) {
|
pub fn store_in_memory(self, ctx: &egui::Context) {
|
||||||
if self.dark_mode {
|
if self.dark_mode {
|
||||||
ctx.data_mut(|d| d.insert_persisted(egui::Id::new("dark"), self));
|
ctx.data_mut(|d| d.insert_persisted(egui::Id::new("dark"), self));
|
||||||
|
|
@ -186,36 +180,6 @@ impl CodeTheme {
|
||||||
ctx.data_mut(|d| d.insert_persisted(egui::Id::new("light"), self));
|
ctx.data_mut(|d| d.insert_persisted(egui::Id::new("light"), self));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Load code theme from egui memory.
|
|
||||||
///
|
|
||||||
/// There is one dark and one light theme stored at any one time.
|
|
||||||
#[cfg(not(feature = "serde"))]
|
|
||||||
pub fn from_memory(ctx: &egui::Context) -> Self {
|
|
||||||
if ctx.style().visuals.dark_mode {
|
|
||||||
ctx.data_mut(|d| {
|
|
||||||
d.get_temp(egui::Id::new("dark"))
|
|
||||||
.unwrap_or_else(CodeTheme::dark)
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
ctx.data_mut(|d| {
|
|
||||||
d.get_temp(egui::Id::new("light"))
|
|
||||||
.unwrap_or_else(CodeTheme::light)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Store theme to egui memory.
|
|
||||||
///
|
|
||||||
/// There is one dark and one light theme stored at any one time.
|
|
||||||
#[cfg(not(feature = "serde"))]
|
|
||||||
pub fn store_in_memory(self, ctx: &egui::Context) {
|
|
||||||
if self.dark_mode {
|
|
||||||
ctx.data_mut(|d| d.insert_temp(egui::Id::new("dark"), self));
|
|
||||||
} else {
|
|
||||||
ctx.data_mut(|d| d.insert_temp(egui::Id::new("light"), self));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "syntect")]
|
#[cfg(feature = "syntect")]
|
||||||
|
|
@ -285,12 +249,8 @@ impl CodeTheme {
|
||||||
pub fn ui(&mut self, ui: &mut egui::Ui) {
|
pub fn ui(&mut self, ui: &mut egui::Ui) {
|
||||||
ui.horizontal_top(|ui| {
|
ui.horizontal_top(|ui| {
|
||||||
let selected_id = egui::Id::null();
|
let selected_id = egui::Id::null();
|
||||||
#[cfg(feature = "serde")]
|
|
||||||
let mut selected_tt: TokenType =
|
let mut selected_tt: TokenType =
|
||||||
ui.data_mut(|d| *d.get_persisted_mut_or(selected_id, TokenType::Comment));
|
ui.data_mut(|d| *d.get_persisted_mut_or(selected_id, TokenType::Comment));
|
||||||
#[cfg(not(feature = "serde"))]
|
|
||||||
let mut selected_tt: TokenType =
|
|
||||||
ui.data_mut(|d| *d.get_temp_mut_or(selected_id, TokenType::Comment));
|
|
||||||
|
|
||||||
ui.vertical(|ui| {
|
ui.vertical(|ui| {
|
||||||
ui.set_width(150.0);
|
ui.set_width(150.0);
|
||||||
|
|
@ -332,10 +292,7 @@ impl CodeTheme {
|
||||||
|
|
||||||
ui.add_space(16.0);
|
ui.add_space(16.0);
|
||||||
|
|
||||||
#[cfg(feature = "serde")]
|
|
||||||
ui.data_mut(|d| d.insert_persisted(selected_id, selected_tt));
|
ui.data_mut(|d| d.insert_persisted(selected_id, selected_tt));
|
||||||
#[cfg(not(feature = "serde"))]
|
|
||||||
ui.data_mut(|d| d.insert_temp(selected_id, selected_tt));
|
|
||||||
|
|
||||||
egui::Frame::group(ui.style())
|
egui::Frame::group(ui.style())
|
||||||
.inner_margin(egui::Vec2::splat(2.0))
|
.inner_margin(egui::Vec2::splat(2.0))
|
||||||
|
|
|
||||||
|
|
@ -12,10 +12,7 @@ publish = false
|
||||||
eframe = { path = "../../crates/eframe", features = [
|
eframe = { path = "../../crates/eframe", features = [
|
||||||
"__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO
|
"__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO
|
||||||
] }
|
] }
|
||||||
egui_extras = { path = "../../crates/egui_extras", features = [
|
egui_extras = { path = "../../crates/egui_extras", features = ["all-loaders"] }
|
||||||
"all-loaders",
|
|
||||||
"log",
|
|
||||||
] }
|
|
||||||
env_logger = "0.10"
|
env_logger = "0.10"
|
||||||
image = { version = "0.24", default-features = false, features = [
|
image = { version = "0.24", default-features = false, features = [
|
||||||
"jpeg",
|
"jpeg",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue