summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
Diffstat (limited to 'desktop')
-rw-r--r--desktop/print.c9
-rw-r--r--desktop/textarea.c4
2 files changed, 6 insertions, 7 deletions
diff --git a/desktop/print.c b/desktop/print.c
index 995f1bf73..fbc0c4790 100644
--- a/desktop/print.c
+++ b/desktop/print.c
@@ -68,11 +68,12 @@ bool print_basic_run(hlcache_handle *content,
assert(content != NULL && printer != NULL && settings != NULL);
- if (!print_set_up(content, printer, settings, NULL))
- ret = false;
+ if (print_set_up(content, printer, settings, NULL))
+ return false;
- while (ret && (done_height < content_get_height(printed_content)) )
+ while (ret && (done_height < content_get_height(printed_content)) ) {
ret = print_draw_next_page(printer, settings);
+ }
print_cleanup(content, printer, settings);
@@ -95,7 +96,7 @@ bool print_set_up(hlcache_handle *content,
{
printed_content = print_init(content, settings);
- if (!printed_content)
+ if (printed_content == NULL)
return false;
print_apply_settings(printed_content, settings);
diff --git a/desktop/textarea.c b/desktop/textarea.c
index 5450dde64..2feef0e6c 100644
--- a/desktop/textarea.c
+++ b/desktop/textarea.c
@@ -178,9 +178,7 @@ struct text_area *textarea_create(int width, int height,
ret->fstyle = *style;
- ret->line_height = FIXTOINT(FDIVI((FMUL(FLTTOFIX(1.2),
- FMULI(nscss_screen_dpi,
- (style->size / FONT_SIZE_SCALE)))), 72));
+ ret->line_height = FIXTOINT(FDIV((FMUL(FLTTOFIX(1.2), FMUL(nscss_screen_dpi, INTTOFIX((style->size / FONT_SIZE_SCALE))))), F_72));
ret->caret_pos.line = ret->caret_pos.char_off = 0;
ret->caret_x = MARGIN_LEFT;