Adding light contrast theme (#22028)

* Adding light contrast theme

* fixing oe icons

* Fixing more files

* Converting ep files to support hc light

* Revert "Copy Headers for Selected Columns (#21622)"

This reverts commit f74d6f6d9b.

* Adding more css rules

* Fixing modal

* Fixing azure icons
This commit is contained in:
Aasim Khan
2023-03-06 17:31:27 -08:00
committed by GitHub
parent 29c1f5edd0
commit d3f4f0daa4
61 changed files with 912 additions and 267 deletions

View File

@@ -49,6 +49,7 @@ cell-toolbar-component .carbon-taskbar.monaco-toolbar .monaco-action-bar ul.acti
cell-toolbar-component .codicon.masked-icon,
.vs cell-toolbar-component .codicon.masked-icon,
.vs-dark cell-toolbar-component .codicon.masked-icon,
.hc-black cell-toolbar-component .codicon.masked-icon {
.hc-black cell-toolbar-component .codicon.masked-icon,
.hc-light cell-toolbar-component .codicon.masked-icon {
background-image: none;
}

View File

@@ -44,7 +44,8 @@ code-component .toolbar .carbon-taskbar.monaco-toolbar .monaco-action-bar .codic
background-position: center;
}
.notebook-cell:not(.active):hover code-component .toolbarIconRun {
.notebook-cell:not(.active):hover code-component .toolbarIconRun,
.hc-light .notebook-cell:not(.active):hover code-component .toolbarIconRun {
background-image: url('./media/execute_cell_grey.svg');
}
.vs-dark .notebook-cell:not(.active):hover code-component .toolbarIconRun {

View File

@@ -89,6 +89,18 @@
border-left: none;
}
.hc-light .notebook-preview .showEditorSelection .code-active-line:before {
border-left: 3px solid rgba(111, 195, 223, 0.4);
}
.hc-light .notebook-preview .showEditorSelection .code-line:hover:before {
border-left: 3px solid rgba(111, 195, 223, 0.60);
}
.hc-light .notebook-preview .showEditorSelection .code-line .code-line:hover:before {
border-left: none;
}
.notebook-preview img {
max-width: 100%;
max-height: 100%;
@@ -209,6 +221,14 @@
border-color: rgb(0, 0, 0);
}
.hc-light .notebook-preview pre {
background-color: rgb(255, 255, 255);
}
.hc-light .notebook-preview h1 {
border-color: rgb(255, 255, 255);
}
.notebook-preview table > thead > tr > th {
border-color: rgba(0, 0, 0, 0.69);
}

View File

@@ -107,7 +107,8 @@
}
/* non-preview */
.notebookEditor :not(.in-preview) .codicon.icon-add {
.notebookEditor :not(.in-preview) .codicon.icon-add,
.hc-light .notebookEditor :not(.in-preview) .codicon.icon-add {
background-image: url("./media/light/add.svg");
}
@@ -116,7 +117,8 @@
background-image: url("./media/dark/add_inverse.svg");
}
.notebookEditor :not(.in-preview) .codicon.icon-run-cells {
.notebookEditor :not(.in-preview) .codicon.icon-run-cells,
.hc-light .notebookEditor :not(.in-preview) .codicon.icon-run-cells {
background-image: url("./media/light/run_cells.svg");
}
@@ -125,7 +127,8 @@
background-image: url("./media/dark/run_cells_inverse.svg");
}
.notebookEditor :not(.in-preview) .codicon.icon-trusted {
.notebookEditor :not(.in-preview) .codicon.icon-trusted,
.hc-light .notebookEditor :not(.in-preview) .codicon.icon-trusted {
background-image: url("./media/light/trusted.svg");
}
@@ -133,7 +136,9 @@
.hc-black .notebookEditor :not(.in-preview) .codicon.icon-trusted {
background-image: url("./media/dark/trusted_inverse.svg");
}
.notebookEditor :not(.in-preview) .codicon.icon-notTrusted {
.notebookEditor :not(.in-preview) .codicon.icon-notTrusted,
.hc-light .notebookEditor :not(.in-preview) .codicon.icon-notTrusted {
background-image: url("./media/light/nottrusted.svg");
}
@@ -142,7 +147,8 @@
background-image: url("./media/dark/nottrusted_inverse.svg");
}
.notebookEditor :not(.in-preview) .codicon.icon-show-cells {
.notebookEditor :not(.in-preview) .codicon.icon-show-cells,
.hc-light .notebookEditor :not(.in-preview) .codicon.icon-show-cells {
background-image: url("./media/light/show_code.svg");
}
@@ -151,7 +157,8 @@
background-image: url("./media/dark/show_code_inverse.svg");
}
.notebookEditor :not(.in-preview) .codicon.icon-hide-cells {
.notebookEditor :not(.in-preview) .codicon.icon-hide-cells,
.hc-light .notebookEditor :not(.in-preview) .codicon.icon-hide-cells {
background-image: url("./media/light/hide_code.svg");
}
@@ -160,7 +167,8 @@
background-image: url("./media/dark/hide_code_inverse.svg");
}
.notebookEditor :not(.in-preview) .codicon.icon-clear-results {
.notebookEditor :not(.in-preview) .codicon.icon-clear-results,
.hc-light .notebookEditor :not(.in-preview) .codicon.icon-clear-results {
background-image: url("./media/light/clear_results.svg");
}
@@ -170,6 +178,7 @@
}
.notebookEditor .in-preview .codicon.masked-icon,
.hc-light .nodebookEditor .in-preview .codicon.masked-icon,
.vs-dark .notebookEditor .in-preview .codicon.icon-clear-results,
.hc-black .notebookEditor .in-preview .codicon.icon-clear-results {
background-image: none;
@@ -215,7 +224,8 @@
min-height: 39px;
}
.monaco-workbench .notebook-action.new-notebook {
.monaco-workbench .notebook-action.new-notebook,
.monaco-workbench.hc-light .notebook-action.new-notebook {
background: url("./media/light/new_notebook.svg") center center no-repeat;
}

View File

@@ -72,11 +72,13 @@ export function registerNotebookThemes(overrideEditorThemeSetting: boolean, conf
const hcOutline = theme.getColor(contrastBorder);
if (outline) {
collector.addRule(`
.hc-black .notebookEditor .notebook-cell:not(.active) code-component {
.hc-black .notebookEditor .notebook-cell:not(.active) code-component,
.hc-light .notebookEditor .notebook-cell:not(.active) code-component {
border-color: ${hcOutline};
border-width: 0px 0px 1px 0px;
}
.hc-black .notebookEditor .notebook-cell:not(.active) {
.hc-black .notebookEditor .notebook-cell:not(.active),
.hc-light .notebookEditor .notebook-cell:not(.active) {
outline-color: ${hcOutline};
outline-width: 1px;
outline-style: solid;

View File

@@ -48,7 +48,8 @@
.nb-grid-stack .grid-stack-item .notebook-cell .actionbar .codicon.masked-icon,
.vs .nb-grid-stack .grid-stack-item .notebook-cell .actionbar .codicon.masked-icon,
.vs-dark .nb-grid-stack .grid-stack-item .notebook-cell .actionbar .codicon.masked-icon,
.hc-black .nb-grid-stack .grid-stack-item .notebook-cell .actionbar .codicon.masked-icon {
.hc-black .nb-grid-stack .grid-stack-item .notebook-cell .actionbar .codicon.masked-icon,
.hc-light .nb-grid-stack .grid-stack-item .notebook-cell .actionbar .codicon.masked-icon {
background-image: none;
}

View File

@@ -6,7 +6,7 @@
import { OnInit, Component, Input, Inject, ViewChild, ElementRef, ChangeDetectorRef, forwardRef } from '@angular/core';
import * as azdata from 'azdata';
import { IGridDataProvider, getResultsString, getTableHeaderString } from 'sql/workbench/services/query/common/gridDataProvider';
import { IGridDataProvider, getResultsString } from 'sql/workbench/services/query/common/gridDataProvider';
import { IContextMenuService, IContextViewService } from 'vs/platform/contextview/browser/contextView';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
@@ -410,16 +410,7 @@ export class DataResourceDataProvider implements IGridDataProvider {
let results = await getResultsString(this, selection, includeHeaders, tableView);
this._clipboardService.writeText(results);
} catch (error) {
this._notificationService.error(localize('copyFailed', "Copy failed with error: {0}", getErrorMessage(error)));
}
}
async copyHeaders(selection: Slick.Range[]): Promise<void> {
try {
const results = getTableHeaderString(this, selection);
await this._clipboardService.writeText(results);
} catch (error) {
this._notificationService.error(localize('copyFailed', "Copy failed with error: {0}", getErrorMessage(error)));
this._notificationService.error(localize('copyFailed', "Copy failed with error {0}", getErrorMessage(error)));
}
}