aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/StyleProvider.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-12-11 19:05:07 -0500
committerbobzel <zzzman@gmail.com>2020-12-11 19:05:07 -0500
commitf923f3a3954b9e25a94970bc161cca8ec9800cef (patch)
tree040ab95f0f393c3a98562a3c017f30b4a9fb563c /src/client/views/StyleProvider.tsx
parent58cd2a80fbd62fe31143922171a2448ac59f8bd8 (diff)
trying out pushing MainView button into defaultStyleProvider -- I think it should be a parameterized default style provider instead of referencing MainView.
Diffstat (limited to 'src/client/views/StyleProvider.tsx')
-rw-r--r--src/client/views/StyleProvider.tsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/StyleProvider.tsx b/src/client/views/StyleProvider.tsx
index adf47ec57..f51e94cfd 100644
--- a/src/client/views/StyleProvider.tsx
+++ b/src/client/views/StyleProvider.tsx
@@ -15,7 +15,7 @@ import "./StyleProvider.scss";
import React = require("react");
import Color = require('color');
import { listSpec } from '../../fields/Schema';
-import { Utils } from '../../Utils';
+import { MainView } from './MainView';
export enum StyleLayers {
Background = "background"
@@ -79,6 +79,7 @@ export function DefaultStyleProvider(doc: Opt<Doc>, props: Opt<DocumentViewProps
case StyleProp.ItemBackgroundColor:
let docColor: Opt<string> = StrCast(doc?._backgroundColor, StrCast(doc?.backgroundColor));
if (docColor) return docColor;
+ if (MainView.Instance.LastButton === doc) return darkScheme() ? "dimgrey" : "lightgrey";
switch (doc?.type) {
case DocumentType.FONTICON: return "black";
case DocumentType.LINK: return "lightblue";