Skip to content

Commit bce3106

Browse files
committed
fixed issue for darwin title bar overlapping
feature/auto-hide-tab-bar fixed issue of window title bar feature/auto-hide-tab-bar fixed issue in non hide mode
1 parent 3223c8d commit bce3106

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

frontend/app/block/block.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
// SPDX-License-Identifier: Apache-2.0
33

44
@use "../mixins.scss";
5+
@use "../tab/tabbar.scss" as tabbar;
6+
7+
.darwin:not(.fullscreen) .block.block-frame-default .block-frame-default-header {
8+
.window-drag.left {
9+
width: tabbar.$darwin-not-fullscreen-indent;
10+
}
11+
}
512

613
.block {
714
display: flex;

frontend/app/block/blockframe.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ import clsx from "clsx";
4040
import * as jotai from "jotai";
4141
import * as React from "react";
4242
import { BlockFrameProps } from "./blocktypes";
43+
import { WindowDrag } from "../element/windowdrag";
4344

4445
const NumActiveConnColors = 8;
4546

@@ -181,9 +182,12 @@ const BlockFrame_Header = ({
181182
const preIconButton = util.useAtomValueSafe(viewModel?.preIconButton);
182183
let headerTextUnion = util.useAtomValueSafe(viewModel?.viewText);
183184
const magnified = jotai.useAtomValue(nodeModel.isMagnified);
185+
const settings = jotai.useAtomValue(atoms.settingsAtom);
186+
const autoHideTabBar = settings?.["window:autohidetabbar"] ?? false;
184187
const prevMagifiedState = React.useRef(magnified);
185188
const manageConnection = util.useAtomValueSafe(viewModel?.manageConnection);
186189
const dragHandleRef = preview ? null : nodeModel.dragHandleRef;
190+
const draggerLeftRef = React.useRef<HTMLDivElement>(null);
187191
const connName = blockData?.meta?.connection;
188192
const connStatus = util.useAtomValueSafe(getConnStatusAtom(connName));
189193
const wshProblem = connName && !connStatus?.wshenabled && connStatus?.status == "connected";
@@ -252,6 +256,7 @@ const BlockFrame_Header = ({
252256

253257
return (
254258
<div className="block-frame-default-header" ref={dragHandleRef} onContextMenu={onContextMenu}>
259+
<WindowDrag ref={draggerLeftRef} className={clsx({ 'left': autoHideTabBar })} />
255260
{preIconButtonElem}
256261
<div className="block-frame-default-header-iconview">
257262
{viewIconElem}

frontend/app/tab/tabbar.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33

44
@use "./../theme.scss";
55

6+
$darwin-not-fullscreen-indent: 74px;
7+
68
.tab-bar-wrapper {
79
--default-indent: 10px;
8-
--darwin-not-fullscreen-indent: 74px;
910
}
1011

1112
.darwin:not(.fullscreen) .tab-bar-wrapper {
1213
.window-drag.left {
13-
width: var(--darwin-not-fullscreen-indent);
14+
width: $darwin-not-fullscreen-indent;
1415
}
1516
}
1617

0 commit comments

Comments
 (0)