Skip to content

Commit 84c86f3

Browse files
bytemainRicbet
authored andcommitted
style: fix editor tab style (#3970)
1 parent 477049a commit 84c86f3

3 files changed

Lines changed: 9 additions & 12 deletions

File tree

packages/editor/src/browser/editor-scrollbar/index.module.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
top: 0px;
8383
opacity: 0;
8484
}
85-
// rgba(106, 115, 125, 0.2) 0 6px 6px -6px inset
85+
8686
.scrollbar-decoration-vertical-l {
8787
left: 0px;
8888
border-left: 1px solid var(--kt-panelTab-border);

packages/editor/src/browser/editor.module.less

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
position: absolute;
4949
width: 100%;
5050
height: 100%;
51+
pointer-events: none;
5152
}
5253
.kt_editor_tabs {
5354
display: flex;
@@ -132,12 +133,6 @@
132133
}
133134
}
134135

135-
.kt_editor_tabs_scroll_wrapper {
136-
flex-grow: 1;
137-
width: 100%;
138-
position: relative;
139-
}
140-
141136
.kt_editor_tabs_scroll {
142137
overflow-y: hidden;
143138
:global(.loading_indicator) {
@@ -184,7 +179,7 @@
184179
}
185180
.kt_editor_tabs_content {
186181
overflow-y: hidden;
187-
display: inline-flex;
182+
display: flex;
188183
position: relative;
189184
height: 100%;
190185
&.kt_on_drag_over {
@@ -197,8 +192,6 @@
197192
display: flex;
198193
position: relative;
199194
align-items: center;
200-
flex-shrink: 1;
201-
flex-grow: 1;
202195
padding: 0 12px;
203196
border-right: 1px solid var(--tab-border);
204197
height: 100%;
@@ -209,7 +202,6 @@
209202
color: var(--tab-inactiveForeground);
210203
background: var(--tab-inactiveBackground);
211204
border-top: 1px solid transparent;
212-
box-sizing: border-box;
213205
z-index: 1;
214206
word-break: keep-all;
215207
white-space: nowrap;
@@ -348,7 +340,7 @@
348340
}
349341

350342
.editorGroupHeader {
351-
z-index: var(--stacking-level-background, 0);
343+
z-index: var(--stacking-level-workbench, 1);
352344
position: relative;
353345
}
354346

packages/editor/src/browser/tab.view.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,11 @@ export const EditorActions = forwardRef<HTMLDivElement, IEditorActionsProps>(
567567
const [hasFocus, setHasFocus] = useState<boolean>(editorService.currentEditorGroup === group);
568568
const [args, setArgs] = useState<[URI, IEditorGroup, MaybeNull<URI>] | undefined>(acquireArgs());
569569

570+
/**
571+
* 集成场景下可以不展示任何菜单,可以用以下代码取消菜单注册
572+
* registry.unregisterMenuId(MenuId.EditorTitle);
573+
* registry.unregisterMenuId(MenuId.EditorTitleRun);
574+
*/
570575
const noActions = menu.getMergedMenuNodes().length === 0;
571576

572577
useEffect(() => {

0 commit comments

Comments
 (0)