fix: titlebar on windows

This commit is contained in:
reya
2024-08-19 10:28:38 +07:00
parent ce7828310b
commit 307fff7a53
3 changed files with 96 additions and 84 deletions

View File

@@ -174,9 +174,6 @@ fn main() {
if let tauri::WindowEvent::ThemeChanged(_) = event {
win.set_traffic_lights_inset(8.0, 16.0).unwrap();
}
if let tauri::WindowEvent::Resized(_) = event {
win.set_traffic_lights_inset(8.0, 16.0).unwrap();
}
});
// Create data folder if not exist

View File

@@ -49,6 +49,10 @@ input::-ms-clear {
line-height: normal;
}
div[data-tauri-decorum-tb] {
@apply h-11;
}
.spinner-leaf {
position: absolute;
top: 0;
@@ -70,30 +74,37 @@ input::-ms-clear {
transform: rotate(0deg);
animation-delay: -800ms;
}
&:where(:nth-child(2)) {
transform: rotate(45deg);
animation-delay: -700ms;
}
&:where(:nth-child(3)) {
transform: rotate(90deg);
animation-delay: -600ms;
}
&:where(:nth-child(4)) {
transform: rotate(135deg);
animation-delay: -500ms;
}
&:where(:nth-child(5)) {
transform: rotate(180deg);
animation-delay: -400ms;
}
&:where(:nth-child(6)) {
transform: rotate(225deg);
animation-delay: -300ms;
}
&:where(:nth-child(7)) {
transform: rotate(270deg);
animation-delay: -200ms;
}
&:where(:nth-child(8)) {
transform: rotate(315deg);
animation-delay: -100ms;
@@ -104,6 +115,7 @@ input::-ms-clear {
from {
opacity: 1;
}
to {
opacity: 0.25;
}

View File

@@ -35,14 +35,14 @@ function Screen() {
<div className="flex flex-col w-screen h-screen">
<div
data-tauri-drag-region
className="flex h-11 shrink-0 items-center justify-between px-3"
className={cn(
"flex h-11 shrink-0 items-center justify-between",
platform === "macos" ? "pl-[72px] pr-3" : "pr-[128px] pl-3",
)}
>
<div
data-tauri-drag-region
className={cn(
"flex-1 flex items-center gap-2",
platform === "macos" ? "pl-[64px]" : "",
)}
className="relative z-[200] flex-1 flex items-center gap-2"
>
<button
type="button"
@@ -54,12 +54,15 @@ function Screen() {
</button>
<div id="toolbar" />
</div>
<div data-tauri-drag-region className="hidden md:flex md:flex-1">
<div
data-tauri-drag-region
className="relative z-[200] hidden md:flex md:flex-1"
>
<Search />
</div>
<div
data-tauri-drag-region
className="flex-1 flex items-center justify-end gap-3"
className="relative z-[200] flex-1 flex items-center justify-end gap-3"
>
<button
type="button"