mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-02 18:39:05 +01:00
Remove 6px padding from terminal block, make scrollbar properly overlay the terminal contents (#1009)
This commit is contained in:
parent
3ae8d693e8
commit
23eda19ead
@ -73,6 +73,7 @@
|
||||
// xterm-decoration-top-layer: 7
|
||||
// xterm-decoration-overview-ruler: 8
|
||||
// xterm-decoration-top: 2
|
||||
--zindex-xterm-viewport-overlay: 5; // Viewport contains the scrollbar
|
||||
|
||||
// modal colors
|
||||
--modal-bg-color: #232323;
|
||||
|
@ -90,8 +90,7 @@ export class FitAddon implements ITerminalAddon, IFitApi {
|
||||
const elementPaddingVer = elementPadding.top + elementPadding.bottom;
|
||||
const elementPaddingHor = elementPadding.right + elementPadding.left;
|
||||
const availableHeight = parentElementHeight - elementPaddingVer;
|
||||
// UPDATED added 6 here (adjustment in xterm.css, right: -6px for scrollbar)
|
||||
const availableWidth = parentElementWidth - elementPaddingHor - scrollbarWidth - 6;
|
||||
const availableWidth = parentElementWidth - elementPaddingHor - scrollbarWidth;
|
||||
const geometry = {
|
||||
cols: Math.max(MINIMUM_COLS, Math.floor(availableWidth / dims.css.cell.width)),
|
||||
rows: Math.max(MINIMUM_ROWS, Math.floor(availableHeight / dims.css.cell.height)),
|
||||
|
@ -119,29 +119,30 @@
|
||||
|
||||
.terminal {
|
||||
.xterm-viewport {
|
||||
right: -7px;
|
||||
}
|
||||
.xterm-viewport::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
}
|
||||
z-index: var(--zindex-xterm-viewport-overlay);
|
||||
|
||||
.xterm-viewport::-webkit-scrollbar-track {
|
||||
background-color: var(--scrollbar-background-color);
|
||||
}
|
||||
|
||||
.xterm-viewport::-webkit-scrollbar-thumb {
|
||||
display: none;
|
||||
background-color: var(--scrollbar-thumb-color);
|
||||
border-radius: 4px;
|
||||
margin: 0 1px 0 1px;
|
||||
|
||||
&:hover {
|
||||
background-color: var(--scrollbar-thumb-hover-color);
|
||||
&::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
}
|
||||
|
||||
&:active {
|
||||
background-color: var(--scrollbar-thumb-active-color);
|
||||
&::-webkit-scrollbar-track {
|
||||
background-color: var(--scrollbar-background-color);
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-thumb {
|
||||
display: none;
|
||||
background-color: var(--scrollbar-thumb-color);
|
||||
border-radius: 4px;
|
||||
margin: 0 1px 0 1px;
|
||||
|
||||
&:hover {
|
||||
background-color: var(--scrollbar-thumb-hover-color);
|
||||
}
|
||||
|
||||
&:active {
|
||||
background-color: var(--scrollbar-thumb-active-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -96,7 +96,7 @@
|
||||
overflow-y: scroll;
|
||||
cursor: default;
|
||||
position: absolute;
|
||||
right: -6px; /* if this gets updated, must update fitaddon.ts */
|
||||
right: 0; /* if this gets updated, must update fitaddon.ts */
|
||||
left: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
|
Loading…
Reference in New Issue
Block a user