Merge from vscode 1eb87b0e9ce9886afeaecec22b31abd0d9b7939f (#7282)

* Merge from vscode 1eb87b0e9ce9886afeaecec22b31abd0d9b7939f

* fix various icon issues

* fix preview features
This commit is contained in:
Anthony Dresser
2019-09-19 21:50:52 -07:00
committed by GitHub
parent 9d3d64eef3
commit db498db0a8
459 changed files with 10195 additions and 7528 deletions

View File

@@ -5,7 +5,7 @@
/* Checkbox */
.monaco-checkbox .label {
.monaco-checkbox .codicon-selection {
width: 12px;
height: 12px;
border: 1px solid black;
@@ -24,7 +24,7 @@
border: 0;
}
.monaco-checkbox .checkbox:checked + .label {
.monaco-checkbox .checkbox:checked + .codicon-selection {
background-color: black;
}
@@ -166,6 +166,9 @@
background-position: center center;
background-repeat: no-repeat;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
}
.monaco-editor .find-widget .button:not(.disabled):hover {
@@ -200,14 +203,6 @@
display: none;
}
.monaco-editor .find-widget .previous {
background-image: url('images/chevron-previous-light.svg');
}
.monaco-editor .find-widget .next {
background-image: url('images/chevron-next-light.svg');
}
.monaco-editor .find-widget .disabled {
opacity: 0.3;
cursor: default;
@@ -221,54 +216,32 @@
margin-left: 3px;
}
.monaco-editor .find-widget .monaco-checkbox .label {
content: '';
display: inline-block;
background-repeat: no-repeat;
background-position: center;
background-image: url('images/find-selection-light.svg');
.monaco-editor .find-widget .monaco-checkbox .codicon-selection {
display: flex;
align-items: center;
justify-content: center;
width: 20px;
height: 20px;
border: none;
}
.monaco-editor .find-widget .monaco-checkbox .checkbox:disabled + .label {
.monaco-editor .find-widget .monaco-checkbox .checkbox:disabled + .codicon-selection {
opacity: 0.3;
cursor: default;
}
.monaco-editor .find-widget .monaco-checkbox .checkbox:not(:disabled) + .label {
.monaco-editor .find-widget .monaco-checkbox .checkbox:not(:disabled) + .codicon-selection {
cursor: pointer;
}
.monaco-editor .find-widget .monaco-checkbox .checkbox:not(:disabled):hover:before + .label {
.monaco-editor .find-widget .monaco-checkbox .checkbox:not(:disabled):hover:before + .codicon-selection {
background-color: #DDD;
}
.monaco-editor .find-widget .monaco-checkbox .checkbox:checked + .label {
.monaco-editor .find-widget .monaco-checkbox .checkbox:checked + .codicon-selection {
background-color: rgba(100, 100, 100, 0.2);
}
.monaco-editor .find-widget .close-fw {
background-image: url('images/close-light.svg');
}
.monaco-editor .find-widget .expand {
background-image: url('images/tree-expanded-light.svg');
}
.monaco-editor .find-widget .collapse {
background-image: url('images/tree-collapsed-light.svg');
}
.monaco-editor .find-widget .replace {
background-image: url('images/replace-light.svg');
}
.monaco-editor .find-widget .replace-all {
background-image: url('images/replace-all-light.svg');
}
.monaco-editor .find-widget > .replace-part {
display: none;
}
@@ -329,52 +302,13 @@
margin-left: -4px;
}
.monaco-editor.hc-black .find-widget .previous,
.monaco-editor.vs-dark .find-widget .previous {
background-image: url('images/chevron-previous-dark.svg');
}
.monaco-editor.hc-black .find-widget .next,
.monaco-editor.vs-dark .find-widget .next {
background-image: url('images/chevron-next-dark.svg');
}
.monaco-editor.hc-black .find-widget .monaco-checkbox .label,
.monaco-editor.vs-dark .find-widget .monaco-checkbox .label {
background-image: url('images/find-selection-dark.svg');
}
.monaco-editor.vs-dark .find-widget .monaco-checkbox .checkbox:not(:disabled):hover:before + .label {
.monaco-editor.vs-dark .find-widget .monaco-checkbox .checkbox:not(:disabled):hover:before + .codicon-selection {
background-color: rgba(255, 255, 255, 0.1);
}
.monaco-editor.hc-black .find-widget .close-fw,
.monaco-editor.vs-dark .find-widget .close-fw {
background-image: url('images/close-dark.svg');
}
.monaco-editor.hc-black .find-widget .replace,
.monaco-editor.vs-dark .find-widget .replace {
background-image: url('images/replace-dark.svg');
}
.monaco-editor.hc-black .find-widget .replace-all,
.monaco-editor.vs-dark .find-widget .replace-all {
background-image: url('images/replace-all-dark.svg');
}
.monaco-editor.hc-black .find-widget .expand,
.monaco-editor.vs-dark .find-widget .expand {
background-image: url('images/tree-expanded-dark.svg');
}
.monaco-editor.hc-black .find-widget .collapse,
.monaco-editor.vs-dark .find-widget .collapse {
background-image: url('images/tree-collapsed-dark.svg');
}
.monaco-editor.hc-black .find-widget .button:not(.disabled):hover,
.monaco-editor.vs-dark .find-widget .button:not(.disabled):hover {
.monaco-editor.vs-dark .find-widget .button:not(.disabled):hover,
.monaco-editor.vs-dark .find-widget .monaco-checkbox:not(.disabled):hover {
background-color: rgba(255, 255, 255, 0.1);
}
@@ -384,6 +318,6 @@
left: 2px;
}
.monaco-editor.hc-black .find-widget .monaco-checkbox .checkbox:checked + .label {
.monaco-editor.hc-black .find-widget .monaco-checkbox .checkbox:checked + .codicon-selection {
background-color: rgba(255, 255, 255, 0.1);
}

View File

@@ -453,8 +453,8 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
this._replaceAllBtn.setEnabled(this._isVisible && this._isReplaceVisible && findInputIsNonEmpty);
dom.toggleClass(this._domNode, 'replaceToggled', this._isReplaceVisible);
this._toggleReplaceBtn.toggleClass('collapse', !this._isReplaceVisible);
this._toggleReplaceBtn.toggleClass('expand', this._isReplaceVisible);
this._toggleReplaceBtn.toggleClass('codicon-chevron-right', !this._isReplaceVisible);
this._toggleReplaceBtn.toggleClass('codicon-chevron-down', this._isReplaceVisible);
this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);
let canReplace = !this._codeEditor.getOption(EditorOption.readOnly);
@@ -642,6 +642,10 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
if (!this._isVisible) {
return;
}
if (!dom.isInDOM(this._domNode)) {
// the widget is not in the DOM
return;
}
const layoutInfo = this._codeEditor.getLayoutInfo();
const editorContentWidth = layoutInfo.contentWidth;
@@ -951,7 +955,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
// Previous button
this._prevBtn = this._register(new SimpleButton({
label: NLS_PREVIOUS_MATCH_BTN_LABEL + this._keybindingLabelFor(FIND_IDS.PreviousMatchFindAction),
className: 'previous',
className: 'codicon codicon-arrow-up',
onTrigger: () => {
this._codeEditor.getAction(FIND_IDS.PreviousMatchFindAction).run().then(undefined, onUnexpectedError);
}
@@ -960,7 +964,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
// Next button
this._nextBtn = this._register(new SimpleButton({
label: NLS_NEXT_MATCH_BTN_LABEL + this._keybindingLabelFor(FIND_IDS.NextMatchFindAction),
className: 'next',
className: 'codicon codicon-arrow-down',
onTrigger: () => {
this._codeEditor.getAction(FIND_IDS.NextMatchFindAction).run().then(undefined, onUnexpectedError);
}
@@ -1000,7 +1004,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
// Close button
this._closeBtn = this._register(new SimpleButton({
label: NLS_CLOSE_BTN_LABEL + this._keybindingLabelFor(FIND_IDS.CloseFindWidgetCommand),
className: 'close-fw',
className: 'codicon codicon-close',
onTrigger: () => {
this._state.change({ isRevealed: false, searchScope: null }, false);
},
@@ -1063,7 +1067,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
// Replace one button
this._replaceBtn = this._register(new SimpleButton({
label: NLS_REPLACE_BTN_LABEL + this._keybindingLabelFor(FIND_IDS.ReplaceOneAction),
className: 'replace',
className: 'codicon codicon-replace',
onTrigger: () => {
this._controller.replace();
},
@@ -1078,7 +1082,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
// Replace all button
this._replaceAllBtn = this._register(new SimpleButton({
label: NLS_REPLACE_ALL_BTN_LABEL + this._keybindingLabelFor(FIND_IDS.ReplaceAllAction),
className: 'replace-all',
className: 'codicon codicon-replace-all',
onTrigger: () => {
this._controller.replaceAll();
}
@@ -1098,7 +1102,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
// Toggle replace button
this._toggleReplaceBtn = this._register(new SimpleButton({
label: NLS_TOGGLE_REPLACE_MODE_BTN_LABEL,
className: 'toggle left',
className: 'codicon toggle left',
onTrigger: () => {
this._state.change({ isReplaceRevealed: !this._isReplaceVisible }, false);
if (this._isReplaceVisible) {
@@ -1108,8 +1112,8 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
this._showViewZone();
}
}));
this._toggleReplaceBtn.toggleClass('expand', this._isReplaceVisible);
this._toggleReplaceBtn.toggleClass('collapse', !this._isReplaceVisible);
this._toggleReplaceBtn.toggleClass('codicon-chevron-down', this._isReplaceVisible);
this._toggleReplaceBtn.toggleClass('codicon-chevron-right', !this._isReplaceVisible);
this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);
// Widget
@@ -1227,7 +1231,7 @@ class SimpleCheckbox extends Widget {
this._checkbox.tabIndex = -1;
this._label = document.createElement('label');
this._label.className = 'label';
this._label.className = 'codicon codicon-selection';
// Connect the label and the checkbox. Checkbox will get checked when the label receives a click.
this._label.htmlFor = this._checkbox.id;
this._label.tabIndex = -1;

View File

@@ -1,3 +0,0 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.0719 8.00005L5.71461 12.3574L6.33333 12.9761L11 8.30941V7.69069L6.33333 3.02402L5.71461 3.64274L10.0719 8.00005Z" fill="#C5C5C5"/>
</svg>

Before

Width:  |  Height:  |  Size: 287 B

View File

@@ -1,3 +0,0 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.0719 8.00005L5.71461 12.3574L6.33333 12.9761L11 8.30941V7.69069L6.33333 3.02402L5.71461 3.64274L10.0719 8.00005Z" fill="#424242"/>
</svg>

Before

Width:  |  Height:  |  Size: 287 B

View File

@@ -1,3 +0,0 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.97603 10.0719L12.3333 5.7146L12.9521 6.33332L8.28539 11L7.66667 11L3 6.33332L3.61872 5.7146L7.97603 10.0719Z" fill="#C5C5C5"/>
</svg>

Before

Width:  |  Height:  |  Size: 282 B

View File

@@ -1,3 +0,0 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.97603 10.0719L12.3333 5.7146L12.9521 6.33332L8.28539 11L7.66667 11L3 6.33332L3.61872 5.7146L7.97603 10.0719Z" fill="#424242"/>
</svg>

Before

Width:  |  Height:  |  Size: 282 B