def layout(self): """Arrange the debug, log, and input windows.""" rows, cols = self.rows, self.cols #app.log.detail('layout', rows, cols) if self.showLogWindow: inputWidth = min(88, cols) debugWidth = max(cols - inputWidth - 1, 0) debugRows = 20 self.debugWindow.reshape(0, inputWidth + 1, debugRows, debugWidth) self.debugUndoWindow.reshape(debugRows, inputWidth + 1, rows - debugRows, debugWidth) self.logWindow.reshape(debugRows, 0, rows - debugRows, inputWidth) rows = debugRows else: inputWidth = cols if 1: # Full screen. for window in self.zOrder: window.reshape(0, 0, rows, inputWidth) else: # Split horizontally. count = len(self.zOrder) eachRows = rows // count for i, window in enumerate(self.zOrder[:-1]): window.reshape(eachRows * i, 0, eachRows, inputWidth) self.zOrder[-1].reshape(eachRows * (count - 1), 0, rows - eachRows * (count - 1), inputWidth)
def layout(self): """Arrange the debug, log, and input windows.""" rows, cols = self.rows, self.cols #app.log.detail('layout', rows, cols) if self.showLogWindow: inputWidth = min(88, cols) debugWidth = max(cols - inputWidth - 1, 0) debugRows = 20 self.debugWindow.reshape(debugRows, debugWidth, 0, inputWidth + 1) self.logWindow.reshape(rows - debugRows, debugWidth, debugRows, inputWidth + 1) else: inputWidth = cols count = len(self.zOrder) eachRows = rows / count for i, window in enumerate(self.zOrder[:-1]): window.reshape(eachRows, inputWidth, eachRows * i, 0) self.zOrder[-1].reshape(rows - eachRows * (count - 1), inputWidth, eachRows * (count - 1), 0)