diff --git a/ivette/src/dome/src/renderer/frame/sidebars.tsx b/ivette/src/dome/src/renderer/frame/sidebars.tsx index 9a4adecb49eba2c19458b5b8d661708d9ba93351..52dc2b2cd91bbb4d579259ed9318f8e31840ec25 100644 --- a/ivette/src/dome/src/renderer/frame/sidebars.tsx +++ b/ivette/src/dome/src/renderer/frame/sidebars.tsx @@ -171,6 +171,10 @@ export interface ItemProps { onSelection?: () => void; /** Right-click callback. */ onContextMenu?: () => void; + /** Additional class. */ + className?: string; + /** Additional styles. */ + style?: React.CSSProperties; /** Other item elements. */ children?: React.ReactNode; } @@ -185,10 +189,12 @@ export function Item(props: ItemProps) { 'dome-xSideBarItem', selected ? 'dome-active' : 'dome-inactive', isDisabled && 'dome-disabled', + props.className, ); return ( <div className={className} + style={props.style} title={props.title} onContextMenu={onContextMenu} onClick={onClick} diff --git a/ivette/src/renderer/Globals.tsx b/ivette/src/renderer/Globals.tsx index 44f4747d9622a9f3ffcd7fbdcae676b950d629cc..e610aae6065542743a0cc89314c167fa5d089cdc 100644 --- a/ivette/src/renderer/Globals.tsx +++ b/ivette/src/renderer/Globals.tsx @@ -114,15 +114,19 @@ export default () => { // Items const current: undefined | string = selection?.current?.function; const makeFctItem = (fct: functionsData) => { - const { name } = fct; + const { name, signature } = fct; + const isMain = 0 < signature.indexOf("/* main */"); return ( <Item + className={isMain ? 'fct-main' : undefined} key={name} label={name} - title={fct.signature} + title={signature} selected={name === current} onSelection={() => updateSelection({ location: { function: name } })} - /> + > + {isMain && '(main)'} + </Item> ); }; @@ -131,7 +135,7 @@ export default () => { const filtered = fcts.filter(showFunction); const nTotal = fcts.length; const nFilter = filtered.length; - const title = `Filtered ${nFilter} / ${nTotal}`; + const title = `Functions ${nFilter} / ${nTotal}`; return ( <Section label="Functions" diff --git a/ivette/src/renderer/style.css b/ivette/src/renderer/style.css index 09df391d8df39183598a6fa9d2636fc49ce2372b..1c0d4865b1201bb4e7bb456219ce4c2a016cc072 100644 --- a/ivette/src/renderer/style.css +++ b/ivette/src/renderer/style.css @@ -36,4 +36,8 @@ border-bottom: solid 0.2em #BBB; } +.fct-main label { + text-decoration: underline; +} + /* -------------------------------------------------------------------------- */