-
Hello, We are currently upgrading an application from xterm version 4.14.1 to 5.1.0 and we are unable to get the selectionBackground to display transparently similar to the canvas mode. Application overview: In the older version the rendereType was by default Canvas. Since this is now an addon, with xterm-addon-canvas, the selection background shows properly, but some of the CHUI features were not working. i.e. in the screenshot below, the selection is as expected, however, below the cursor the user prompts should display the field for user to enter the data (it only appears as the user types) We were able to fix this issue with xterm-addon-webgl, which according to texts was recommended as well. However, with this the selectionBackground changes and is not the expected outcome. xterm-addon-webgl rendering output: selectionBackground and other colors are set with themes option after terminal.open. Any specific options that needs to be set/changed in order for selectionBackground to display similar to the canvas addon? Note: we can see there are similar issues reported in the past but marked as fixed with #2952 Thank you in advance, looking forward for some good news..! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
For the webgl renderer we use an opaque version of the background that's blended with the default background: xterm.js/src/browser/services/ThemeService.ts Lines 104 to 107 in 5b05d45 It doesn't currently blend with the actual background and that's generally a good thing for accessibility reasons, by ensuring an opaque background color (and optionally foreground too) you can better control contrast. |
Beta Was this translation helpful? Give feedback.
@isubasin thats by design, the internal opaque and transparent values try use a best guess value depending on what the theme is. The values then may or may not be used depending on the renderer type.