more polish

This commit is contained in:
meganrogge
2022-01-30 00:36:31 -06:00
parent d7854bc154
commit 9b4801fb43
2 changed files with 4 additions and 5 deletions
+2 -2
View File
@@ -76,8 +76,8 @@ pre {
background-color: #ddd; background-color: #ddd;
} }
.decoration:hover, .button-buffer-decoration:hover,
.decoration:focus { .button-buffer-decoration:focus {
box-shadow: 0 0.5em 0.5em -0.4em var(--hover); box-shadow: 0 0.5em 0.5em -0.4em var(--hover);
transform: translateY(-0.25em); transform: translateY(-0.25em);
} }
@@ -14,7 +14,7 @@ import { IBufferService, IOptionsService } from 'common/services/Services';
import { IBufferDecorationOptions, IDecoration, IEvent, IGutterDecorationOptions } from 'xterm'; import { IBufferDecorationOptions, IDecoration, IEvent, IGutterDecorationOptions } from 'xterm';
const enum DefaultButton { const enum DefaultButton {
COLOR = '#4B9CD3' COLOR = '#5DA5D5'
} }
export class DecorationRenderLayer extends BaseRenderLayer { export class DecorationRenderLayer extends BaseRenderLayer {
constructor( constructor(
@@ -28,7 +28,6 @@ export class DecorationRenderLayer extends BaseRenderLayer {
) { ) {
super(container, 'decoration', zIndex, true, colors, rendererId, bufferService, optionsService); super(container, 'decoration', zIndex, true, colors, rendererId, bufferService, optionsService);
this.registerDecoration({ startMarker: new Marker(1), shape: 'button' }); this.registerDecoration({ startMarker: new Marker(1), shape: 'button' });
this._onRequestRedraw.fire({ start: this._bufferService.buffer.y, end: this._bufferService.buffer.y });
} }
public reset(): void { public reset(): void {
@@ -82,7 +81,7 @@ class BufferDecoration extends Disposable implements IDecoration {
this._element.style.position = 'absolute'; this._element.style.position = 'absolute';
this._element.style.top = '0px'; this._element.style.top = '0px';
this._element.style.right = '5px'; this._element.style.right = '5px';
addDisposableDomListener(this._element, 'click', e => console.log('circle')); addDisposableDomListener(this._element, 'click', () => console.log('circle'));
container.parentElement!.append(this._element); container.parentElement!.append(this._element);
this._onRender.fire(this._element); this._onRender.fire(this._element);
} else { } else {