Skip to content

Commit 41d267f

Browse files
committed
🐛 在使用原生标题栏的设置下,Mac不显示左上角模拟的红绿灯,windows不显示右上角小黄点
1 parent 474183f commit 41d267f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/src/pages/_app.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ export default function App() {
271271
)}
272272
>
273273
{/* mac的红绿灯,发现如果没有内容会看不见,里面加一个点儿 */}
274-
{isMac && (
274+
{isMac && !useNativeTitleBar && (
275275
<Button className="right-4 top-4 flex items-center gap-2 active:scale-100">
276276
<div
277277
className="size-3 rounded-full bg-red-500 active:bg-red-800"
@@ -476,7 +476,7 @@ export default function App() {
476476
)}
477477
</div>
478478
{/* @鹿松狸,鼠标移动到最右上角出现关闭窗口按钮 */}
479-
{!isMac && !isWindowCollapsing && (
479+
{!isMac && !isWindowCollapsing && !useNativeTitleBar && (
480480
<div
481481
className="fixed right-0 top-0 z-50 size-1 cursor-pointer rounded-bl-2xl bg-amber-200 transition-all hover:size-14 hover:bg-red-500"
482482
onClick={() => {

0 commit comments

Comments
 (0)