From 5ccb41b9b9e84f748278125a9b552efa24911b3c Mon Sep 17 00:00:00 2001 From: meganrogge Date: Tue, 1 Feb 2022 10:32:09 -0600 Subject: [PATCH] re add height and width --- src/browser/renderer/DecorationRenderLayer.ts | 8 ++++---- typings/xterm.d.ts | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/browser/renderer/DecorationRenderLayer.ts b/src/browser/renderer/DecorationRenderLayer.ts index 621b616e..e1476d16 100644 --- a/src/browser/renderer/DecorationRenderLayer.ts +++ b/src/browser/renderer/DecorationRenderLayer.ts @@ -75,16 +75,16 @@ class BufferDecoration extends Disposable implements IDecoration { this._element.classList.add('button-buffer-decoration'); this._element.id = 'button-buffer-decoration-' + this._id; this._element.style.background = color; - this._element.style.width = '24px'; - this._element.style.height = '24px'; + this._element.style.width = '32px'; + this._element.style.height = '32px'; this._element.style.borderRadius = '64px'; this._element.style.border = `4px solid white`; this._element.style.zIndex = '6'; this._element.style.position = 'absolute'; if (decorationOptions.anchor === 'right') { - this._element.style.right = `${decorationOptions.x}px` || '5px'; + this._element.style.right = decorationOptions.x ? `${decorationOptions.x}px` : '5px'; } else { - this._element.style.right = `${decorationOptions.x}px` || '5px'; + this._element.style.right = decorationOptions.x ? `${decorationOptions.x}px` : '5px'; } if (this._container.parentElement && this._element) { this._container.parentElement.append(this._element); diff --git a/typings/xterm.d.ts b/typings/xterm.d.ts index a6ff47ad..a7f80a15 100644 --- a/typings/xterm.d.ts +++ b/typings/xterm.d.ts @@ -451,6 +451,20 @@ declare module 'xterm' { * The x position offset relative to the anchor */ x?: number; + + + /** + * The width of the decoration in cells, which defaults to + * cell width + */ + width?: number; + + /** + * The height of the decoration in cells, which defaults to + * cell height + */ + height?: number; + } export interface IGutterDecorationOptions {