Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Commit e10069a

Browse files
committed
feat(code): full-height background
1 parent 19534c3 commit e10069a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

apps/client/src/widgets/type_widgets/abstract_code_type_widget.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ export default class AbstractCodeTypeWidget extends TypeWidget {
8080

8181
show() {
8282
this.$widget.show();
83+
this.#updateBackgroundColor();
8384
}
8485

8586
focus() {
@@ -97,6 +98,7 @@ export default class AbstractCodeTypeWidget extends TypeWidget {
9798
this.codeEditor.setText("");
9899
});
99100
}
101+
this.#updateBackgroundColor("unset");
100102
}
101103

102104
async executeWithCodeEditorEvent({ resolve, ntxId }: EventData<"executeWithCodeEditor">) {
@@ -117,6 +119,7 @@ export default class AbstractCodeTypeWidget extends TypeWidget {
117119
if (theme) {
118120
await this.codeEditor.setTheme(theme);
119121
}
122+
this.#updateBackgroundColor();
120123
}
121124
}
122125

@@ -125,4 +128,9 @@ export default class AbstractCodeTypeWidget extends TypeWidget {
125128
}
126129
}
127130

131+
#updateBackgroundColor(color?: string) {
132+
const $editorEl = $(this.codeEditor.dom);
133+
this.$widget.closest(".scrolling-container").css("background-color", color ?? $editorEl.css("background-color"));
134+
}
135+
128136
}

0 commit comments

Comments
 (0)