Ejemplo n.º 1
0
 def initial_window_size(cell_width: int, cell_height: int, dpi_x: float, dpi_y: float, xscale: float, yscale: float) -> Tuple[int, int]:
     global window_width, window_height
     monitor_width, monitor_height = glfw_primary_monitor_size()
     if args.edge in {'top', 'bottom'}:
         window_height = cell_height * args.lines + 1
         window_width = monitor_width
     else:
         window_width = cell_width * args.columns + 1
         window_height = monitor_height
     return window_width, window_height
Ejemplo n.º 2
0
Archivo: main.py Proyecto: zkzaza/kitty
 def initial_window_size(cell_width, cell_height, dpi_x, dpi_y, xscale, yscale):
     monitor_width, monitor_height = glfw_primary_monitor_size()
     if args.edge in {'top', 'bottom'}:
         h = initial_window_size_func.height = cell_height * args.lines + 1
         initial_window_size_func.width = monitor_width
         set_smallest_allowed_resize(100, h)
     else:
         w = initial_window_size_func.width = cell_width * args.columns + 1
         initial_window_size_func.height = monitor_height
         set_smallest_allowed_resize(w, 100)
     return initial_window_size_func.width, initial_window_size_func.height
Ejemplo n.º 3
0
 def initial_window_size(cell_width: int, cell_height: int, dpi_x: float,
                         dpi_y: float, xscale: float,
                         yscale: float) -> Tuple[int, int]:
     global window_width, window_height
     monitor_width, monitor_height = glfw_primary_monitor_size()
     if args.edge in {'top', 'bottom'}:
         h = window_height = cell_height * args.lines + 1
         window_width = monitor_width
         set_smallest_allowed_resize(100, h)
     else:
         w = window_width = cell_width * args.columns + 1
         window_height = monitor_height
         set_smallest_allowed_resize(w, 100)
     return window_width, window_height