remove action columnExpand

This commit is contained in:
Peter Fajdiga
2023-07-07 14:37:24 +02:00
parent 0fbb0fe90e
commit 81ef0e0442
3 changed files with 0 additions and 27 deletions

View File

@@ -168,13 +168,6 @@ function initActions(world: World) {
});
},
columnExpand: () => {
world.doIfTiledFocused(false, (window, column, grid) => {
column.expand();
grid.container.arrange();
});
},
columnWidthIncrease: () => {
world.doIfTiledFocused(false, (window, column, grid) => {
grid.increaseColumnWidth(column);

View File

@@ -110,13 +110,6 @@ const keyBindings: KeyBinding[] = [
"defaultKeySequence": "Meta+Ctrl+Shift+End",
"action": "columnMoveEnd",
},
{
"name": "column-expand",
"description": "Expand column",
"comment": "Expands focused column horizontally to fill the screen",
"defaultKeySequence": "Meta+Ctrl+X",
"action": "columnExpand",
},
{
"name": "column-width-increase",
"description": "Increase column width",

View File

@@ -5,7 +5,6 @@ class Column {
private readonly windows: LinkedList<Window>;
private stacked: boolean;
private focusTaker: Window|null;
private widthBeforeExpand: number;
private static readonly minWidth = 10;
constructor(grid: Grid, prevColumn: Column|null) {
@@ -14,7 +13,6 @@ class Column {
this.windows = new LinkedList();
this.stacked = grid.container.world.config.stackColumnsByDefault;
this.focusTaker = null;
this.widthBeforeExpand = 0;
this.grid = grid;
this.grid.onColumnAdded(this, prevColumn);
}
@@ -118,17 +116,6 @@ class Column {
return this.gridX + this.width;
}
expand() {
const maxWidth = this.getMaxWidth();
const isAlreadyExpanded = this.width === maxWidth && this.widthBeforeExpand > 0;
if (isAlreadyExpanded) {
this.setWidth(this.widthBeforeExpand, false);
} else {
this.widthBeforeExpand = this.width;
this.setWidth(maxWidth, false);
}
}
adjustWindowHeight(window: Window, heightDelta: number, top: boolean) {
const otherWindow = top ? this.windows.getPrev(window) : this.windows.getNext(window);
if (otherWindow === null) {