fix(win): drag region

This commit is contained in:
AkiChase 2024-05-23 18:59:53 +08:00
parent a06dc4f811
commit 737647f73c
3 changed files with 19 additions and 6 deletions

View File

@ -94,6 +94,7 @@ impl Adb {
cmd.creation_flags(0x08000000); // CREATE_NO_WINDOW
return cmd;
}
#[cfg(not(target_os = "windows"))]
Command::new(adb_path)
}

View File

@ -13,7 +13,8 @@ async function maximizeOrRestore() {
</script>
<template>
<div data-tauri-drag-region class="header">
<div class="header">
<div data-tauri-drag-region class="drag"></div>
<NButtonGroup>
<NButton quaternary :focusable="false" @click="getCurrent().minimize()">
<template #icon>
@ -49,6 +50,15 @@ async function maximizeOrRestore() {
align-items: center;
border-radius: 0 10px 0 0;
.n-button-group{
flex-shrink: 0;
}
.drag{
flex-grow: 1;
height: 100%;
}
.close {
border-radius: 0 10px 0 0;
&:hover {

View File

@ -55,7 +55,7 @@ async function changeScreenPowerMode() {
</script>
<template>
<div data-tauri-drag-region class="sidebar">
<div class="sidebar">
<div data-tauri-drag-region class="logo">S M</div>
<div class="module">
<div :class="{ active: route.name == 'mask' }" @click="nav('mask')">
@ -82,7 +82,7 @@ async function changeScreenPowerMode() {
</NIcon>
</div>
</div>
<div data-tauri-drag-region class="drag"></div>
<div class="nav">
<div @click="changeScreenPowerMode">
<NIcon>
@ -142,11 +142,13 @@ async function changeScreenPowerMode() {
cursor: pointer;
}
.drag{
flex-grow: 1;
width: 100%;
}
.module {
display: flex;
flex: 1;
min-height: 0;
flex-direction: column;
& > div {