提交 9f3efd44 编写于 作者: B Benjamin Pasero

Cursor over icon is default, should be pointer (fixes #12365)

上级 5a54dad1
......@@ -36,10 +36,23 @@ export class IconLabel {
this.descriptionNode = dom.append(this.domNode, dom.$('span.label-description'));
}
public getHTMLElement(): HTMLElement {
public get element(): HTMLElement {
return this.domNode;
}
public get labelElement(): HTMLElement {
const labelNode = this.labelNode;
if (labelNode instanceof HighlightedLabel) {
return labelNode.element;
} else {
return labelNode;
}
}
public get descriptionElement(): HTMLElement {
return this.descriptionNode;
}
public setValue(label?: string, description?: string, options?: IIconLabelOptions): void {
const labelNode = this.labelNode;
if (labelNode instanceof HighlightedLabel) {
......
......@@ -15,9 +15,12 @@
.monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title .tabs-container > .tab .tab-label a {
text-decoration: none;
font-size: 13px;
cursor: pointer;
}
.monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title .monaco-icon-label::before,
.monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title .tabs-container > .tab .monaco-icon-label::before,
.monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title .title-label a,
.monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title .tabs-container > .tab .tab-label a,
.monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title .title-label span,
.monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title .tabs-container > .tab .tab-label span {
cursor: pointer;
......@@ -68,6 +71,7 @@
/* Drag Cursor */
.monaco-workbench > .part.editor > .content.multiple-editors > .one-editor-silo > .container > .title,
.monaco-workbench > .part.editor > .content.multiple-editors > .one-editor-silo > .container > .title .monaco-icon-label::before,
.monaco-workbench > .part.editor > .content.multiple-editors > .one-editor-silo > .container > .title .title-label a,
.monaco-workbench > .part.editor > .content.multiple-editors > .one-editor-silo > .container > .title .title-label span {
cursor: -webkit-grab;
......@@ -76,6 +80,7 @@
#monaco-workbench-editor-move-overlay,
.monaco-workbench > .part.editor > .content.multiple-editors > .one-editor-silo.drag,
.monaco-workbench > .part.editor > .content.multiple-editors > .one-editor-silo.drag > .container > .title,
.monaco-workbench > .part.editor > .content.multiple-editors > .one-editor-silo.drag > .container > .title .monaco-icon-label::before,
.monaco-workbench > .part.editor > .content.multiple-editors > .one-editor-silo.drag > .container > .title .title-label a,
.monaco-workbench > .part.editor > .content.multiple-editors > .one-editor-silo.drag > .container > .title .title-label span {
cursor: -webkit-grabbing;
......
......@@ -36,7 +36,8 @@ export class NoTabsTitleControl extends TitleControl {
// Editor Label
this.editorLabel = this.instantiationService.createInstance(EditorLabel, this.titleContainer, void 0);
this.toDispose.push(this.editorLabel);
this.toDispose.push(DOM.addDisposableListener(this.editorLabel.getHTMLElement(), DOM.EventType.CLICK, (e: MouseEvent) => this.onTitleLabelClick(e)));
this.toDispose.push(DOM.addDisposableListener(this.editorLabel.labelElement, DOM.EventType.CLICK, (e: MouseEvent) => this.onTitleLabelClick(e)));
this.toDispose.push(DOM.addDisposableListener(this.editorLabel.descriptionElement, DOM.EventType.CLICK, (e: MouseEvent) => this.onTitleLabelClick(e)));
// Right Actions Container
const actionsContainer = document.createElement('div');
......@@ -124,7 +125,7 @@ export class NoTabsTitleControl extends TitleControl {
verboseDescription = ''; // dont repeat what is already shown
}
this.editorLabel.setLabel({ name, description, resource}, { title: verboseDescription, italic: !isPinned, extraClasses: ['title-label'] });
this.editorLabel.setLabel({ name, description, resource }, { title: verboseDescription, italic: !isPinned, extraClasses: ['title-label'] });
// Update Editor Actions Toolbar
this.updateEditorActionsToolbar();
......
......@@ -309,7 +309,7 @@ export class FileRenderer extends ActionsRenderer implements IRenderer {
label.setFile(stat.resource, labelOptions);
// Input field (when creating a new file or folder or renaming)
const inputBox = new InputBox(label.getHTMLElement(), this.contextViewService, {
const inputBox = new InputBox(label.element, this.contextViewService, {
validationOptions: {
validation: editableData.validator,
showMessage: true
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册