Skip to content
Snippets Groups Projects
Commit a8bf96fd authored by Maxime Jacquemin's avatar Maxime Jacquemin
Browse files

[ivette] Ellipsis overflow for long expressions

parent c18e9b55
No related branches found
No related tags found
No related merge requests found
...@@ -2,6 +2,10 @@ ...@@ -2,6 +2,10 @@
/* --- Call Stack Info --- */ /* --- Call Stack Info --- */
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
:root {
--eva-min-width: 90px;
}
.eva-info { .eva-info {
width: 100%; width: 100%;
display: flex; display: flex;
...@@ -25,6 +29,35 @@ ...@@ -25,6 +29,35 @@
padding-right: 7px; padding-right: 7px;
} }
.eva-cell-container {
display: flex;
justify-content: center;
}
.eva-cell-left {
flex: 1;
}
.eva-cell-content {
margin-left: 6px;
margin-right: 4px;
flex: 0 auto;
overflow: hidden;
display: flex;
}
.eva-header-text-overflow {
overflow: hidden;
text-overflow: ellipsis;
}
.eva-cell-right {
display: flex;
flex: 1;
min-width: max-content;
justify-content: flex-end;
}
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* --- Alarms --- */ /* --- Alarms --- */
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
...@@ -103,6 +136,8 @@ ...@@ -103,6 +136,8 @@
height: 22px; height: 22px;
min-height: 22px; min-height: 22px;
max-height: 22px; max-height: 22px;
min-width: calc(var(--eva-min-width) + 30px);
max-width: calc(var(--eva-min-width) + 30px);
} }
.eva-table tr:nth-child(2n) { .eva-table tr:nth-child(2n) {
...@@ -168,13 +203,20 @@ ...@@ -168,13 +203,20 @@
position: absolute; position: absolute;
right: 1px; right: 1px;
top: 0px; top: 0px;
padding-left: 2px;
display: flex; display: flex;
z-index: +1;
background: inherit;
} }
.eva-header-button { .eva-header-button {
padding: 2px 2px 3px 2px; padding: 2px 2px 3px 2px;
} }
.eva-header-text {
display: flex;
}
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* --- Table Callsite Boxes --- */ /* --- Table Callsite Boxes --- */
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
...@@ -205,7 +247,7 @@ tr:first-of-type > .eva-table-callsite-box { ...@@ -205,7 +247,7 @@ tr:first-of-type > .eva-table-callsite-box {
border: 0px; border: 0px;
padding: 2px 3px 2px 3px; padding: 2px 3px 2px 3px;
border-bottom: thin solid var(--border); border-bottom: thin solid var(--border);
min-width: 144px; min-width: var(--eva-min-width);
font-family: Andale Mono, monospace; font-family: Andale Mono, monospace;
font-size: 9pt; font-size: 9pt;
height: 22px; height: 22px;
...@@ -245,7 +287,7 @@ tr:first-of-type > .eva-table-callsite-box { ...@@ -245,7 +287,7 @@ tr:first-of-type > .eva-table-callsite-box {
} }
.eva-table-values-alarms { .eva-table-values-alarms {
min-width: 130px; min-width: calc(var(--eva-min-width) - 14px);
} }
.eva-values-position { .eva-values-position {
......
...@@ -284,6 +284,25 @@ async function StackInfos(props: StackInfosProps): Promise<JSX.Element> { ...@@ -284,6 +284,25 @@ async function StackInfos(props: StackInfosProps): Promise<JSX.Element> {
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
interface TableCellProps {
children?: JSX.Element | JSX.Element[];
right?: JSX.Element;
}
function TableCell(props: TableCellProps): JSX.Element {
const { children, right } = props;
return (
<div className='eva-cell-container'>
<div className='eva-cell-left'/>
<div className='eva-cell-content'>
{children}
</div>
<div className='eva-cell-right'>
{right}
</div>
</div>
);
}
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
...@@ -329,6 +348,23 @@ function ProbeHeader(props: ProbeHeaderProps): JSX.Element { ...@@ -329,6 +348,23 @@ function ProbeHeader(props: ProbeHeaderProps): JSX.Element {
items.push({ label: removeLabel, onClick: removeProbe }); items.push({ label: removeLabel, onClick: removeProbe });
Dome.popupMenu(items); Dome.popupMenu(items);
}; };
const buttons =
<div>
<IconButton
icon='PIN'
className={buttonClass}
title={`${pinText} the probe`}
selected={isPinned}
onClick={onDoubleClick}
/>
<IconButton
icon="CIRC.CLOSE"
className={buttonClass}
title="Discard the probe"
onClick={() => removeProbe()}
/>
</div>;
return ( return (
<th <th
...@@ -339,23 +375,12 @@ function ProbeHeader(props: ProbeHeaderProps): JSX.Element { ...@@ -339,23 +375,12 @@ function ProbeHeader(props: ProbeHeaderProps): JSX.Element {
onDoubleClick={onDoubleClick} onDoubleClick={onDoubleClick}
onContextMenu={onContextMenu} onContextMenu={onContextMenu}
> >
<span className='dome-text-cell'>{code}</span> <TableCell right={buttons}>
<Stmt stmt={stmt} marker={target} short={true}/> <div className='eva-header-text-overflow'>
<div className='eva-header-buttons-container'> <span className='dome-text-cell'>{code}</span>
<IconButton </div>
icon='PIN' <Stmt stmt={stmt} marker={target} short={true}/>
className={buttonClass} </TableCell>
title={`${pinText} the probe`}
selected={isPinned}
onClick={onDoubleClick}
/>
<IconButton
icon="CIRC.CLOSE"
className={buttonClass}
title="Discard the probe"
onClick={() => removeProbe()}
/>
</div>
</th> </th>
); );
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment