mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-10 22:21:22 -07:00
Fix layout rounding. (#18667)
This commit is contained in:
committed by
GitHub
parent
92a5f725a1
commit
bd2744031f
@@ -1183,11 +1183,9 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
||||
useLayoutEffect(() => {
|
||||
if (mainControlsRef.current) {
|
||||
const fullFooterMeasurement = measureElement(mainControlsRef.current);
|
||||
if (
|
||||
fullFooterMeasurement.height > 0 &&
|
||||
fullFooterMeasurement.height !== controlsHeight
|
||||
) {
|
||||
setControlsHeight(fullFooterMeasurement.height);
|
||||
const roundedHeight = Math.round(fullFooterMeasurement.height);
|
||||
if (roundedHeight > 0 && roundedHeight !== controlsHeight) {
|
||||
setControlsHeight(roundedHeight);
|
||||
}
|
||||
}
|
||||
}, [buffer, terminalWidth, terminalHeight, controlsHeight]);
|
||||
|
||||
@@ -52,7 +52,7 @@ export const MaxSizedBox: React.FC<MaxSizedBoxProps> = ({
|
||||
const observer = new ResizeObserver((entries) => {
|
||||
const entry = entries[0];
|
||||
if (entry) {
|
||||
setContentHeight(entry.contentRect.height);
|
||||
setContentHeight(Math.round(entry.contentRect.height));
|
||||
}
|
||||
});
|
||||
observer.observe(node);
|
||||
|
||||
Reference in New Issue
Block a user