diff --git a/src/app/common/modals/viewremoteconndetail.less b/src/app/common/modals/viewremoteconndetail.less index 2789c8779..48b8a0a58 100644 --- a/src/app/common/modals/viewremoteconndetail.less +++ b/src/app/common/modals/viewremoteconndetail.less @@ -1,7 +1,7 @@ @import "../../../app/common/themes/themes.less"; .rconndetail-modal { - width: 631px; + width: 680px; min-height: 565px; .wave-modal-content { @@ -54,6 +54,8 @@ } .remote-detail { + width: 100%; + .settings-field { display: flex; flex-direction: row; @@ -91,8 +93,9 @@ } .terminal-wrapper { - width: 100%; margin-top: 5px; + overflow-x: scroll; + overflow-y: hidden; .terminal-connectelem { height: 163px !important; // Needed to override plugin height @@ -111,7 +114,6 @@ .xterm-screen { padding: 10px; - width: 541px !important; // Needed to override plugin width } } } diff --git a/src/app/common/modals/viewremoteconndetail.tsx b/src/app/common/modals/viewremoteconndetail.tsx index e4b4aa909..933f293eb 100644 --- a/src/app/common/modals/viewremoteconndetail.tsx +++ b/src/app/common/modals/viewremoteconndetail.tsx @@ -12,12 +12,10 @@ import * as T from "../../../types/types"; import { Modal, Tooltip, Button, Status } from "../elements"; import * as util from "../../../util/util"; import * as textmeasure from "../../../util/textmeasure"; +import * as appconst from "../../appconst"; import "./viewremoteconndetail.less"; -const RemotePtyRows = 9; -const RemotePtyCols = 74; - @mobxReact.observer class ViewRemoteConnDetailModal extends React.Component<{}, {}> { termRef: React.RefObject = React.createRef(); @@ -293,7 +291,7 @@ class ViewRemoteConnDetailModal extends React.Component<{}, {}> { let model = this.model; let isTermFocused = this.model.remoteTermWrapFocus.get(); let termFontSize = GlobalModel.termFontSize.get(); - let termWidth = textmeasure.termWidthFromCols(RemotePtyCols, termFontSize); + let termWidth = textmeasure.termWidthFromCols(appconst.RemotePtyCols, termFontSize); let remoteAliasText = util.isBlank(remote.remotealias) ? "(none)" : remote.remotealias; let selectedRemoteStatus = this.getSelectedRemote().status; @@ -371,7 +369,7 @@ class ViewRemoteConnDetailModal extends React.Component<{}, {}> { ref={this.termRef} data-remoteid={remote.remoteid} style={{ - height: textmeasure.termHeightFromRows(RemotePtyRows, termFontSize), + height: textmeasure.termHeightFromRows(appconst.RemotePtyRows, termFontSize), width: termWidth, }} > diff --git a/src/models/remotes.ts b/src/models/remotes.ts index f1e28f789..3ff4e2d13 100644 --- a/src/models/remotes.ts +++ b/src/models/remotes.ts @@ -12,9 +12,6 @@ import { GlobalCommandRunner } from "./global"; import { Model } from "./model"; import { getTermPtyData } from "../util/modelutil"; -const RemotePtyRows = 8; // also in main.tsx -const RemotePtyCols = 80; - class RemotesModel { globalModel: Model; selectedRemoteId: OV = mobx.observable.box(null, { @@ -180,14 +177,14 @@ class RemotesModel { return; } let termOpts = { - rows: RemotePtyRows, - cols: RemotePtyCols, + rows: appconst.RemotePtyRows, + cols: appconst.RemotePtyCols, flexrows: false, maxptysize: 64 * 1024, }; let termWrap = new TermWrap(elem, { termContext: { remoteId: remoteId }, - usedRows: RemotePtyRows, + usedRows: appconst.RemotePtyRows, termOpts: termOpts, winSize: null, keyHandler: (e, termWrap) => { diff --git a/src/plugins/terminal/terminal.less b/src/plugins/terminal/terminal.less index b653421f8..9f9d63ae9 100644 --- a/src/plugins/terminal/terminal.less +++ b/src/plugins/terminal/terminal.less @@ -3,10 +3,10 @@ .terminal-wrapper { .xterm-viewport { - overflow-y: hidden; + overflow: hidden; } &:hover .xterm-viewport, &:focus-within .xterm-viewport { - overflow-y: auto; + overflow: auto; } }