diff options
author | eleanor-park <113556828+eleanor-park@users.noreply.github.com> | 2024-07-11 11:48:44 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-11 11:48:44 -0400 |
commit | 2bf43f9906f84a600e6d5ea9dfc6c1af0ee3fd42 (patch) | |
tree | 19895e85364e58246ec2869459e9d29f6621526e /src/client/views/StyleProvider.tsx | |
parent | f33e6c9e191092e6050f980892b4404ff0d0a1f2 (diff) | |
parent | 4438e7fe202ff4091b26f073122e7866ec9abb46 (diff) |
Merge pull request #316 from brown-dash/master
updating gpt draw branch
Diffstat (limited to 'src/client/views/StyleProvider.tsx')
-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)); |