[gnumeric] GnmFont: avoid scaling when zoom is 1.
- From: Morten Welinder <mortenw src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnumeric] GnmFont: avoid scaling when zoom is 1.
- Date: Fri, 11 Sep 2009 17:13:04 +0000 (UTC)
commit 4e681c3efab8e686314c75256e402ea027ccd353
Author: Morten Welinder <terra gnome org>
Date: Fri Sep 11 13:12:27 2009 -0400
GnmFont: avoid scaling when zoom is 1.
ChangeLog | 3 +++
src/cell-draw.c | 6 +-----
src/mstyle.c | 4 +++-
3 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 5b29c1b..66d3c48 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2009-09-11 Morten Welinder <terra gnome org>
+ * src/mstyle.c (gnm_style_get_pango_attrs): Don't scale if zoom is
+ 1.
+
* src/cell.c (gnm_cell_unrender, gnm_cell_get_rendered_value,
gnm_cell_fetch_rendered_value): New functions.
diff --git a/src/cell-draw.c b/src/cell-draw.c
index bb8ee25..c0ca76a 100644
--- a/src/cell-draw.c
+++ b/src/cell-draw.c
@@ -292,11 +292,7 @@ cell_draw (GnmCell const *cell, cairo_t *cr,
height -= GNM_ROW_MARGIN + GNM_ROW_MARGIN + 1;
width -= GNM_COL_MARGIN + GNM_COL_MARGIN + 1;
- /* render as necessary */
- if (cell->rendered_value == NULL)
- gnm_cell_render_value ((GnmCell *)cell, TRUE);
-
- rv = cell->rendered_value;
+ rv = gnm_cell_fetch_rendered_value (cell, TRUE);
if (cell_calc_layout (cell, rv, +1,
width * PANGO_SCALE,
diff --git a/src/mstyle.c b/src/mstyle.c
index 2cef59f..aab48e4 100644
--- a/src/mstyle.c
+++ b/src/mstyle.c
@@ -1700,7 +1700,9 @@ gnm_style_get_pango_attrs (GnmStyle const *style,
add_attr (l, pango_attr_font_desc_new (font->go.font->desc));
}
- add_attr (l, pango_attr_scale_new (zoom));
+ if (zoom != 1)
+ add_attr (l, pango_attr_scale_new (zoom));
+
pango_attr_list_ref (l);
return l;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]