From 97141270061f67e6ea867ba0b30a5e5111ae8c51 Mon Sep 17 00:00:00 2001 From: bobzel Date: Wed, 27 Apr 2022 13:04:48 -0400 Subject: fixed tree view icons to not needlessly use the layout_icon doc --- src/client/views/StyleProvider.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/client/views/StyleProvider.tsx b/src/client/views/StyleProvider.tsx index 34418e170..a88c745b8 100644 --- a/src/client/views/StyleProvider.tsx +++ b/src/client/views/StyleProvider.tsx @@ -90,9 +90,8 @@ export function DefaultStyleProvider(doc: Opt, props: Opt /* min should not be equal to max */ min + ((Math.abs(x * y) * 9301 + 49297) % 233280 / 233280) * (max - min); switch (property.split(":")[0]) { case StyleProp.TreeViewIcon: - const icon = Cast(doc?.layout_icon, Doc, null) ? Doc.expandTemplateLayout(Cast(doc?.layout_icon, Doc, null), doc) : undefined; - if (icon && ImageCast(doc?.icon, ImageCast(doc?.data))) { - const img = ImageCast(doc?.icon, ImageCast(doc?.data)); + const img = ImageCast(doc?.icon, ImageCast(doc?.data)); + if (img) { const ext = extname(img.url.href); const url = doc?.icon ? img.url.href : img.url.href.replace(ext, "_s" + ext); return ; -- cgit v1.2.3-70-g09d2