From f82baffbe4269deb257604a8203e10d727ff0a1b Mon Sep 17 00:00:00 2001 From: bobzel Date: Mon, 28 Aug 2023 02:55:30 -0400 Subject: trying to fix more colors --- src/Utils.ts | 4 +- src/client/views/MainView.scss | 4 +- .../views/PropertiesDocBacklinksSelector.tsx | 3 +- src/client/views/PropertiesView.tsx | 30 +++++++++--- src/client/views/UndoStack.tsx | 12 +++-- .../collectionLinear/CollectionLinearView.scss | 2 +- .../collectionLinear/CollectionLinearView.tsx | 6 ++- src/client/views/linking/LinkMenu.scss | 1 - src/client/views/linking/LinkMenu.tsx | 3 +- src/client/views/linking/LinkMenuGroup.tsx | 4 +- src/client/views/linking/LinkMenuItem.scss | 24 ++-------- src/client/views/linking/LinkMenuItem.tsx | 12 +++-- .../views/nodes/DataVizBox/components/PieChart.tsx | 16 +++---- src/client/views/nodes/FontIconBox/FontIconBox.tsx | 54 ++++++++++++++-------- src/client/views/nodes/LinkDocPreview.scss | 2 - src/client/views/topbar/TopBar.tsx | 3 +- 16 files changed, 101 insertions(+), 79 deletions(-) (limited to 'src') diff --git a/src/Utils.ts b/src/Utils.ts index 9a94694a2..29824ba94 100644 --- a/src/Utils.ts +++ b/src/Utils.ts @@ -758,8 +758,8 @@ export function DashColor(color: string) { } export function lightOrDark(color: any) { - if (color === 'transparent') return 'gray'; - if (color.startsWith?.('linear')) return 'black'; + if (color === 'transparent') return Colors.DARK_GRAY; + if (color.startsWith?.('linear')) return Colors.BLACK; const nonAlphaColor = color.startsWith('#') ? (color as string).substring(0, 7) : color.startsWith('rgba') ? color.replace(/,.[^,]*\)/, ')').replace('rgba', 'rgb') : color; const col = DashColor(nonAlphaColor).rgb(); const colsum = col.red() + col.green() + col.blue(); diff --git a/src/client/views/MainView.scss b/src/client/views/MainView.scss index 8a7f5132b..c880dde9a 100644 --- a/src/client/views/MainView.scss +++ b/src/client/views/MainView.scss @@ -78,7 +78,7 @@ h1, .mainView-container-Dark { .lm_header .lm_tab { padding: 0px; - opacity: 0.7; + //opacity: 0.7; box-shadow: none; height: 25px; border-bottom: black solid; @@ -194,7 +194,7 @@ h1, left: 0; position: absolute; z-index: 2; - // background-color: linen; //$light-gray; + // background-color: linen; //$light-gray; // .editable-title { // background-color: linen; //$light-gray; diff --git a/src/client/views/PropertiesDocBacklinksSelector.tsx b/src/client/views/PropertiesDocBacklinksSelector.tsx index da4438481..91a7b3da3 100644 --- a/src/client/views/PropertiesDocBacklinksSelector.tsx +++ b/src/client/views/PropertiesDocBacklinksSelector.tsx @@ -5,6 +5,7 @@ import { Cast } from '../../fields/Types'; import { DocumentType } from '../documents/DocumentTypes'; import { LinkManager } from '../util/LinkManager'; import { SelectionManager } from '../util/SelectionManager'; +import { SettingsManager } from '../util/SettingsManager'; import { LinkMenu } from './linking/LinkMenu'; import { OpenWhere, OpenWhereMod } from './nodes/DocumentView'; import './PropertiesDocBacklinksSelector.scss'; @@ -31,7 +32,7 @@ export class PropertiesDocBacklinksSelector extends React.Component +
{this.props.hideTitle ? null :

Contexts:

}
diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx index 83bd1b860..5f9439cbc 100644 --- a/src/client/views/PropertiesView.tsx +++ b/src/client/views/PropertiesView.tsx @@ -673,7 +673,14 @@ export class PropertiesView extends React.Component { marginLeft: title === '∠:' ? '39px' : '', }}>
{title}
- setter(e.target.value)} onKeyPress={e => e.stopPropagation()} /> + setter(e.target.value)} + onKeyPress={e => e.stopPropagation()} + />
this.upDownButtons('up', key)))}> @@ -930,7 +937,7 @@ export class PropertiesView extends React.Component { regInput = (key: string, value: any, setter: (val: string) => {}) => { return (
- setter(e.target.value)} /> + setter(e.target.value)} />
this.upDownButtons('up', key)))}> @@ -966,6 +973,7 @@ export class PropertiesView extends React.Component { { className="width-range" type="range" defaultValue={this.markScal} + style={{ color: SettingsManager.userColor, backgroundColor: SettingsManager.userBackgroundColor }} min={0} max={10} onChange={action(e => (this.markScal = +e.target.value))} @@ -1369,6 +1378,7 @@ export class PropertiesView extends React.Component { get editRelationship() { return ( { return (