mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-27 10:03:48 +01:00
♿️ (Corp Warehouse UI Accessibility) Stop warehouse UI jump at higher zoom
This commit is contained in:
parent
ee887de151
commit
565a827f28
@ -27,6 +27,8 @@ import Tooltip from "@mui/material/Tooltip";
|
|||||||
import Paper from "@mui/material/Paper";
|
import Paper from "@mui/material/Paper";
|
||||||
import Button from "@mui/material/Button";
|
import Button from "@mui/material/Button";
|
||||||
import Box from "@mui/material/Box";
|
import Box from "@mui/material/Box";
|
||||||
|
import makeStyles from "@mui/styles/makeStyles";
|
||||||
|
import createStyles from "@mui/styles/createStyles";
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
corp: ICorporation;
|
corp: ICorporation;
|
||||||
@ -37,6 +39,14 @@ interface IProps {
|
|||||||
rerender: () => void;
|
rerender: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const useStyles = makeStyles(() =>
|
||||||
|
createStyles({
|
||||||
|
retainHeight: {
|
||||||
|
minHeight: '3em',
|
||||||
|
},
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
function WarehouseRoot(props: IProps): React.ReactElement {
|
function WarehouseRoot(props: IProps): React.ReactElement {
|
||||||
const corp = useCorporation();
|
const corp = useCorporation();
|
||||||
const division = useDivision();
|
const division = useDivision();
|
||||||
@ -56,6 +66,8 @@ function WarehouseRoot(props: IProps): React.ReactElement {
|
|||||||
props.rerender();
|
props.rerender();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const classes = useStyles();
|
||||||
|
|
||||||
// Current State:
|
// Current State:
|
||||||
let stateText;
|
let stateText;
|
||||||
switch (division.state) {
|
switch (division.state) {
|
||||||
@ -158,7 +170,7 @@ function WarehouseRoot(props: IProps): React.ReactElement {
|
|||||||
</Typography>
|
</Typography>
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
<Typography>{stateText}</Typography>
|
<Typography className={classes.retainHeight}>{stateText}</Typography>
|
||||||
|
|
||||||
{corp.unlockUpgrades[1] && (
|
{corp.unlockUpgrades[1] && (
|
||||||
<>
|
<>
|
||||||
|
Loading…
Reference in New Issue
Block a user