feat: enhanced notifications and toolbar hover states (#3032)
* fix: button hover state and overlay colors in tmtv * fix: styles for notificaionts
This commit is contained in:
1 parent
be6b8629be
commit
bbfdda7fe7
18 files changed
+185
-88
No files matched your search
@@ -4,7 +4,6 @@
|
||||
--scrollbar-width: 20px;
|
||||
pointer-events: none;
|
||||
font-size: 15px;
|
||||
color: #ccc;
|
||||
line-height: 18px;
|
||||
}
|
||||
.ViewportOrientationMarkers .orientation-marker {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import React, { useEffect, useState, useMemo } from 'react';
|
||||
import classNames from 'classnames';
|
||||
import {
|
||||
metaData,
|
||||
Enums,
|
||||
@@ -119,13 +120,18 @@ function ViewportOrientationMarkers({
|
||||
|
||||
const backgroundColor = ohifViewport.getViewportOptions().background;
|
||||
|
||||
// Todo: probably this can be done in a better way in which we identify bright
|
||||
// background
|
||||
const isLight = backgroundColor
|
||||
? csUtils.isEqual(backgroundColor, [1, 1, 1])
|
||||
: false;
|
||||
|
||||
return orientationMarkers.map((m, index) => (
|
||||
<div
|
||||
className={`${m}-mid orientation-marker`}
|
||||
className={classNames(
|
||||
`${m}-mid orientation-marker`,
|
||||
isLight ? 'text-[#726F7E]' : 'text-[#ccc]'
|
||||
)}
|
||||
key={`${m}-mid orientation-marker`}
|
||||
>
|
||||
<div className="orientation-marker-value">{markers[m]}</div>
|
||||
|
||||
@@ -188,10 +188,27 @@ function CornerstoneViewportOverlay({
|
||||
return null;
|
||||
}
|
||||
|
||||
const ohifViewport = CornerstoneViewportService.getViewportInfoByIndex(
|
||||
viewportIndex
|
||||
);
|
||||
|
||||
if (!ohifViewport) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const backgroundColor = ohifViewport.getViewportOptions().background;
|
||||
|
||||
// Todo: probably this can be done in a better way in which we identify bright
|
||||
// background
|
||||
const isLight = backgroundColor
|
||||
? utilities.isEqual(backgroundColor, [1, 1, 1])
|
||||
: false;
|
||||
|
||||
return (
|
||||
<ViewportOverlay
|
||||
topLeft={getTopLeftContent()}
|
||||
topRight={getTopRightContent()}
|
||||
color={isLight && 'text-[#0944B3]'}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -74,12 +74,9 @@ export default async function init({
|
||||
CornerstoneViewportService,
|
||||
HangingProtocolService,
|
||||
ToolGroupService,
|
||||
SegmentationService,
|
||||
ViewportGridService,
|
||||
} = servicesManager.services;
|
||||
|
||||
window.SegmentationService = SegmentationService;
|
||||
window.DisplaySetService = DisplaySetService;
|
||||
window.services = servicesManager.services;
|
||||
|
||||
if (cornerstone.getShouldUseCPURendering()) {
|
||||
|
||||
Reference in new issue
Block a user