From f923f3a3954b9e25a94970bc161cca8ec9800cef Mon Sep 17 00:00:00 2001 From: bobzel Date: Fri, 11 Dec 2020 19:05:07 -0500 Subject: trying out pushing MainView button into defaultStyleProvider -- I think it should be a parameterized default style provider instead of referencing MainView. --- src/client/views/StyleProvider.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/client/views/StyleProvider.tsx') 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, props: Opt = 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"; -- cgit v1.2.3-70-g09d2