From 26bf10d9a4f9b98bc853cdfdb77f65388525e68b Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 18 May 2017 07:26:55 +0200 Subject: [PATCH] Theme: inconsistency for text field inside extensions sidebar (fixes #26798) --- src/vs/base/browser/ui/progressbar/progressbar.css | 8 -------- .../referenceSearch/browser/referencesWidget.css | 10 ---------- .../referenceSearch/browser/referencesWidget.ts | 10 +++++++--- .../editor/contrib/rename/browser/renameInputField.ts | 4 ++-- .../extensions/electron-browser/extensionsViewlet.ts | 11 +++++------ 5 files changed, 14 insertions(+), 29 deletions(-) diff --git a/src/vs/base/browser/ui/progressbar/progressbar.css b/src/vs/base/browser/ui/progressbar/progressbar.css index 511f186b224..cd910840fb8 100644 --- a/src/vs/base/browser/ui/progressbar/progressbar.css +++ b/src/vs/base/browser/ui/progressbar/progressbar.css @@ -51,14 +51,6 @@ -moz-animation-timing-function: linear; } -.progress-container.infinite.done .progress-bit { - transition: opacity 200ms linear; - -webkit-transition: opacity 200ms linear; - -o-transition: opacity 200ms linear; - -moz-transition: opacity 200ms linear; - -ms-transition: opacity 200ms linear; -} - @keyframes progress { from { left: 0; width: 2%; } 50% { left: 50%; width: 5%; } to { left: 98%; width: 2%; } } @-ms-keyframes progress { from { left: 0; width: 2%; } 50% { left: 50%; width: 5%; } to { left: 98%; width: 2%; } } @-webkit-keyframes progress { from { left: 0; width: 2%; } 50% { left: 50%; width: 5%; } to { left: 98%; width: 2%; } } diff --git a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.css b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.css index 54a5b82fa70..4ef06b9f902 100644 --- a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.css +++ b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.css @@ -61,12 +61,6 @@ line-height: 22px; } -.monaco-editor .reference-zone-widget .ref-tree .reference-file .directory { - opacity: 0.7; - margin-left: 0.5em; - font-size: 0.9em; -} - .monaco-editor .reference-zone-widget .monaco-count-badge { margin-right: 12px; } @@ -96,8 +90,4 @@ .monaco-editor.hc-black .reference-zone-widget .ref-tree .reference-file { line-height: 20px; font-weight: bold; -} - -.monaco-editor.hc-black .reference-zone-widget .ref-tree .reference-file .directory { - font-weight: normal; } \ No newline at end of file diff --git a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts index cc8ae4a72ec..cd68e923530 100644 --- a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts +++ b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts @@ -27,7 +27,7 @@ import { LeftRightWidget } from 'vs/base/browser/ui/leftRightWidget/leftRightWid import * as tree from 'vs/base/parts/tree/browser/tree'; import { DefaultController, LegacyRenderer } from 'vs/base/parts/tree/browser/treeDefaults'; import { Tree } from 'vs/base/parts/tree/browser/treeImpl'; -import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; +import { IInstantiationService, optional } from 'vs/platform/instantiation/common/instantiation'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { Range, IRange } from 'vs/editor/common/core/range'; @@ -43,6 +43,7 @@ import { registerThemingParticipant, ITheme, IThemeService } from 'vs/platform/t import { attachListStyler, attachBadgeStyler } from 'vs/platform/theme/common/styler'; import { IModelDecorationsChangedEvent } from 'vs/editor/common/model/textModelEvents'; import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; +import { IEnvironmentService } from "vs/platform/environment/common/environment"; class DecorationsManager implements IDisposable { @@ -345,15 +346,18 @@ class Controller extends DefaultController { class Renderer extends LegacyRenderer { private _contextService: IWorkspaceContextService; private _themeService: IThemeService; + private _environmentService: IEnvironmentService; constructor( @IWorkspaceContextService contextService: IWorkspaceContextService, - @IThemeService themeService: IThemeService + @IThemeService themeService: IThemeService, + @optional(IEnvironmentService) environmentService: IEnvironmentService ) { super(); this._contextService = contextService; this._themeService = themeService; + this._environmentService = environmentService; } public getHeight(tree: tree.ITree, element: any): number { @@ -371,7 +375,7 @@ class Renderer extends LegacyRenderer { /* tslint:disable:no-unused-expression */ new LeftRightWidget(fileReferencesContainer, (left: HTMLElement) => { - const label = new FileLabel(left, element.uri, this._contextService); + const label = new FileLabel(left, element.uri, this._contextService, this._environmentService); toDispose.push(label); return null; diff --git a/src/vs/editor/contrib/rename/browser/renameInputField.ts b/src/vs/editor/contrib/rename/browser/renameInputField.ts index 020bfe66665..11564d8e05a 100644 --- a/src/vs/editor/contrib/rename/browser/renameInputField.ts +++ b/src/vs/editor/contrib/rename/browser/renameInputField.ts @@ -13,7 +13,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { Range } from 'vs/editor/common/core/range'; import { ContentWidgetPositionPreference, ICodeEditor, IContentWidget, IContentWidgetPosition } from 'vs/editor/browser/editorBrowser'; import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService'; -import { inputBackground, inputBorder, inputForeground, widgetShadow, focusBorder } from 'vs/platform/theme/common/colorRegistry'; +import { inputBackground, inputBorder, inputForeground, widgetShadow } from 'vs/platform/theme/common/colorRegistry'; import { Position } from 'vs/editor/common/core/position'; export default class RenameInputField implements IContentWidget, IDisposable { @@ -79,7 +79,7 @@ export default class RenameInputField implements IContentWidget, IDisposable { const background = theme.getColor(inputBackground); const foreground = theme.getColor(inputForeground); const widgetShadowColor = theme.getColor(widgetShadow); - const border = theme.getColor(inputBorder) || theme.getColor(focusBorder); + const border = theme.getColor(inputBorder); this._inputField.style.backgroundColor = background ? background.toString() : null; this._inputField.style.color = foreground ? foreground.toString() : null; diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.ts b/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.ts index eddc26ea885..59764a21fb6 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.ts @@ -50,7 +50,7 @@ import { IActivityBarService, ProgressBadge, NumberBadge } from 'vs/workbench/se import { IExtensionService } from 'vs/platform/extensions/common/extensions'; import { IModeService } from 'vs/editor/common/services/modeService'; import { IThemeService } from 'vs/platform/theme/common/themeService'; -import { inputForeground, inputBackground, contrastBorder } from 'vs/platform/theme/common/colorRegistry'; +import { inputForeground, inputBackground, inputBorder } from 'vs/platform/theme/common/colorRegistry'; import { attachListStyler } from 'vs/platform/theme/common/styler'; interface SearchInputEvent extends Event { @@ -146,14 +146,13 @@ export class ExtensionsViewlet extends Viewlet implements IExtensionsViewlet { public updateStyles(): void { super.updateStyles(); - const contrastBorderColor = this.getColor(contrastBorder); - this.searchBox.style.backgroundColor = this.getColor(inputBackground); this.searchBox.style.color = this.getColor(inputForeground); - this.searchBox.style.borderWidth = contrastBorderColor ? '1px' : null; - this.searchBox.style.borderStyle = contrastBorderColor ? 'solid' : null; - this.searchBox.style.borderColor = contrastBorderColor; + const inputBorderColor = this.getColor(inputBorder); + this.searchBox.style.borderWidth = inputBorderColor ? '1px' : null; + this.searchBox.style.borderStyle = inputBorderColor ? 'solid' : null; + this.searchBox.style.borderColor = inputBorderColor; } setVisible(visible: boolean): TPromise { -- GitLab