mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
10712, 10677 - Fixed focus indicators for both main toolbar and cell … (#10756)
* 10712, 10677 - Fixed focus indicators for both main toolbar and cell toolbar. * Removed duplicated line
This commit is contained in:
@@ -8,6 +8,6 @@
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
.button-menu.masked-pseudo-after.dropdown-arrow:after {
|
.button-menu.masked-pseudo-after.dropdown-arrow:after {
|
||||||
right: -2px;
|
right: 0;
|
||||||
width: 20px;
|
width: 20px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -310,8 +310,10 @@
|
|||||||
|
|
||||||
/* Icons as masked elements for easy theme switching.
|
/* Icons as masked elements for easy theme switching.
|
||||||
Includes non-masked style declarations. */
|
Includes non-masked style declarations. */
|
||||||
.masked-icon {
|
.masked-icon:before {
|
||||||
display: inline-block;
|
content: "";
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
width: 20px;
|
width: 20px;
|
||||||
-webkit-mask-position: center;
|
-webkit-mask-position: center;
|
||||||
@@ -378,7 +380,7 @@ Includes non-masked style declarations. */
|
|||||||
.codicon:not(.masked-icon).icon-expand-cells {
|
.codicon:not(.masked-icon).icon-expand-cells {
|
||||||
background-image: url("action-expand.svg");
|
background-image: url("action-expand.svg");
|
||||||
}
|
}
|
||||||
.codicon.masked-icon.icon-expand-cells {
|
.codicon.masked-icon.icon-expand-cells:before {
|
||||||
background-image: none;
|
background-image: none;
|
||||||
-webkit-mask-image: url("action-expand.svg");
|
-webkit-mask-image: url("action-expand.svg");
|
||||||
mask-image: url("action-expand.svg");
|
mask-image: url("action-expand.svg");
|
||||||
@@ -387,7 +389,7 @@ Includes non-masked style declarations. */
|
|||||||
.codicon:not(.masked-icon).icon-collapse-cells {
|
.codicon:not(.masked-icon).icon-collapse-cells {
|
||||||
background-image: url("action-collapse.svg");
|
background-image: url("action-collapse.svg");
|
||||||
}
|
}
|
||||||
.codicon.masked-icon.icon-collapse-cells {
|
.codicon.masked-icon.icon-collapse-cells:before {
|
||||||
-webkit-mask-image: url("action-collapse.svg");
|
-webkit-mask-image: url("action-collapse.svg");
|
||||||
mask-image: url("action-collapse.svg");
|
mask-image: url("action-collapse.svg");
|
||||||
}
|
}
|
||||||
@@ -395,7 +397,7 @@ Includes non-masked style declarations. */
|
|||||||
.codicon:not(.masked-icon).icon-clear-results {
|
.codicon:not(.masked-icon).icon-clear-results {
|
||||||
background-image: url("clear.svg");
|
background-image: url("clear.svg");
|
||||||
}
|
}
|
||||||
.codicon.masked-icon.icon-clear-results {
|
.codicon.masked-icon.icon-clear-results:before {
|
||||||
-webkit-mask-image: url("clear.svg");
|
-webkit-mask-image: url("clear.svg");
|
||||||
mask-image: url("clear.svg");
|
mask-image: url("clear.svg");
|
||||||
}
|
}
|
||||||
@@ -403,7 +405,7 @@ Includes non-masked style declarations. */
|
|||||||
.codicon:not(.masked-icon).icon-shield {
|
.codicon:not(.masked-icon).icon-shield {
|
||||||
background-image: url("shield.svg");
|
background-image: url("shield.svg");
|
||||||
}
|
}
|
||||||
.codicon.masked-icon.icon-shield {
|
.codicon.masked-icon.icon-shield:before {
|
||||||
-webkit-mask-image: url("shield.svg");
|
-webkit-mask-image: url("shield.svg");
|
||||||
mask-image: url("shield.svg");
|
mask-image: url("shield.svg");
|
||||||
}
|
}
|
||||||
@@ -411,7 +413,7 @@ Includes non-masked style declarations. */
|
|||||||
.codicon:not(.masked-icon).icon-shield-x {
|
.codicon:not(.masked-icon).icon-shield-x {
|
||||||
background-image: url("shield-x.svg");
|
background-image: url("shield-x.svg");
|
||||||
}
|
}
|
||||||
.codicon.masked-icon.icon-shield-x {
|
.codicon.masked-icon.icon-shield-x:before {
|
||||||
-webkit-mask-image: url("shield-x.svg");
|
-webkit-mask-image: url("shield-x.svg");
|
||||||
mask-image: url("shield-x.svg");
|
mask-image: url("shield-x.svg");
|
||||||
}
|
}
|
||||||
@@ -419,7 +421,7 @@ Includes non-masked style declarations. */
|
|||||||
.codicon:not(.masked-icon).packages {
|
.codicon:not(.masked-icon).packages {
|
||||||
background-image: url("packages.svg");
|
background-image: url("packages.svg");
|
||||||
}
|
}
|
||||||
.codicon.masked-icon.packages {
|
.codicon.masked-icon.packages:before {
|
||||||
background-image: none;
|
background-image: none;
|
||||||
-webkit-mask-image: url("packages.svg");
|
-webkit-mask-image: url("packages.svg");
|
||||||
mask-image: url("packages.svg");
|
mask-image: url("packages.svg");
|
||||||
@@ -504,17 +506,17 @@ Includes non-masked style declarations. */
|
|||||||
mask-image: url("markdown.svg");
|
mask-image: url("markdown.svg");
|
||||||
}
|
}
|
||||||
|
|
||||||
.codicon.masked-icon.new {
|
.codicon.masked-icon.new:before {
|
||||||
background-image: none;
|
background-image: none;
|
||||||
-webkit-mask-image: url('new.svg');
|
-webkit-mask-image: url('new.svg');
|
||||||
mask-image: url('new.svg');
|
mask-image: url('new.svg');
|
||||||
}
|
}
|
||||||
.codicon.masked-icon.close {
|
.codicon.masked-icon.close:before {
|
||||||
background-image: none;
|
background-image: none;
|
||||||
-webkit-mask-image: url('close-blue.svg');
|
-webkit-mask-image: url('close-blue.svg');
|
||||||
mask-image: url('close-blue.svg');
|
mask-image: url('close-blue.svg');
|
||||||
}
|
}
|
||||||
.codicon.masked-icon.edit {
|
.codicon.masked-icon.edit:before {
|
||||||
background-image: none;
|
background-image: none;
|
||||||
-webkit-mask-image: url('edit.svg');
|
-webkit-mask-image: url('edit.svg');
|
||||||
mask-image: url('edit.svg');
|
mask-image: url('edit.svg');
|
||||||
@@ -530,12 +532,12 @@ Includes non-masked style declarations. */
|
|||||||
-webkit-mask-image: url('down-arrow-blue.svg');
|
-webkit-mask-image: url('down-arrow-blue.svg');
|
||||||
mask-image: url('down-arrow-blue.svg');
|
mask-image: url('down-arrow-blue.svg');
|
||||||
}
|
}
|
||||||
.codicon.masked-icon.delete {
|
.codicon.masked-icon.delete:before {
|
||||||
background-image: none;
|
background-image: none;
|
||||||
-webkit-mask-image: url('garbage-can-blue.svg');
|
-webkit-mask-image: url('garbage-can-blue.svg');
|
||||||
mask-image: url('garbage-can-blue.svg');
|
mask-image: url('garbage-can-blue.svg');
|
||||||
}
|
}
|
||||||
.codicon.masked-icon.more {
|
.codicon.masked-icon.more:before {
|
||||||
background-image: none;
|
background-image: none;
|
||||||
-webkit-mask-image: url('ellipsis-blue.svg');
|
-webkit-mask-image: url('ellipsis-blue.svg');
|
||||||
mask-image: url('ellipsis-blue.svg');
|
mask-image: url('ellipsis-blue.svg');
|
||||||
@@ -546,7 +548,6 @@ Includes non-masked style declarations. */
|
|||||||
}
|
}
|
||||||
|
|
||||||
.book.codicon {
|
.book.codicon {
|
||||||
|
|
||||||
-webkit-mask-image: url("book_image.svg");
|
-webkit-mask-image: url("book_image.svg");
|
||||||
-webkit-mask-repeat: no-repeat;
|
-webkit-mask-repeat: no-repeat;
|
||||||
-webkit-mask-position: 50% 50%;
|
-webkit-mask-position: 50% 50%;
|
||||||
|
|||||||
@@ -56,6 +56,9 @@ export class CellToolbarComponent {
|
|||||||
this._actionBar = new Taskbar(taskbar);
|
this._actionBar = new Taskbar(taskbar);
|
||||||
this._actionBar.context = context;
|
this._actionBar.context = context;
|
||||||
|
|
||||||
|
let addCellsButton = new AddCellAction('notebook.AddCodeCell', localize('codeCellsPreview', "Add cell"), 'notebook-button masked-pseudo code');
|
||||||
|
addCellsButton.cellType = CellTypes.Code;
|
||||||
|
|
||||||
let addCodeCellButton = new AddCellAction('notebook.AddCodeCell', localize('codePreview', "Code cell"), 'notebook-button masked-pseudo code');
|
let addCodeCellButton = new AddCellAction('notebook.AddCodeCell', localize('codePreview', "Code cell"), 'notebook-button masked-pseudo code');
|
||||||
addCodeCellButton.cellType = CellTypes.Code;
|
addCodeCellButton.cellType = CellTypes.Code;
|
||||||
|
|
||||||
@@ -74,14 +77,14 @@ export class CellToolbarComponent {
|
|||||||
let buttonDropdownContainer = DOM.$('li.action-item');
|
let buttonDropdownContainer = DOM.$('li.action-item');
|
||||||
buttonDropdownContainer.setAttribute('role', 'presentation');
|
buttonDropdownContainer.setAttribute('role', 'presentation');
|
||||||
let dropdownMenuActionViewItem = new DropdownMenuActionViewItem(
|
let dropdownMenuActionViewItem = new DropdownMenuActionViewItem(
|
||||||
addCodeCellButton,
|
addCellsButton,
|
||||||
[addCodeCellButton, addTextCellButton],
|
[addCodeCellButton, addTextCellButton],
|
||||||
this.contextMenuService,
|
this.contextMenuService,
|
||||||
undefined,
|
undefined,
|
||||||
this._actionBar.actionRunner,
|
this._actionBar.actionRunner,
|
||||||
undefined,
|
undefined,
|
||||||
'codicon masked-icon new',
|
'codicon masked-icon new',
|
||||||
localize('addCell', "Cell"),
|
'',
|
||||||
undefined
|
undefined
|
||||||
);
|
);
|
||||||
dropdownMenuActionViewItem.render(buttonDropdownContainer);
|
dropdownMenuActionViewItem.render(buttonDropdownContainer);
|
||||||
|
|||||||
@@ -39,6 +39,15 @@ cell-toolbar-component .monaco-action-bar .action-label {
|
|||||||
}
|
}
|
||||||
cell-toolbar-component ul.actions-container li a.masked-icon {
|
cell-toolbar-component ul.actions-container li a.masked-icon {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
}
|
||||||
|
cell-toolbar-component ul.actions-container li a.masked-icon,
|
||||||
|
cell-toolbar-component ul.actions-container li a.masked-icon:before {
|
||||||
height: 24px;
|
height: 24px;
|
||||||
width: 29px;
|
width: 29px;
|
||||||
}
|
}
|
||||||
|
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 {
|
||||||
|
background-image: none;
|
||||||
|
}
|
||||||
|
|||||||
@@ -37,21 +37,23 @@
|
|||||||
min-height: 21px;
|
min-height: 21px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.notebookEditor .actions-container .action-item .notebook-button {
|
.notebookEditor .editor-toolbar .actions-container .action-item .notebook-button {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 100%;
|
|
||||||
padding: 0px;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding-left: 18px;
|
padding: 0 18px;
|
||||||
background-size: 13px;
|
background-size: 13px;
|
||||||
margin-right: 20px;
|
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
height: 21px;
|
height: 21px;
|
||||||
}
|
}
|
||||||
.notebookEditor .in-preview .actions-container .action-item .notebook-button {
|
.notebookEditor .editor-toolbar .actions-container .action-item .notebook-button.masked-icon {
|
||||||
|
padding: 0;
|
||||||
|
width: 28px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notebookEditor .in-preview .actions-container .action-item .notebook-button,
|
||||||
|
.notebookEditor .in-preview .actions-container .action-item .notebook-button:before {
|
||||||
display: flex;
|
display: flex;
|
||||||
background-size: 16px;
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -66,7 +68,7 @@
|
|||||||
.in-preview
|
.in-preview
|
||||||
.actions-container
|
.actions-container
|
||||||
.action-item
|
.action-item
|
||||||
.notebook-button.masked-icon {
|
.notebook-button.masked-icon:before {
|
||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
padding-left: 18px;
|
padding-left: 18px;
|
||||||
width: 16px;
|
width: 16px;
|
||||||
@@ -175,6 +177,10 @@
|
|||||||
.notebook-button.icon-clear-results {
|
.notebook-button.icon-clear-results {
|
||||||
background-image: url("./media/dark/clear_results_inverse.svg");
|
background-image: url("./media/dark/clear_results_inverse.svg");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.notebookEditor .in-preview .notebook-button.masked-icon {
|
||||||
|
background-image: none;
|
||||||
|
}
|
||||||
/* non-preview */
|
/* non-preview */
|
||||||
|
|
||||||
.notebookEditor .in-preview .carbon-taskbar.monaco-toolbar .monaco-select-box {
|
.notebookEditor .in-preview .carbon-taskbar.monaco-toolbar .monaco-select-box {
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ export function registerNotebookThemes(overrideEditorThemeSetting: boolean, conf
|
|||||||
//Notebook toolbar masked icons
|
//Notebook toolbar masked icons
|
||||||
const notebookToolbarIconColor = theme.getColor(notebookToolbarIcon);
|
const notebookToolbarIconColor = theme.getColor(notebookToolbarIcon);
|
||||||
if (notebookToolbarIconColor) {
|
if (notebookToolbarIconColor) {
|
||||||
collector.addRule(`.notebookEditor .notebook-button.masked-icon { background-color: ${notebookToolbarIconColor};}`);
|
collector.addRule(`.notebookEditor .notebook-button.masked-icon:before { background-color: ${notebookToolbarIconColor};}`);
|
||||||
collector.addRule(`.notebookEditor .notebook-button.masked-pseudo:before { background-color: ${notebookToolbarIconColor};}`);
|
collector.addRule(`.notebookEditor .notebook-button.masked-pseudo:before { background-color: ${notebookToolbarIconColor};}`);
|
||||||
}
|
}
|
||||||
const notebookToolbarLinesColor = theme.getColor(notebookToolbarLines);
|
const notebookToolbarLinesColor = theme.getColor(notebookToolbarLines);
|
||||||
@@ -172,7 +172,7 @@ export function registerNotebookThemes(overrideEditorThemeSetting: boolean, conf
|
|||||||
if (cellBorderColor) {
|
if (cellBorderColor) {
|
||||||
collector.addRule(`.notebookEditor .notebook-cell.active { border-color: ${cellBorderColor};}`);
|
collector.addRule(`.notebookEditor .notebook-cell.active { border-color: ${cellBorderColor};}`);
|
||||||
collector.addRule(`.notebookEditor .notebook-cell.active cell-toolbar-component { border-color: ${cellBorderColor};}`);
|
collector.addRule(`.notebookEditor .notebook-cell.active cell-toolbar-component { border-color: ${cellBorderColor};}`);
|
||||||
collector.addRule(`.notebookEditor .notebook-cell.active cell-toolbar-component .codicon { background-color: ${cellBorderColor};}`);
|
collector.addRule(`.notebookEditor .notebook-cell.active cell-toolbar-component .codicon:before { background-color: ${cellBorderColor};}`);
|
||||||
}
|
}
|
||||||
// Cell toolbar background
|
// Cell toolbar background
|
||||||
const notebookToolbarSelectBackgroundColor = theme.getColor(notebookToolbarSelectBackground);
|
const notebookToolbarSelectBackgroundColor = theme.getColor(notebookToolbarSelectBackground);
|
||||||
|
|||||||
Reference in New Issue
Block a user