UI improvements

This commit is contained in:
BorysLevytskyi
2023-05-11 15:39:38 +02:00
parent 3ff599bb98
commit fed699555c
2 changed files with 6 additions and 1 deletions

View File

@@ -45,7 +45,7 @@ export default class BinaryStringView extends React.Component<BinaryStringViewPr
return bits;
}
createBits(bitChars:string[], bitSize?: number) : JSX.Element[] {
createBits(bitChars:string[]) : JSX.Element[] {
const allowFlipBits = this.props.allowFlipBits || false;
const css = allowFlipBits ? ' flipable' : ''
@@ -56,6 +56,9 @@ export default class BinaryStringView extends React.Component<BinaryStringViewPr
var className = c == '1' ? `one${css}` : `zero${css}`;
var tooltip = '';
if(i < (this.props.signBitIndex || 0))
className += ' extra-bit';
if(i === this.props.signBitIndex) {
className += ' accent1';
tooltip = 'Signature bit. 0 means a positive number and 1 means a negative.'

View File

@@ -71,6 +71,8 @@ a.hashLink { font-size: 1.1em;}
.cur { color: lightgray; }
.extra-bit { opacity: 0.4;}
button { border: none; text-decoration: underline;}
/* Light */