Fix inconsistent tab sizing between views, give add tab more room

This commit is contained in:
Evan Simkowitz 2024-12-11 14:43:43 -08:00
parent 98027204ca
commit 17594b3e25
No known key found for this signature in database
3 changed files with 7 additions and 4 deletions

View File

@ -78,14 +78,18 @@
}
.config-error-button {
margin-left: auto;
height: 80%;
margin: auto 4px;
color: black;
flex: 0 0 fit-content;
}
.update-available-banner {
margin-left: auto;
}
.add-tab-btn {
width: 22px;
height: 100%;
cursor: pointer;
font-size: 14px;
@ -95,6 +99,7 @@
align-items: center;
justify-content: center;
opacity: 0.5;
padding: 0 10px;
&:hover {
opacity: 1;

View File

@ -226,7 +226,6 @@ const TabBar = memo(({ workspace }: TabBarProps) => {
const tabbarWrapperWidth = tabbarWrapperRef.current.getBoundingClientRect().width;
const windowDragLeftWidth = draggerLeftRef.current.getBoundingClientRect().width;
const windowDragRightWidth = draggerRightRef.current.getBoundingClientRect().width;
const addBtnWidth = addBtnRef.current.getBoundingClientRect().width;
const updateStatusLabelWidth = updateStatusBannerRef.current?.getBoundingClientRect().width ?? 0;
const configErrorWidth = configErrorButtonRef.current?.getBoundingClientRect().width ?? 0;
@ -236,7 +235,6 @@ const TabBar = memo(({ workspace }: TabBarProps) => {
const nonTabElementsWidth =
windowDragLeftWidth +
windowDragRightWidth +
addBtnWidth +
updateStatusLabelWidth +
configErrorWidth +
@ -683,7 +681,6 @@ const TabBar = memo(({ workspace }: TabBarProps) => {
<div ref={addBtnRef} className="add-tab-btn" onClick={handleAddTab}>
<i className="fa fa-solid fa-plus fa-fw" />
</div>
<WindowDrag ref={draggerRightRef} className="right" />
<UpdateStatusBanner ref={updateStatusBannerRef} />
<ConfigErrorIcon buttonRef={configErrorButtonRef} />
</div>

View File

@ -29,6 +29,7 @@ const UpdateStatusBannerComponent = forwardRef<HTMLDivElement>((_, ref) => {
default:
break;
}
message = "Update Available";
setUpdateStatusMessage(message);
// Clear any existing timeout