Skip to content
This repository was archived by the owner on May 21, 2019. It is now read-only.

Commit 1f5ad23

Browse files
committed
[Fix] Now paginated outputs that don't use alternate buffer (git log) have correct height.
1 parent 4b97226 commit 1f5ad23

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

src/views/TabComponent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export class Tab {
115115
private get contentSize(): Size {
116116
return {
117117
width: window.innerWidth,
118-
height: window.innerHeight - css.titleBarHeight,
118+
height: window.innerHeight - css.titleBarHeight - css.infoPanelHeight - css.outputPadding,
119119
};
120120
}
121121
}

src/views/css/main.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export interface CSSObject {
5454
}
5555

5656
const fontSize = 14;
57-
const outputPadding = 10;
57+
export const outputPadding = 10;
5858
const promptVerticalPadding = 5;
5959
const promptHorizontalPadding = 10;
6060
const promptHeight = 12 + (2 * promptVerticalPadding);
@@ -64,14 +64,15 @@ const suggestionSize = 2 * fontSize;
6464
const defaultShadow = "0 2px 8px 1px rgba(0, 0, 0, 0.3)";
6565
export const titleBarHeight = 24;
6666
export const rowHeight = fontSize + 4;
67+
export const infoPanelHeight = 2 * fontSize + 4;
6768
export const letterWidth = fontSize / 2 + 1.5;
6869

6970
const infoPanel = {
7071
paddingTop: 8,
7172
paddingRight: 0,
7273
paddingBottom: 6,
7374
paddingLeft: 0.6 * fontSize,
74-
height: 2 * fontSize + 4,
75+
height: infoPanelHeight,
7576
lineHeight: 1.3,
7677
backgroundColor: panelColor,
7778
};
@@ -80,10 +81,6 @@ const inactiveJobs: CSSObject = {
8081
pointerEvents: "none",
8182
};
8283

83-
const commonJobs: CSSObject = {
84-
marginBottom: 40,
85-
};
86-
8784
const icon = {
8885
fontFamily: "FontAwesome",
8986
};
@@ -135,7 +132,7 @@ export const application = {
135132
};
136133

137134
export const jobs = (isSessionActive: boolean): CSSObject =>
138-
isSessionActive ? commonJobs : Object.assign({}, commonJobs, inactiveJobs);
135+
isSessionActive ? {} : Object.assign({}, inactiveJobs);
139136

140137
export const row = (jobStatus: Status, activeBuffer: Buffer) => {
141138
const style: CSSObject = {
@@ -413,7 +410,7 @@ export const output = (buffer: Buffer, status: Status) => {
413410
if (status === Status.InProgress) {
414411
styles.position = "fixed";
415412
styles.top = titleBarHeight;
416-
styles.bottom = 0;
413+
styles.bottom = infoPanelHeight;
417414
styles.left = 0;
418415
styles.right = 0;
419416
styles.zIndex = 4;

0 commit comments

Comments
 (0)