diff --git a/src/paratext-bible-text-collection/src/web-views/components/verse-display.component.tsx b/src/paratext-bible-text-collection/src/web-views/components/verse-display.component.tsx index fb14909..fe17491 100644 --- a/src/paratext-bible-text-collection/src/web-views/components/verse-display.component.tsx +++ b/src/paratext-bible-text-collection/src/web-views/components/verse-display.component.tsx @@ -1,17 +1,24 @@ +import { UseWebViewStateHook } from '@papi/core'; import { useProjectData } from '@papi/frontend/react'; import { VerseRef } from '@sillsdev/scripture'; -import { UseWebViewStateHook } from '@papi/core'; -import { Tooltip, IconButton, Menu, MenuItem, Divider } from '@mui/material'; import { HighlightOff, RestartAlt, + VerticalAlignBottom, + VerticalAlignTop, ZoomIn, ZoomOut, - VerticalAlignTop, - VerticalAlignBottom, } from '@mui/icons-material'; -import { useState, MouseEvent } from 'react'; +import { + Button, + DropdownMenu, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuSeparator, + DropdownMenuTrigger, +} from 'platform-bible-react'; +import { MouseEvent } from 'react'; import { ProjectInfo } from '../../util'; const defaultFontSize: number = 16; @@ -48,17 +55,7 @@ function VerseDisplay({ 'Loading', ); const [fontSize, setFontSize] = useWebViewState(`fontSize_${projectId}`, defaultFontSize); - const [anchorEl, setAnchorEl] = useState(undefined); - const handleOpenMenu = (event: MouseEvent) => { - event.stopPropagation(); - setAnchorEl(event.currentTarget); - }; - const isOpen = !!anchorEl; - const handleCloseMenu = (event: MouseEvent) => { - event.stopPropagation(); - setAnchorEl(undefined); - }; const handleCloseProject = (event: MouseEvent) => { event.stopPropagation(); onCloseProject(projectId); @@ -86,65 +83,60 @@ function VerseDisplay({ >
{projectInfo?.name || '...'}
-
- - - ... - - - - + + + + + + Close Text - - - + + + + { handleZoom(event, fontSize + 1); }} > Zoom in - - + { handleZoom(event, fontSize - 1); }} > Zoom out - - + { handleZoom(event, defaultFontSize); }} disabled={fontSize === defaultFontSize} > Zoom Reset - - - + + + + { handleProjectUpDown(event, true); }} disabled={isFirstProject} > Move Up - - + { handleProjectUpDown(event, false); }} disabled={isLastProject} > Move Down - - -
+ + +

{usfm} diff --git a/src/paratext-bible-text-collection/src/web-views/editor-styles/_editor-overrides.scss b/src/paratext-bible-text-collection/src/web-views/editor-styles/_editor-overrides.scss index 6c0e39e..f130430 100644 --- a/src/paratext-bible-text-collection/src/web-views/editor-styles/_editor-overrides.scss +++ b/src/paratext-bible-text-collection/src/web-views/editor-styles/_editor-overrides.scss @@ -17,9 +17,32 @@ padding: 0; } +// CAUTION: Keep in sync withhttps://github.com/paranext/paranext-core/blob/main/extensions/src/platform-scripture-editor/src/_editor-overrides.scss body { - background-color: white; - color: black; + background-color: hsl(var(--background)); + color: hsl(var(--foreground)); +} + +// text selection +:focus ::selection { + color: hsl(var(--primary-foreground)); + background-color: hsl(var(--primary)); +} + +::selection { + color: hsl(var(--secondary-foreground)); + background-color: hsl(var(--secondary)); +} + +// inside the editor + +.editor-inner { + background: hsl(var(--background)); + color: hsl(var(--foreground)); +} + +.formatted-font .verse { + background-color: hsl(var(--secondary)); } // #endregion diff --git a/src/paratext-bible-text-collection/src/web-views/paratext-text-collection.web-view.scss b/src/paratext-bible-text-collection/src/web-views/paratext-text-collection.web-view.scss index 073b950..6077dae 100644 --- a/src/paratext-bible-text-collection/src/web-views/paratext-text-collection.web-view.scss +++ b/src/paratext-bible-text-collection/src/web-views/paratext-text-collection.web-view.scss @@ -49,7 +49,7 @@ body { line-height: 1.75; letter-spacing: 0.02857em; text-transform: uppercase; - color: #336e0b; + color: hsl(var(--primary)); } .verse-view { @@ -63,7 +63,8 @@ body { cursor: pointer; &.selected { - background-color: #eee; + background-color: hsl(var(--muted)); + color: hsl(var(--muted-foreground)); } .title { diff --git a/src/paratext-bible-text-collection/src/web-views/paratext-text-collection.web-view.tsx b/src/paratext-bible-text-collection/src/web-views/paratext-text-collection.web-view.tsx index 84e452f..01f138a 100644 --- a/src/paratext-bible-text-collection/src/web-views/paratext-text-collection.web-view.tsx +++ b/src/paratext-bible-text-collection/src/web-views/paratext-text-collection.web-view.tsx @@ -1,7 +1,7 @@ import papi from '@papi/frontend'; import { useDialogCallback } from '@papi/frontend/react'; import { Fragment, useCallback, useEffect, useMemo } from 'react'; -import { IconButton, ScriptureReference, usePromise } from 'platform-bible-react'; +import { Button, ScriptureReference, usePromise } from 'platform-bible-react'; import { deepEqual } from 'platform-bible-utils'; import { VerseRef } from '@sillsdev/scripture'; import { WebViewProps } from '@papi/core'; @@ -146,14 +146,15 @@ globalThis.webViewComponent = function TextCollectionWebView({ ); })} - selectProjects()} > + - + ); diff --git a/src/paratext-bible-word-list/src/word-list.web-view.tsx b/src/paratext-bible-word-list/src/word-list.web-view.tsx index 67fb926..ecc29ea 100644 --- a/src/paratext-bible-word-list/src/word-list.web-view.tsx +++ b/src/paratext-bible-word-list/src/word-list.web-view.tsx @@ -133,6 +133,7 @@ globalThis.webViewComponent = function WordListWebView({ value={wordFilter} onChange={(event) => onChangeWordFilter(event)} isFullWidth + className="pr-text-foreground" />