1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

struct table bordercolor,bgcolor -> color.(border|background)

This commit is contained in:
Laurent MONIN 2007-10-12 17:10:30 +02:00
parent 367767c500
commit 11dea66ff1
3 changed files with 15 additions and 11 deletions

View File

@ -193,7 +193,7 @@ parse_table_attributes(struct table *table, unsigned char *attr, int real,
{
table->fragment_id = get_attr_val(attr, "id", html_context->doc_cp);
get_bordercolor(html_context, attr, &table->bordercolor);
get_bordercolor(html_context, attr, &table->color.border);
table->width = get_width(attr, "width", real, html_context);
if (table->width == -1) {
@ -245,8 +245,8 @@ parse_table_attributes(struct table *table, unsigned char *attr, int real,
table->align = par_format.align;
get_align(html_context, attr, &table->align);
table->bgcolor = par_format.color.background;
get_bgcolor(html_context, attr, &table->bgcolor);
table->color.background = par_format.color.background;
get_bgcolor(html_context, attr, &table->color.background);
}
@ -567,7 +567,7 @@ parse_table(unsigned char *html, unsigned char *eof, unsigned char **end,
if (!table) return NULL;
parse_table_attributes(table, attr, sh, html_context);
last_bgcolor = table->bgcolor;
last_bgcolor = table->color.background;
se:
en = html;
@ -740,7 +740,7 @@ see:
if (group) group--;
l_al = ALIGN_LEFT;
l_val = VALIGN_MIDDLE;
last_bgcolor = table->bgcolor;
last_bgcolor = table->color.background;
get_align(html_context, t_attr, &l_al);
get_valign(html_context, t_attr, &l_val);
get_bgcolor(html_context, t_attr, &last_bgcolor);

View File

@ -68,12 +68,16 @@ struct table_column {
int width;
};
struct table_colors {
color_T background;
color_T border;
};
struct table {
struct part *part;
struct table_cell *cells;
unsigned char *fragment_id;
color_T bgcolor;
color_T bordercolor;
struct table_colors color;
int align;
struct table_column *columns;

View File

@ -942,7 +942,7 @@ draw_table_cells(struct table *table, int x, int y,
/* Finish the table drawing by aligning the right and bottom edge of
* the table */
x += table->real_width - 1;
expand_lines(html_context, table->part, x, y, table->real_height, table->bgcolor);
expand_lines(html_context, table->part, x, y, table->real_height, table->color.background);
/* Tables are renderer column-wise which breaks forms where the
* form items appears in a column before the actual form tag is
@ -1033,7 +1033,7 @@ draw_frame_point(struct table *table, signed char *frame[2], int x, int y,
+ 27 * int_max(bottom, 0);
draw_frame_hchars(table->part, x, y, 1, border_chars[pos],
par_format.color.background, table->bordercolor,
par_format.color.background, table->color.border,
html_context);
}
@ -1050,7 +1050,7 @@ draw_frame_hline(struct table *table, signed char *frame[2], int x, int y,
if (pos < 0 || table->cols_widths[col] <= 0) return;
draw_frame_hchars(table->part, x, y, table->cols_widths[col], hltable[pos],
par_format.color.background, table->bordercolor, html_context);
par_format.color.background, table->color.border, html_context);
}
static inline void
@ -1066,7 +1066,7 @@ draw_frame_vline(struct table *table, signed char *frame[2], int x, int y,
if (pos < 0 || table->rows_heights[row] <= 0) return;
draw_frame_vchars(table->part, x, y, table->rows_heights[row], vltable[pos],
par_format.color.background, table->bordercolor, html_context);
par_format.color.background, table->color.border, html_context);
}
static inline int