diff options
author | Vincent Sanders <vince@kyllikki.org> | 2019-08-04 15:17:40 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2019-08-04 15:17:40 +0100 |
commit | 13276f56549f1c03cf485fb39c4f683a3ea4d3c7 (patch) | |
tree | 4838abbf2be5ddf3532e9c3f84132de76f2579a2 /frontends | |
parent | 98f8eaeb31ec77f37fdc30d4a28e889c663c7d3b (diff) | |
download | netsurf-13276f56549f1c03cf485fb39c4f683a3ea4d3c7.tar.gz netsurf-13276f56549f1c03cf485fb39c4f683a3ea4d3c7.tar.bz2 |
make risc os title setting not use shadow scale value
Diffstat (limited to 'frontends')
-rw-r--r-- | frontends/riscos/window.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/frontends/riscos/window.c b/frontends/riscos/window.c index beadf4c41..a92d4c73c 100644 --- a/frontends/riscos/window.c +++ b/frontends/riscos/window.c @@ -3514,20 +3514,24 @@ static void gui_window_destroy(struct gui_window *g) */ static void gui_window_set_title(struct gui_window *g, const char *title) { + float scale; assert(g); assert(title); - if (g->scale != 1.0) { - int scale_disp = g->scale * 100; + scale = browser_window_get_scale(g->bw); - if (ABS((float)scale_disp - g->scale * 100) >= 0.05) + if (scale != 1.0) { + int scale_disp = scale * 100; + + if (ABS((float)scale_disp - scale * 100) >= 0.05) { snprintf(g->title, sizeof g->title, "%s (%.1f%%)", - title, g->scale * 100); - else + title, scale * 100); + } else { snprintf(g->title, sizeof g->title, "%s (%i%%)", title, scale_disp); + } } else { - strncpy(g->title, title, sizeof g->title); + strncpy(g->title, title, sizeof(g->title)); } ro_gui_set_window_title(g->window, g->title); |