[vte/vte-next: 9/47] 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/47] Remove sealed char_{a, de}scent from public struct
- Date: Tue, 3 May 2011 00:05:43 +0000 (UTC)
commit 90c061bf6e608eb3fc99de5c7c4cee1a520eaef7
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 c4b3617..1ab99a6 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -7415,13 +7415,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);
@@ -8043,8 +8043,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;
@@ -9844,7 +9844,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 {
@@ -10775,8 +10775,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]