From 17abfbce18df0d2a9c85687fc31afeb45c215ded Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 15 Sep 2015 22:09:19 +0200 Subject: gl: Base UI sizes on line height. --- platform/gl/gl-font.c | 2 +- platform/gl/gl-main.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'platform') diff --git a/platform/gl/gl-font.c b/platform/gl/gl-font.c index 99c7b236..f744fb48 100644 --- a/platform/gl/gl-font.c +++ b/platform/gl/gl-font.c @@ -23,7 +23,7 @@ #define PADDING 1 /* set to 0 to save some space but disallow arbitrary transforms */ #define MAXGLYPHS 4093 /* prime number for hash table goodness */ -#define CACHESIZE 256 +#define CACHESIZE 1024 #define XPRECISION 4 #define YPRECISION 1 diff --git a/platform/gl/gl-main.c b/platform/gl/gl-main.c index 6a1a5821..96d2ff6d 100644 --- a/platform/gl/gl-main.c +++ b/platform/gl/gl-main.c @@ -475,7 +475,7 @@ static void do_outline(fz_outline *node, int outline_w) int outline_h; int total_h; - outline_w -= 15; + outline_w -= ui.lineheight; outline_h = screen_h; total_h = measure_outline_height(outline); @@ -492,7 +492,7 @@ static void do_outline(fz_outline *node, int outline_w) if (ui.active == id) outline_scroll_y = saved_outline_scroll_y + (saved_ui_y - ui.y) * 5; - ui_scrollbar(outline_w, 0, outline_w+15, outline_h, &outline_scroll_y, outline_h, total_h); + ui_scrollbar(outline_w, 0, outline_w+ui.lineheight, outline_h, &outline_scroll_y, outline_h, total_h); glScissor(0, 0, outline_w, outline_h); glEnable(GL_SCISSOR_TEST); @@ -1018,7 +1018,7 @@ static void run_main_loop(void) showoutline = 0; else { - canvas_x = 300; + canvas_x = ui.lineheight * 16; canvas_w = screen_w - canvas_x; } } -- cgit v1.2.3