mirror of
https://github.com/emilk/egui.git
synced 2026-08-29 04:40:03 -04:00
simpler hashing
This commit is contained in:
@@ -36,7 +36,7 @@ impl<Theme: StyleProvider<S>, S: WidgetStyle> StyleProvider<S> for ThemeCache<Th
|
|||||||
/// save the output for later.
|
/// save the output for later.
|
||||||
fn style(&mut self, modifiers: &StyleArgs<'_>) -> S {
|
fn style(&mut self, modifiers: &StyleArgs<'_>) -> S {
|
||||||
let StyleArgs { classes, state, .. } = modifiers;
|
let StyleArgs { classes, state, .. } = modifiers;
|
||||||
let style_id = Id::new(classes).with(state);
|
let style_id = Id::new((classes, state));
|
||||||
if let Some(style) = self.cache.get_temp::<S>(style_id) {
|
if let Some(style) = self.cache.get_temp::<S>(style_id) {
|
||||||
style
|
style
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user