Mercurial > emacs
comparison src/dispnew.c @ 56496:069e4841ceb2
(margin_glyphs_to_reserve): Apply ncols_scale_factor.
(allocate_matrices_for_frame_redisplay): Fix left/right margin mix-up.
(required_matrix_height): Apply nrows_scale_factor.
(required_matrix_width): Apply ncols_scale_factor.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Wed, 21 Jul 2004 21:08:23 +0000 |
parents | 78fbab658433 |
children | f95a8f5985be e657dca8261e b9eee0a7bef5 |
comparison
equal
deleted
inserted
replaced
56495:83d7fd93f208 | 56496:069e4841ceb2 |
---|---|
577 if (NUMBERP (margin)) | 577 if (NUMBERP (margin)) |
578 { | 578 { |
579 int width = XFASTINT (w->total_cols); | 579 int width = XFASTINT (w->total_cols); |
580 double d = max (0, XFLOATINT (margin)); | 580 double d = max (0, XFLOATINT (margin)); |
581 d = min (width / 2 - 1, d); | 581 d = min (width / 2 - 1, d); |
582 n = (int) ((double) total_glyphs / width * d); | 582 n = (int) ((double) total_glyphs / width * d) * w->ncols_scale_factor; |
583 } | 583 } |
584 else | 584 else |
585 n = 0; | 585 n = 0; |
586 | 586 |
587 return n; | 587 return n; |
1909 if (x != w->desired_matrix->matrix_x | 1909 if (x != w->desired_matrix->matrix_x |
1910 || y != w->desired_matrix->matrix_y | 1910 || y != w->desired_matrix->matrix_y |
1911 || dim.width != w->desired_matrix->matrix_w | 1911 || dim.width != w->desired_matrix->matrix_w |
1912 || dim.height != w->desired_matrix->matrix_h | 1912 || dim.height != w->desired_matrix->matrix_h |
1913 || (margin_glyphs_to_reserve (w, dim.width, | 1913 || (margin_glyphs_to_reserve (w, dim.width, |
1914 w->right_margin_cols) | 1914 w->left_margin_cols) |
1915 != w->desired_matrix->left_margin_glyphs) | 1915 != w->desired_matrix->left_margin_glyphs) |
1916 || (margin_glyphs_to_reserve (w, dim.width, | 1916 || (margin_glyphs_to_reserve (w, dim.width, |
1917 w->left_margin_cols) | 1917 w->right_margin_cols) |
1918 != w->desired_matrix->right_margin_glyphs)) | 1918 != w->desired_matrix->right_margin_glyphs)) |
1919 *window_change_flags |= CHANGED_LEAF_MATRIX; | 1919 *window_change_flags |= CHANGED_LEAF_MATRIX; |
1920 | 1920 |
1921 /* Actually change matrices, if allowed. Do not consider | 1921 /* Actually change matrices, if allowed. Do not consider |
1922 CHANGED_LEAF_MATRIX computed above here because the pool | 1922 CHANGED_LEAF_MATRIX computed above here because the pool |
1980 if (FRAME_WINDOW_P (f)) | 1980 if (FRAME_WINDOW_P (f)) |
1981 { | 1981 { |
1982 int ch_height = FRAME_SMALLEST_FONT_HEIGHT (f); | 1982 int ch_height = FRAME_SMALLEST_FONT_HEIGHT (f); |
1983 int window_pixel_height = window_box_height (w) + abs (w->vscroll); | 1983 int window_pixel_height = window_box_height (w) + abs (w->vscroll); |
1984 return (((window_pixel_height + ch_height - 1) | 1984 return (((window_pixel_height + ch_height - 1) |
1985 / ch_height) | 1985 / ch_height) * w->nrows_scale_factor |
1986 /* One partially visible line at the top and | 1986 /* One partially visible line at the top and |
1987 bottom of the window. */ | 1987 bottom of the window. */ |
1988 + 2 | 1988 + 2 |
1989 /* 2 for header and mode line. */ | 1989 /* 2 for header and mode line. */ |
1990 + 2); | 1990 + 2); |
2008 int ch_width = FRAME_SMALLEST_CHAR_WIDTH (f); | 2008 int ch_width = FRAME_SMALLEST_CHAR_WIDTH (f); |
2009 int window_pixel_width = WINDOW_TOTAL_WIDTH (w); | 2009 int window_pixel_width = WINDOW_TOTAL_WIDTH (w); |
2010 | 2010 |
2011 /* Compute number of glyphs needed in a glyph row. */ | 2011 /* Compute number of glyphs needed in a glyph row. */ |
2012 return (((window_pixel_width + ch_width - 1) | 2012 return (((window_pixel_width + ch_width - 1) |
2013 / ch_width) | 2013 / ch_width) * w->ncols_scale_factor |
2014 /* 2 partially visible columns in the text area. */ | 2014 /* 2 partially visible columns in the text area. */ |
2015 + 2 | 2015 + 2 |
2016 /* One partially visible column at the right | 2016 /* One partially visible column at the right |
2017 edge of each marginal area. */ | 2017 edge of each marginal area. */ |
2018 + 1 + 1); | 2018 + 1 + 1); |