1
1
mirror of https://github.com/wez/wezterm.git synced 2024-09-21 11:50:42 +03:00

Use dpi from configuration while resizing

This commit is contained in:
Niclas Hoyer 2023-01-18 23:16:36 +01:00 committed by Wez Furlong
parent 15cd1afbdc
commit 962c10330f

View File

@ -1,6 +1,6 @@
use crate::utilsprites::RenderMetrics;
use ::window::{Dimensions, Window, WindowOps, WindowState};
use config::{ConfigHandle, DimensionContext};
use config::{configuration, ConfigHandle, DimensionContext};
use mux::Mux;
use std::rc::Rc;
use wezterm_font::FontConfiguration;
@ -15,11 +15,15 @@ pub struct RowsAndCols {
impl super::TermWindow {
pub fn resize(
&mut self,
dimensions: Dimensions,
mut dimensions: Dimensions,
window_state: WindowState,
window: &Window,
live_resizing: bool,
) {
// ignore dpi changes if there is a fixed dpi set in configuration
if let Some(dpi) = configuration().dpi {
dimensions.dpi = dpi as usize;
}
log::trace!(
"resize event, live={} current cells: {:?}, current dims: {:?}, new dims: {:?} window_state:{:?}",
live_resizing,