minor hidpi fix

This commit is contained in:
2024-09-23 12:55:35 +02:00
parent 58b6b6ed18
commit 97db71878f
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ async function storeContainers() {
async function cleanContainers() {
if (!(await stat('containers-db.local.json'))) {
storeContainers()
await storeContainers()
}
const raw = JSON.parse(await fs.readFile('containers-db.local.json', 'utf8'))
+3 -3
View File
@@ -62,7 +62,7 @@ export class FitAddon implements ITerminalAddon {
const parentElementHeight = parseInt(parentElementStyle.getPropertyValue('height'))
const parentElementWidth = Math.max(0, parseInt(parentElementStyle.getPropertyValue('width')))
console.log(parentElementWidth, parentElementHeight)
console.log(parentElementWidth, parentElementHeight, core._renderService)
const elementStyle = window.getComputedStyle(this._terminal.element)
const elementPadding = {
@@ -76,8 +76,8 @@ export class FitAddon implements ITerminalAddon {
const availableHeight = parentElementHeight - elementPaddingVer
const availableWidth = parentElementWidth - elementPaddingHor
const geometry = {
cols: Math.floor(availableWidth / core._renderService.dimensions.device.cell.width),
rows: Math.floor(availableHeight / core._renderService.dimensions.device.cell.height),
cols: Math.floor(availableWidth / core._renderService.dimensions.css.cell.width),
rows: Math.floor(availableHeight / core._renderService.dimensions.css.cell.height),
}
return geometry
}