diff --git a/src/ui/App.tsx b/src/ui/App.tsx index cc22a55..fac082e 100644 --- a/src/ui/App.tsx +++ b/src/ui/App.tsx @@ -46,9 +46,11 @@ const LargeApp = () => { - {tabsEnabled && } - - + + {tabsEnabled && } + +
+
); @@ -67,7 +69,7 @@ const MobileApp = () => { }; return ( - + { } - +
); }; diff --git a/src/ui/Code.tsx b/src/ui/Code.tsx index 68a47bf..3bfebdb 100644 --- a/src/ui/Code.tsx +++ b/src/ui/Code.tsx @@ -352,14 +352,18 @@ const Code = () => { size={"large"} spinning={!!decompiling} description="Decompiling..." - style={{ - height: '100%', - color: 'white' + styles={{ + root: { + height: '100%', + color: 'white' + }, + container: { + height: '100%', + } }} > {contextHolder} { minimap: { enabled: !hideMinimap }, glyphMargin: true, foldingImportsByDefault: true, - foldingHighlight: false + foldingHighlight: false, + scrollBeyondLastLine: false, }} onMount={(codeEditor) => { editorRef.current = codeEditor; diff --git a/src/ui/diff/DiffCode.tsx b/src/ui/diff/DiffCode.tsx index 17f9584..a99e135 100644 --- a/src/ui/diff/DiffCode.tsx +++ b/src/ui/diff/DiffCode.tsx @@ -10,11 +10,7 @@ import { isDecompiling } from "../../logic/Decompiler.ts"; import { unifiedDiff } from '../../logic/Settings'; import { selectedFile } from '../../logic/State.ts'; -interface DiffCodeProps { - height?: number | string; -} - -const DiffCode = ({ height }: DiffCodeProps) => { +const DiffCode = () => { const leftResult = useObservable(getLeftDiff().result); const rightResult = useObservable(getRightDiff().result); const editorRef = useRef(null); @@ -56,20 +52,17 @@ const DiffCode = ({ height }: DiffCodeProps) => { size={"large"} spinning={!!loading} description="Decompiling..." - style={{ - height: '100%', - color: 'white' + styles={{ + root: { + height: '100%', + color: 'white' + }, + container: { + height: '100%', + } }} > - {/* - Before the height is changed it is "70%", or whatever the default % is set to. - The wrapping elements for the output editor do not have the relevant context to know what the 70% is of, - so it falls back to 0. We must override this and specify that the height is for the viewport by swapping - the '%' out with 'vh'. If the height is a number literal then the size has been changed and will be an - exact pixel count - */} { readOnly: true, domReadOnly: true, renderSideBySide: !isUnified, + scrollBeyondLastLine: false, //tabSize: 3, }} /> diff --git a/src/ui/diff/DiffView.tsx b/src/ui/diff/DiffView.tsx index 4485d29..b2183b9 100644 --- a/src/ui/diff/DiffView.tsx +++ b/src/ui/diff/DiffView.tsx @@ -9,16 +9,9 @@ const DiffView = () => { return ( <> - + -
- {/* - does not allow setting various css properties and only accepts a height - literal, so we pass the expected size from the view to the editor to ensure it fits in the - viewport correctly - */} - -
+
{ ); }; -export default DiffView; \ No newline at end of file +export default DiffView;