theme service imported in order to access it

This commit is contained in:
Aiday Marlen Kyzy
2023-02-15 14:16:38 +01:00
parent 6f5202cd2d
commit 1fdb84ed57
3 changed files with 15 additions and 2 deletions
@@ -22,6 +22,14 @@
width : 100%;
}
.monaco-editor .sticky-line-root-high-contrast-dark {
border-bottom: 1px solid white;
}
.monaco-editor .sticky-line-root-high-contrast-light {
border-bottom: 1px solid black;
}
.monaco-editor .sticky-line-root:hover {
background-color: var(--vscode-editorStickyScrollHover-background);
cursor : pointer;
@@ -15,6 +15,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
import * as dom from 'vs/base/browser/dom';
import { IContextMenuService } from 'vs/platform/contextview/browser/contextView';
import { MenuId } from 'vs/platform/actions/common/actions';
// import { IThemeService } from 'vs/platform/theme/common/themeService';
export class StickyScrollController extends Disposable implements IEditorContribution {
@@ -32,10 +33,11 @@ export class StickyScrollController extends Disposable implements IEditorContrib
@IContextMenuService private readonly _contextMenuService: IContextMenuService,
@ILanguageFeaturesService languageFeaturesService: ILanguageFeaturesService,
@IInstantiationService instaService: IInstantiationService,
// @IThemeService themeService: IThemeService
) {
super();
this._stickyScrollWidget = new StickyScrollWidget(this._editor, languageFeaturesService, instaService);
this._stickyScrollWidget = new StickyScrollWidget(this._editor, languageFeaturesService, instaService); // themeService);
this._stickyLineCandidateProvider = new StickyLineCandidateProvider(this._editor, languageFeaturesService);
this._widgetState = new StickyScrollWidgetState([], 0);
@@ -20,6 +20,7 @@ import { IRange, Range } from 'vs/editor/common/core/range';
import { StandardMouseEvent } from 'vs/base/browser/mouseEvent';
import 'vs/css!./stickyScroll';
import { EmbeddedCodeEditorWidget } from 'vs/editor/browser/widget/embeddedCodeEditorWidget';
// import { IThemeService } from 'vs/platform/theme/common/themeService';
interface CustomMouseEvent {
detail: string;
@@ -51,7 +52,8 @@ export class StickyScrollWidget extends Disposable implements IOverlayWidget {
constructor(
private readonly _editor: ICodeEditor,
@ILanguageFeaturesService private readonly _languageFeatureService: ILanguageFeaturesService,
@IInstantiationService private readonly _instaService: IInstantiationService
@IInstantiationService private readonly _instaService: IInstantiationService,
// @IThemeService private readonly _themeService: IThemeService
) {
super();
this._layoutInfo = this._editor.getLayoutInfo();
@@ -249,6 +251,7 @@ export class StickyScrollWidget extends Disposable implements IOverlayWidget {
child.appendChild(lineHTMLNode);
child.className = 'sticky-line-root';
// console.log('this._themeService.getColorTheme() : ', this._themeService.getColorTheme());
child.style.lineHeight = `${lineHeight}px`;
child.style.width = `${width}px`;
child.style.height = `${lineHeight}px`;