[vte/vte-next: 9/114] Remove sealed char_{a, de}scent from public struct
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte/vte-next: 9/114] Remove sealed char_{a, de}scent from public struct
- Date: Mon, 30 May 2011 17:07:30 +0000 (UTC)
commit c52fa4a64d1909e13074206c4a2bfaba688ecb87
Author: Christian Persch <chpe gnome org>
Date: Mon May 2 20:55:42 2011 +0200
Remove sealed char_{a,de}scent from public struct
src/vte-private.h | 2 ++
src/vte.c | 18 +++++++++---------
src/vte.h | 1 -
3 files changed, 11 insertions(+), 10 deletions(-)
---
diff --git a/src/vte-private.h b/src/vte-private.h
index fc44fa8..13d7c14 100644
--- a/src/vte-private.h
+++ b/src/vte-private.h
@@ -316,6 +316,8 @@ struct _VteTerminalPrivate {
PangoFontDescription *fontdesc;
VteTerminalAntiAlias fontantialias;
gboolean fontdirty;
+ glong char_ascent;
+ glong char_descent;
/* Data used when rendering the text which reflects server resources
* and data, which should be dropped when unrealizing and (re)created
diff --git a/src/vte.c b/src/vte.c
index 0e6cfa8..f70b2de 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -7413,13 +7413,13 @@ vte_terminal_apply_metrics(VteTerminal *terminal,
resize = cresize = TRUE;
terminal->char_height = height;
}
- if (ascent != terminal->char_ascent) {
+ if (ascent != terminal->pvt->char_ascent) {
resize = TRUE;
- terminal->char_ascent = ascent;
+ terminal->pvt->char_ascent = ascent;
}
- if (descent != terminal->char_descent) {
+ if (descent != terminal->pvt->char_descent) {
resize = TRUE;
- terminal->char_descent = descent;
+ terminal->pvt->char_descent = descent;
}
terminal->pvt->line_thickness = line_thickness = MAX (MIN ((height - ascent) / 2, height / 14), 1);
terminal->pvt->underline_position = MIN (ascent + line_thickness, height - line_thickness);
@@ -8041,8 +8041,8 @@ vte_terminal_init(VteTerminal *terminal)
/* Set up dummy metrics, value != 0 to avoid division by 0 */
terminal->char_width = 1;
terminal->char_height = 1;
- terminal->char_ascent = 1;
- terminal->char_descent = 1;
+ terminal->pvt->char_ascent = 1;
+ terminal->pvt->char_descent = 1;
terminal->pvt->line_thickness = 1;
terminal->pvt->underline_position = 1;
terminal->pvt->strikethrough_position = 1;
@@ -9842,7 +9842,7 @@ vte_terminal_draw_cells(VteTerminal *terminal,
fg = &terminal->pvt->palette[fore];
bg = &terminal->pvt->palette[back];
defbg = &terminal->pvt->palette[VTE_DEF_BG];
- ascent = terminal->char_ascent;
+ ascent = terminal->pvt->char_ascent;
i = 0;
do {
@@ -10773,8 +10773,8 @@ vte_terminal_paint_im_preedit_string(VteTerminal *terminal)
/* Keep local copies of rendering information. */
width = terminal->char_width;
height = terminal->char_height;
- ascent = terminal->char_ascent;
- descent = terminal->char_descent;
+ ascent = terminal->pvt->char_ascent;
+ descent = terminal->pvt->char_descent;
delta = screen->scroll_delta;
drow = screen->cursor_current.row;
diff --git a/src/vte.h b/src/vte.h
index 4e514a1..3a6c4dc 100644
--- a/src/vte.h
+++ b/src/vte.h
@@ -70,7 +70,6 @@ struct _VteTerminal {
/* Metric and sizing data. */
glong _VTE_SEAL(char_width), _VTE_SEAL(char_height); /* dimensions of character cells */
- glong _VTE_SEAL(char_ascent), _VTE_SEAL(char_descent); /* important font metrics */
glong _VTE_SEAL(row_count), _VTE_SEAL(column_count); /* dimensions of the window */
/* Titles. */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]