diff options
author | bobzel <zzzman@gmail.com> | 2021-02-27 12:43:07 -0500 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2021-02-27 12:43:07 -0500 |
commit | 3837b3746c771960e8a0f7b00648f739495ca92d (patch) | |
tree | f1a8c02cd1f48c992f125d6e0008e20b4d20368c /src/client/views/StyleProvider.tsx | |
parent | 17de222e15525ec5bda3c4e7113c1471dbfb906c (diff) |
more cleanup of unused fields and minor fixes to things like the color picker's display of the selcted documents background color. also a fix for textbox autoresizing when dragged small
Diffstat (limited to 'src/client/views/StyleProvider.tsx')
-rw-r--r-- | src/client/views/StyleProvider.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/StyleProvider.tsx b/src/client/views/StyleProvider.tsx index 69a1e4db2..e5b2a332a 100644 --- a/src/client/views/StyleProvider.tsx +++ b/src/client/views/StyleProvider.tsx @@ -84,15 +84,15 @@ export function DefaultStyleProvider(doc: Opt<Doc>, props: Opt<FieldViewProps | const colsum = (col.red() + col.green() + col.blue()); if (colsum / col.alpha() > 400 || col.alpha() < 0.25) return "black"; return "white"; - case StyleProp.Hidden: return BoolCast(doc?._hidden, BoolCast(doc?.hidden)); - case StyleProp.BorderRounding: return StrCast(doc?._borderRounding, StrCast(doc?.borderRounding)); + case StyleProp.Hidden: return BoolCast(doc?._hidden); + case StyleProp.BorderRounding: return StrCast(doc?._borderRounding); case StyleProp.TitleHeight: return 15; case StyleProp.HeaderMargin: return ([CollectionViewType.Stacking, CollectionViewType.Masonry].includes(doc?._viewType as any) || doc?.type === DocumentType.RTF) && doc?._showTitle && !StrCast(doc?.showTitle).includes(":hover") ? 15 : 0; case StyleProp.BackgroundColor: { if (isAnchor && docProps) return "transparent"; if (isCaption) return "rgba(0,0,0 ,0.4)"; if (Doc.UserDoc().renderStyle === "comic") return "transparent"; - let docColor: Opt<string> = StrCast(doc?._backgroundColor, StrCast(doc?.backgroundColor)); + let docColor: Opt<string> = StrCast(doc?._backgroundColor); if (!docProps) { if (MainView.Instance.LastButton === doc) return darkScheme() ? "dimgrey" : "lightgrey"; switch (doc?.type) { |