mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-19 10:42:36 +03:00
make risc os title setting not use shadow scale value
This commit is contained in:
parent
98f8eaeb31
commit
13276f5654
@ -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)
|
static void gui_window_set_title(struct gui_window *g, const char *title)
|
||||||
{
|
{
|
||||||
|
float scale;
|
||||||
assert(g);
|
assert(g);
|
||||||
assert(title);
|
assert(title);
|
||||||
|
|
||||||
if (g->scale != 1.0) {
|
scale = browser_window_get_scale(g->bw);
|
||||||
int scale_disp = g->scale * 100;
|
|
||||||
|
|
||||||
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%%)",
|
snprintf(g->title, sizeof g->title, "%s (%.1f%%)",
|
||||||
title, g->scale * 100);
|
title, scale * 100);
|
||||||
else
|
} else {
|
||||||
snprintf(g->title, sizeof g->title, "%s (%i%%)",
|
snprintf(g->title, sizeof g->title, "%s (%i%%)",
|
||||||
title, scale_disp);
|
title, scale_disp);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
strncpy(g->title, title, sizeof g->title);
|
strncpy(g->title, title, sizeof(g->title));
|
||||||
}
|
}
|
||||||
|
|
||||||
ro_gui_set_window_title(g->window, g->title);
|
ro_gui_set_window_title(g->window, g->title);
|
||||||
|
Loading…
Reference in New Issue
Block a user