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 { if let tauri::WindowEvent::ThemeChanged(_) = event {
win.set_traffic_lights_inset(8.0, 16.0).unwrap(); 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 // Create data folder if not exist

View File

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

View File

@@ -35,14 +35,14 @@ function Screen() {
<div className="flex flex-col w-screen h-screen"> <div className="flex flex-col w-screen h-screen">
<div <div
data-tauri-drag-region 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 <div
data-tauri-drag-region data-tauri-drag-region
className={cn( className="relative z-[200] flex-1 flex items-center gap-2"
"flex-1 flex items-center gap-2",
platform === "macos" ? "pl-[64px]" : "",
)}
> >
<button <button
type="button" type="button"
@@ -54,12 +54,15 @@ function Screen() {
</button> </button>
<div id="toolbar" /> <div id="toolbar" />
</div> </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 /> <Search />
</div> </div>
<div <div
data-tauri-drag-region 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 <button
type="button" type="button"