Repository navigation
Expand file tree
/
Copy pathwindow-manager.css
More file actions
108 lines (108 loc) · 3.46 KB
/
Copy pathwindow-manager.css
File metadata and controls
108 lines (108 loc) · 3.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
/* ============================================
窗口系统 (WindowManager) — 无遮罩可拖动可关闭窗口
============================================ */
.cw-window {
position: fixed;
display: flex;
flex-direction: column;
background: var(--color-bg-secondary);
border: 1px solid var(--color-border);
border-radius: 12px;
box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
overflow: hidden;
min-width: 320px;
min-height: 180px;
-webkit-app-region: no-drag;
user-select: none;
}
.cw-titlebar {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
padding: 10px 12px 10px 14px;
background: var(--color-bg-tertiary);
border-bottom: 1px solid var(--color-border);
cursor: move;
flex-shrink: 0;
}
.cw-title {
flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 14px;
font-weight: 700;
color: var(--color-text-primary);
}
.cw-close {
border: none;
background: transparent;
color: var(--color-text-tertiary);
font-size: 15px;
cursor: pointer;
width: 28px;
height: 28px;
border-radius: 6px;
display: inline-flex;
align-items: center;
justify-content: center;
transition: all var(--transition-fast);
flex-shrink: 0;
}
.cw-close:hover { background: var(--color-bg-hover); color: var(--color-text-primary); }
/* ⛶ 最大化/还原 (和 ✕ 同款) */
.cw-max {
border: none;
background: transparent;
color: var(--color-text-tertiary);
font-size: 14px;
cursor: pointer;
width: 28px;
height: 28px;
border-radius: 6px;
display: inline-flex;
align-items: center;
justify-content: center;
transition: all var(--transition-fast);
flex-shrink: 0;
}
.cw-max:hover { background: var(--color-bg-hover); color: var(--color-text-primary); }
.cw-max.is-max { color: var(--color-primary); }
/* 八向拖拽手柄: 四边 + 四角 (上下左右都能拖大) */
.cw-resize-edge {
position: absolute;
z-index: 2;
/* 只吃指针不吃内容: 热区本身透明, 靠 cursor 提示方向 */
background: transparent;
}
/* 四条边: 8px 厚热区 */
.cw-rz-n { top: 0; left: 10px; right: 10px; height: 6px; cursor: ns-resize; }
.cw-rz-s { bottom: 0; left: 10px; right: 10px; height: 6px; cursor: ns-resize; }
.cw-rz-w { left: 0; top: 10px; bottom: 10px; width: 6px; cursor: ew-resize; }
.cw-rz-e { right: 0; top: 10px; bottom: 10px; width: 6px; cursor: ew-resize; }
/* 四个角: 14px 见方热区, 压过边热区 */
.cw-rz-nw { top: 0; left: 0; width: 14px; height: 14px; cursor: nwse-resize; z-index: 3; }
.cw-rz-ne { top: 0; right: 0; width: 14px; height: 14px; cursor: nesw-resize; z-index: 3; }
.cw-rz-sw { bottom: 0; left: 0; width: 14px; height: 14px; cursor: nesw-resize; z-index: 3; }
.cw-rz-se { bottom: 0; right: 0; width: 16px; height: 16px; cursor: nwse-resize; z-index: 3; }
/* 右下角保留原来的斜纹装饰 (老 .cw-resize 的外观), 让抓手看得见 */
.cw-rz-deco {
background:
linear-gradient(135deg, transparent 0 45%, var(--color-border-light) 45% 55%, transparent 55% 100%),
linear-gradient(135deg, transparent 0 68%, var(--color-border-light) 68% 78%, transparent 78% 100%);
opacity: .7;
}
.cw-rz-deco:hover { opacity: 1; }
.cw-window.is-resizing { opacity: .96; }
.cw-window.is-resizing .cw-body { pointer-events: none; }
.cw-body {
flex: 1;
min-height: 0;
overflow: auto;
display: flex;
flex-direction: column;
}
.cw-window.is-dragging { cursor: move; }
.cw-window.is-dragging .cw-body { pointer-events: none; }