Skip to content

Commit 5b7d66d

Browse files
K-Blaaaackimsyy
andauthored
fix: 修复窗口缩小时界面溢出与原生滚动条 fixes #149 (#161)
* fix: 修复窗口缩小时界面溢出与原生滚动条 fixes #149 * feat: 修改最小宽高 --------- Co-authored-by: imsyy <[email protected]>
1 parent b480a1f commit 5b7d66d

5 files changed

Lines changed: 13 additions & 11 deletions

File tree

‎electron/main/window/create.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import icon from "../../../public/icons/favicon.png?asset";
88
const getDefaultOptions = (): BrowserWindowConstructorOptions => ({
99
width: 1280,
1010
height: 800,
11-
minWidth: 800,
12-
minHeight: 600,
11+
minWidth: 1280,
12+
minHeight: 800,
1313
autoHideMenuBar: true,
1414
show: false,
1515
backgroundColor: nativeTheme.shouldUseDarkColors ? "#101014" : "#f6f6f6",

‎src/components/layout/NavHeader.vue‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ const onMenuSelect = (key: string): void => {
5757
</script>
5858

5959
<template>
60-
<div class="flex items-center flex-1 h-full app-drag-region">
60+
<div class="flex items-center justify-between flex-1 h-full min-w-0 app-drag-region">
6161
<!-- 左侧 -->
62-
<div class="flex items-center gap-3 shrink-0">
62+
<div class="flex items-center gap-2 sm:gap-3 min-w-0 shrink-0">
6363
<SButton
64-
class="app-no-drag"
64+
class="app-no-drag shrink-0"
6565
variant="tertiary"
6666
circle
6767
:size="40"
@@ -71,7 +71,7 @@ const onMenuSelect = (key: string): void => {
7171
<template #icon><IconLucideChevronLeft /></template>
7272
</SButton>
7373
<SButton
74-
class="app-no-drag"
74+
class="app-no-drag shrink-0"
7575
variant="tertiary"
7676
circle
7777
:size="40"
@@ -83,7 +83,7 @@ const onMenuSelect = (key: string): void => {
8383
<NavSearch />
8484
<SButton
8585
v-if="update.hasUpdate"
86-
class="app-no-drag"
86+
class="app-no-drag shrink-0"
8787
variant="tertiary"
8888
circle
8989
:size="40"
@@ -95,13 +95,13 @@ const onMenuSelect = (key: string): void => {
9595
</SButton>
9696
</div>
9797
<!-- 中间 -->
98-
<div class="flex-1 h-full" />
98+
<div class="flex-1 h-full min-w-4" />
9999
<!-- 右侧 -->
100-
<div class="flex items-center gap-3 shrink-0">
100+
<div class="flex items-center gap-2 sm:gap-3 shrink-0">
101101
<NavUser />
102102
<SDropdownMenu :items="menuItems" @select="onMenuSelect">
103103
<template #trigger>
104-
<SButton class="app-no-drag" variant="tertiary" circle :size="40">
104+
<SButton class="app-no-drag shrink-0" variant="tertiary" circle :size="40">
105105
<template #icon><IconLucideSettings /></template>
106106
</SButton>
107107
</template>

‎src/components/layout/NavSearch.vue‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@ onMounted(() => {
275275
</script>
276276

277277
<template>
278+
<!-- 搜索框触发器与听歌识曲 -->
278279
<div class="flex items-center gap-2 shrink-0">
279280
<div
280281
role="button"

‎src/layouts/MainLayout.vue‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ const playerBarInnerClass = computed(() => {
114114
<template>
115115
<!-- 主界面 -->
116116
<div
117-
class="h-screen flex bg-app text-on-surface transition-[transform,opacity] duration-500 ease-[cubic-bezier(0.7,0,0.3,1)] origin-center"
117+
class="h-screen flex overflow-hidden bg-app text-on-surface transition-[transform,opacity] duration-500 ease-[cubic-bezier(0.7,0,0.3,1)] origin-center"
118118
:class="isPlayerExpanded ? 'scale-95 opacity-0 pointer-events-none' : ''"
119119
>
120120
<!-- 侧边栏 -->

‎src/styles/global.css‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ html[data-appearance-style="image"] [role="alertdialog"] .bg-field {
104104
/* 滚动条 */
105105
::-webkit-scrollbar {
106106
width: 6px;
107+
height: 6px;
107108
}
108109

109110
::-webkit-scrollbar-track {

0 commit comments

Comments
 (0)