Projects STRLCPY alacritty Commits ae90338b
🤬
  • ■ ■ ■ ■ ■
    CHANGELOG.md
    skipped 13 lines
    14 14  - Support for fractional scaling on Wayland with wp-fractional-scale protocol
    15 15  - Support for running on GLES context
    16 16  - Touchscreen input for click/scroll/select/zoom
     17 +- `window.resize_increments` config option, disabled by default
    17 18   
    18 19  ### Changed
    19 20   
    skipped 1101 lines
  • ■ ■ ■ ■ ■ ■
    alacritty/src/config/window.rs
    skipped 52 lines
    53 53   #[cfg(target_os = "macos")]
    54 54   pub option_as_alt: OptionAsAlt,
    55 55   
     56 + /// Resize increments.
     57 + pub resize_increments: bool,
     58 + 
    56 59   /// Pixel padding.
    57 60   padding: Delta<u8>,
    58 61   
    skipped 15 lines
    74 77   opacity: Default::default(),
    75 78   padding: Default::default(),
    76 79   dimensions: Default::default(),
     80 + resize_increments: Default::default(),
    77 81   #[cfg(target_os = "macos")]
    78 82   option_as_alt: Default::default(),
    79 83   }
    skipped 193 lines
  • ■ ■ ■ ■ ■
    alacritty/src/display/mod.rs
    skipped 469 lines
    470 470   }
    471 471   
    472 472   // Set resize increments for the newly created window.
    473  - window.set_resize_increments(PhysicalSize::new(cell_width, cell_height));
     473 + if config.window.resize_increments {
     474 + window.set_resize_increments(PhysicalSize::new(cell_width, cell_height));
     475 + }
    474 476   
    475 477   window.set_visible(true);
    476 478   
    skipped 169 lines
    646 648   new_size.reserve_lines(message_bar_lines + search_lines);
    647 649   
    648 650   // Update resize increments.
    649  - self.window.set_resize_increments(PhysicalSize::new(cell_width, cell_height));
     651 + if config.window.resize_increments {
     652 + self.window.set_resize_increments(PhysicalSize::new(cell_width, cell_height));
     653 + }
    650 654   
    651 655   // Resize PTY.
    652 656   pty_resize_handle.on_resize(new_size.into());
    skipped 991 lines
  • ■ ■ ■ ■ ■
    alacritty/src/window_context.rs
    skipped 311 lines
    312 312   self.display.pending_update.set_font(font);
    313 313   }
    314 314   
    315  - // Update display if padding options were changed.
     315 + // Update display if either padding options or resize increments were changed.
    316 316   let window_config = &old_config.window;
    317 317   if window_config.padding(1.) != self.config.window.padding(1.)
    318 318   || window_config.dynamic_padding != self.config.window.dynamic_padding
     319 + || window_config.resize_increments != self.config.window.resize_increments
    319 320   {
    320 321   self.display.pending_update.dirty = true;
    321 322   }
    skipped 276 lines
  • ■ ■ ■ ■ ■
    alacritty.yml
    skipped 100 lines
    101 101   # auto pick-up. Set this to `None` to use the default theme variant.
    102 102   #decorations_theme_variant: None
    103 103   
     104 + # Resize increments
     105 + #
     106 + # Prefer resizing window by discrete steps equal to cell dimensions.
     107 + #resize_increments: false
     108 + 
    104 109   # Make `Option` key behave as `Alt` (macOS only):
    105 110   # - OnlyLeft
    106 111   # - OnlyRight
    skipped 801 lines
Please wait...
Page is in error, reload to recover