diff options
author | geireann <geireann.lindfield@gmail.com> | 2024-07-10 13:44:39 -0400 |
---|---|---|
committer | geireann <geireann.lindfield@gmail.com> | 2024-07-10 13:44:39 -0400 |
commit | 59ca918ea0918b41f1e2fa4b6acb8725ca9b44af (patch) | |
tree | 4f830b4a4dd96948983115e1e5bff07a1a6eb3d1 /src | |
parent | f23ea0cbde3c4193b8039f317fe71d965c8cbf40 (diff) |
fixed caption font color
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/StyleProvider.tsx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/StyleProvider.tsx b/src/client/views/StyleProvider.tsx index b7f8a3170..8c100f238 100644 --- a/src/client/views/StyleProvider.tsx +++ b/src/client/views/StyleProvider.tsx @@ -152,7 +152,7 @@ export function DefaultStyleProvider(doc: Opt<Doc>, props: Opt<FieldViewProps & case StyleProp.DocContents: return undefined; case StyleProp.WidgetColor: return isAnnotated ? Colors.LIGHT_BLUE : 'dimgrey'; case StyleProp.Opacity: return componentView?.isUnstyledView?.() ? 1 : Cast(doc?._opacity, "number", Cast(doc?.opacity, 'number', null)); - case StyleProp.FontColor: return StrCast(doc?.[fieldKey + 'fontColor'], StrCast(Doc.UserDoc().fontColor, color())); + case StyleProp.FontColor: return StrCast(doc?.[fieldKey + 'fontColor'], isCaption ? lightOrDark(backgroundCol()) : StrCast(Doc.UserDoc().fontColor, color())); case StyleProp.FontSize: return StrCast(doc?.[fieldKey + 'fontSize'], StrCast(Doc.UserDoc().fontSize)); case StyleProp.FontFamily: return StrCast(doc?.[fieldKey + 'fontFamily'], StrCast(Doc.UserDoc().fontFamily)); case StyleProp.FontWeight: return StrCast(doc?.[fieldKey + 'fontWeight'], StrCast(Doc.UserDoc().fontWeight)); |