chore: update design of titlebar
This commit is contained in:
parent
9ad40e3c45
commit
b7ae4c54c1
@ -1,21 +1,19 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Minimize from "lucide-svelte/icons/minus";
|
import Minimize from 'lucide-svelte/icons/minus';
|
||||||
import Close from "lucide-svelte/icons/x";
|
import Close from 'lucide-svelte/icons/x';
|
||||||
|
|
||||||
import Logo from "$assets/logo.png";
|
|
||||||
|
|
||||||
import { getCurrentWindow } from "@tauri-apps/api/window";
|
import Logo from '$assets/logo.png';
|
||||||
import { onMount } from "svelte";
|
|
||||||
|
import { getCurrentWindow } from '@tauri-apps/api/window';
|
||||||
|
import { onMount } from 'svelte';
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
const appWindow = getCurrentWindow();
|
const appWindow = getCurrentWindow();
|
||||||
|
|
||||||
document
|
document
|
||||||
.getElementById("titlebar-minimize")
|
.getElementById('titlebar-minimize')
|
||||||
?.addEventListener("click", () => appWindow.minimize());
|
?.addEventListener('click', () => appWindow.minimize());
|
||||||
document
|
document.getElementById('titlebar-close')?.addEventListener('click', () => appWindow.close());
|
||||||
.getElementById("titlebar-close")
|
|
||||||
?.addEventListener("click", () => appWindow.close());
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -39,20 +37,23 @@
|
|||||||
user-select: none;
|
user-select: none;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
|
gap: 10px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
|
margin-right: 8px;
|
||||||
pointer-events: all !important;
|
pointer-events: all !important;
|
||||||
}
|
}
|
||||||
.titlebar-button {
|
.titlebar-button {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 60px;
|
width: 40px;
|
||||||
height: 100%;
|
height: 40px;
|
||||||
|
border-radius: 0.35rem;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
-webkit-user-select: none;
|
-webkit-user-select: none;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user