diff --git a/src/sql/workbench/contrib/executionPlan/browser/constants.ts b/src/sql/workbench/contrib/executionPlan/browser/constants.ts index 039ddf87c7..3d72c13acf 100644 --- a/src/sql/workbench/contrib/executionPlan/browser/constants.ts +++ b/src/sql/workbench/contrib/executionPlan/browser/constants.ts @@ -280,10 +280,8 @@ export const splitScreenVerticallyIconClassName = 'ep-split-screen-vertically-ic export const resetZoomIconClassName = 'ep-reset-zoom-icon'; export const executionPlanCompareIconClassName = 'ep-plan-compare-icon'; export const executionPlanComparisonPropertiesDifferent = 'ep-properties-different'; -export const executionPlanComparisonPropertiesRedDownArrow = 'ep-properties-red-down-arrow'; -export const executionPlanComparisonPropertiesGreenDownArrow = 'ep-properties-green-down-arrow'; -export const executionPlanComparisonPropertiesRedUpArrow = 'ep-properties-red-up-arrow'; -export const executionPlanComparisonPropertiesGreenUpArrow = 'ep-properties-green-up-arrow'; +export const executionPlanComparisonPropertiesDownArrow = 'ep-properties-down-arrow'; +export const executionPlanComparisonPropertiesUpArrow = 'ep-properties-up-arrow'; /** * Plan comparison polygon border colors diff --git a/src/sql/workbench/contrib/executionPlan/browser/executionPlanComparisonPropertiesView.ts b/src/sql/workbench/contrib/executionPlan/browser/executionPlanComparisonPropertiesView.ts index 5b89c88cc0..6f54ac390a 100644 --- a/src/sql/workbench/contrib/executionPlan/browser/executionPlanComparisonPropertiesView.ts +++ b/src/sql/workbench/contrib/executionPlan/browser/executionPlanComparisonPropertiesView.ts @@ -12,7 +12,7 @@ import { isString } from 'vs/base/common/types'; import { removeLineBreaks } from 'sql/base/common/strings'; import * as DOM from 'vs/base/browser/dom'; import { InternalExecutionPlanElement } from 'sql/workbench/contrib/executionPlan/browser/azdataGraphView'; -import { executionPlanComparisonPropertiesDifferent, executionPlanComparisonPropertiesGreenDownArrow, executionPlanComparisonPropertiesRedDownArrow, executionPlanComparisonPropertiesGreenUpArrow, executionPlanComparisonPropertiesRedUpArrow } from 'sql/workbench/contrib/executionPlan/browser/constants'; +import { executionPlanComparisonPropertiesDifferent, executionPlanComparisonPropertiesUpArrow, executionPlanComparisonPropertiesDownArrow } from 'sql/workbench/contrib/executionPlan/browser/constants'; import * as sqlExtHostType from 'sql/workbench/api/common/sqlExtHostTypes'; import { TextWithIconColumn } from 'sql/base/browser/ui/table/plugins/textWithIconColumn'; @@ -205,41 +205,22 @@ export class ExecutionPlanComparisonPropertiesView extends ExecutionPlanProperti const topProp = v.topProp; const bottomProp = v.bottomProp; const parentRowCellStyling = 'font-weight: bold'; - let diffIconClass = 'default-bottom-column-cell-styling'; + let diffIconClass = ''; if (topProp && bottomProp) { row['displayOrder'] = v.topProp.displayOrder; if (v.topProp.displayValue !== v.bottomProp.displayValue) { - switch (v.topProp.betterValue) { - case sqlExtHostType.executionPlan.ExecutionPlanGraphElementPropertyBetterValue.None: + switch (v.topProp.dataType) { + case sqlExtHostType.executionPlan.ExecutionPlanGraphElementPropertyDataType.Boolean: diffIconClass = executionPlanComparisonPropertiesDifferent; break; - case sqlExtHostType.executionPlan.ExecutionPlanGraphElementPropertyBetterValue.LowerNumber: - if (parseFloat(v.bottomProp.displayValue) < parseFloat(v.topProp.displayValue)) { - diffIconClass = executionPlanComparisonPropertiesGreenDownArrow; - } else { - diffIconClass = executionPlanComparisonPropertiesRedUpArrow; - } + case sqlExtHostType.executionPlan.ExecutionPlanGraphElementPropertyDataType.Number: + diffIconClass = (parseFloat(v.topProp.displayValue) > parseFloat(v.bottomProp.displayValue)) ? executionPlanComparisonPropertiesDownArrow : executionPlanComparisonPropertiesUpArrow; break; - case sqlExtHostType.executionPlan.ExecutionPlanGraphElementPropertyBetterValue.HigherNumber: - if (parseFloat(v.bottomProp.displayValue) > parseFloat(v.topProp.displayValue)) { - diffIconClass = executionPlanComparisonPropertiesGreenUpArrow; - } else { - diffIconClass = executionPlanComparisonPropertiesRedDownArrow; - } + case sqlExtHostType.executionPlan.ExecutionPlanGraphElementPropertyDataType.String: + diffIconClass = executionPlanComparisonPropertiesDifferent; break; - case sqlExtHostType.executionPlan.ExecutionPlanGraphElementPropertyBetterValue.True: - if (v.bottomProp.displayValue === 'True') { - diffIconClass = executionPlanComparisonPropertiesGreenUpArrow; - } else { - diffIconClass = executionPlanComparisonPropertiesRedDownArrow; - } - break; - case sqlExtHostType.executionPlan.ExecutionPlanGraphElementPropertyBetterValue.False: - if (v.bottomProp.displayValue === 'False') { - diffIconClass = executionPlanComparisonPropertiesGreenDownArrow; - } else { - diffIconClass = executionPlanComparisonPropertiesRedUpArrow; - } + default: + diffIconClass = executionPlanComparisonPropertiesDifferent; break; } } diff --git a/src/sql/workbench/contrib/executionPlan/browser/images/actionIcons/different.svg b/src/sql/workbench/contrib/executionPlan/browser/images/actionIcons/different.svg new file mode 100644 index 0000000000..3b7f815fca --- /dev/null +++ b/src/sql/workbench/contrib/executionPlan/browser/images/actionIcons/different.svg @@ -0,0 +1,68 @@ + + + + + + + + + + + + + diff --git a/src/sql/workbench/contrib/executionPlan/browser/images/actionIcons/differentDark.svg b/src/sql/workbench/contrib/executionPlan/browser/images/actionIcons/differentDark.svg new file mode 100644 index 0000000000..5d6ccfbca2 --- /dev/null +++ b/src/sql/workbench/contrib/executionPlan/browser/images/actionIcons/differentDark.svg @@ -0,0 +1,68 @@ + + + + + + + + + + + + + diff --git a/src/sql/workbench/contrib/executionPlan/browser/images/actionIcons/differentValues.svg b/src/sql/workbench/contrib/executionPlan/browser/images/actionIcons/differentValues.svg deleted file mode 100644 index 2a6f0839ca..0000000000 --- a/src/sql/workbench/contrib/executionPlan/browser/images/actionIcons/differentValues.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/sql/workbench/contrib/executionPlan/browser/images/actionIcons/downArrowBetter.svg b/src/sql/workbench/contrib/executionPlan/browser/images/actionIcons/downArrow.svg similarity index 87% rename from src/sql/workbench/contrib/executionPlan/browser/images/actionIcons/downArrowBetter.svg rename to src/sql/workbench/contrib/executionPlan/browser/images/actionIcons/downArrow.svg index 2be736504e..e379af1cf1 100644 --- a/src/sql/workbench/contrib/executionPlan/browser/images/actionIcons/downArrowBetter.svg +++ b/src/sql/workbench/contrib/executionPlan/browser/images/actionIcons/downArrow.svg @@ -1 +1 @@ - + diff --git a/src/sql/workbench/contrib/executionPlan/browser/images/actionIcons/downArrowWorse.svg b/src/sql/workbench/contrib/executionPlan/browser/images/actionIcons/downArrowDark.svg similarity index 87% rename from src/sql/workbench/contrib/executionPlan/browser/images/actionIcons/downArrowWorse.svg rename to src/sql/workbench/contrib/executionPlan/browser/images/actionIcons/downArrowDark.svg index e9bd826458..2f4806fee1 100644 --- a/src/sql/workbench/contrib/executionPlan/browser/images/actionIcons/downArrowWorse.svg +++ b/src/sql/workbench/contrib/executionPlan/browser/images/actionIcons/downArrowDark.svg @@ -1 +1 @@ - + diff --git a/src/sql/workbench/contrib/executionPlan/browser/images/actionIcons/upArrowWorse.svg b/src/sql/workbench/contrib/executionPlan/browser/images/actionIcons/upArrow.svg similarity index 87% rename from src/sql/workbench/contrib/executionPlan/browser/images/actionIcons/upArrowWorse.svg rename to src/sql/workbench/contrib/executionPlan/browser/images/actionIcons/upArrow.svg index 83349d5877..8f968d0fa8 100644 --- a/src/sql/workbench/contrib/executionPlan/browser/images/actionIcons/upArrowWorse.svg +++ b/src/sql/workbench/contrib/executionPlan/browser/images/actionIcons/upArrow.svg @@ -1 +1 @@ - + diff --git a/src/sql/workbench/contrib/executionPlan/browser/images/actionIcons/upArrowBetter.svg b/src/sql/workbench/contrib/executionPlan/browser/images/actionIcons/upArrowDark.svg similarity index 87% rename from src/sql/workbench/contrib/executionPlan/browser/images/actionIcons/upArrowBetter.svg rename to src/sql/workbench/contrib/executionPlan/browser/images/actionIcons/upArrowDark.svg index d58810ddfc..e3733cfac9 100644 --- a/src/sql/workbench/contrib/executionPlan/browser/images/actionIcons/upArrowBetter.svg +++ b/src/sql/workbench/contrib/executionPlan/browser/images/actionIcons/upArrowDark.svg @@ -1 +1 @@ - + diff --git a/src/sql/workbench/contrib/executionPlan/browser/media/executionPlan.css b/src/sql/workbench/contrib/executionPlan/browser/media/executionPlan.css index d91f9b06ba..60407c78b2 100644 --- a/src/sql/workbench/contrib/executionPlan/browser/media/executionPlan.css +++ b/src/sql/workbench/contrib/executionPlan/browser/media/executionPlan.css @@ -546,7 +546,7 @@ However we always want it to be the width of the container it is resizing. } .eps-container .ep-properties-different { - background-image: url(../images/actionIcons/differentValues.svg); + background-image: url(../images/actionIcons/different.svg); background-size: 16px 16px; background-position: center; background-repeat: no-repeat; @@ -554,8 +554,9 @@ However we always want it to be the width of the container it is resizing. height: auto; } -.eps-container .ep-properties-red-down-arrow { - background-image: url(../images/actionIcons/downArrowWorse.svg); +.vs-dark .eps-container .ep-properties-different, +.hc-black .eps-container .ep-properties-different { + background-image: url(../images/actionIcons/differentDark.svg); background-size: 16px 16px; background-position: center; background-repeat: no-repeat; @@ -563,8 +564,9 @@ However we always want it to be the width of the container it is resizing. height: auto; } -.eps-container .ep-properties-green-down-arrow { - background-image: url(../images/actionIcons/downArrowBetter.svg); + +.eps-container .ep-properties-down-arrow { + background-image: url(../images/actionIcons/downArrow.svg); background-size: 16px 16px; background-position: center; background-repeat: no-repeat; @@ -572,8 +574,9 @@ However we always want it to be the width of the container it is resizing. height: auto; } -.eps-container .ep-properties-red-up-arrow { - background-image: url(../images/actionIcons/upArrowWorse.svg); +.vs-dark .eps-container .ep-properties-down-arrow, +.hc-black .eps-container .ep-properties-down-arrow { + background-image: url(../images/actionIcons/downArrowDark.svg); background-size: 16px 16px; background-position: center; background-repeat: no-repeat; @@ -581,8 +584,18 @@ However we always want it to be the width of the container it is resizing. height: auto; } -.eps-container .ep-properties-green-down-arrow { - background-image: url(../images/actionIcons/downArrowBetter.svg); +.eps-container .ep-properties-up-arrow { + background-image: url(../images/actionIcons/upArrow.svg); + background-size: 16px 16px; + background-position: center; + background-repeat: no-repeat; + width: 16px; + height: auto; +} + +.vs-dark .eps-container .ep-properties-up-arrow, +.hc-black .eps-container .ep-properties-up-arrow { + background-image: url(../images/actionIcons/upArrowDark.svg); background-size: 16px 16px; background-position: center; background-repeat: no-repeat; @@ -736,7 +749,3 @@ However we always want it to be the width of the container it is resizing. .eps-container .comparison-editor .parent-row-styling { font-weight: bold; } - -.eps-container .comparison-editor .default-bottom-column-cell-styling { - padding-left: 0px; -}