mirror of
https://github.com/rkd77/elinks.git
synced 2025-01-03 14:57:44 -05:00
[document] Added cell_width and cell_height to document options
This commit is contained in:
parent
721d7795cf
commit
c8f55f5df0
@ -114,6 +114,13 @@ init_document_options(struct session *ses, struct document_options *doo)
|
||||
doo->image_link.display_style = get_opt_int("document.browse.images.display_style", ses);
|
||||
doo->image_link.tagging = get_opt_int("document.browse.images.image_link_tagging", ses);
|
||||
doo->image_link.show_any_as_links = get_opt_bool("document.browse.images.show_any_as_links", ses);
|
||||
#ifdef CONFIG_LIBSIXEL
|
||||
if (ses && ses->tab->term) {
|
||||
doo->cell_width = ses->tab->term->cell_width;
|
||||
doo->cell_height = ses->tab->term->cell_height;
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -62,7 +62,10 @@ struct document_options {
|
||||
int meta_link_display;
|
||||
int default_form_input_size;
|
||||
int document_width;
|
||||
|
||||
#ifdef CONFIG_LIBSIXEL
|
||||
int cell_width;
|
||||
int cell_height;
|
||||
#endif
|
||||
/** @name The default (fallback) colors.
|
||||
* @{ */
|
||||
struct text_style default_style;
|
||||
|
@ -849,7 +849,7 @@ add_image_to_document(struct document *doc, struct string *pixels, int lineno)
|
||||
im->height = height;
|
||||
add_string_to_string(&im->pixels, pixels);
|
||||
|
||||
ile = (height + 12) / 13;
|
||||
ile = (height + doc->options.cell_height - 1) / doc->options.cell_height;
|
||||
add_to_list(doc->images, im);
|
||||
end:
|
||||
sixel_frame_unref(frame);
|
||||
|
Loading…
Reference in New Issue
Block a user