Skip to content

Commit

Permalink
try modifying gui_scale code for macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
AllinCottrell committed Dec 21, 2024
1 parent b1b13e1 commit 3c2baa3
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions gui/gretl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1464,16 +1464,22 @@ void clear_varlist (GtkWidget *widget)
static float scale_from_font (const char *font)
{
const char *numstr = strrchr(font, ' ');
float fscale = 1.0;
#ifdef OS_OSX
double fbase = 13.0;
#else
double fbase = 10.0;
#endif

if (numstr != NULL) {
double fsize = atof(numstr + 1);

if (fsize > 10 && fsize < 50) {
return (float) fsize / 10.0;
fscale = (float) fsize / fbase;
}
}

return 1.0;
return fscale;
}

static float get_gui_scale (void)
Expand Down

0 comments on commit 3c2baa3

Please sign in to comment.