diff options
author | James Bursa <james@netsurf-browser.org> | 2004-02-13 23:07:42 +0000 |
---|---|---|
committer | James Bursa <james@netsurf-browser.org> | 2004-02-13 23:07:42 +0000 |
commit | 765c02622b23acbfdf0ec426e1e9d5beb2158680 (patch) | |
tree | 20d47b0796a8fb28b73bfc51307d9eb5b7d6bd6b /desktop | |
parent | b5fd9fb2977636b64e15abad3155a5513e29eae8 (diff) | |
download | netsurf-765c02622b23acbfdf0ec426e1e9d5beb2158680.tar.gz netsurf-765c02622b23acbfdf0ec426e1e9d5beb2158680.tar.bz2 |
[project @ 2004-02-13 23:07:42 by bursa]
Add font size configuration and fix proxy options bug.
svn path=/import/netsurf/; revision=538
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/options.c | 16 | ||||
-rw-r--r-- | desktop/options.h | 2 |
2 files changed, 18 insertions, 0 deletions
diff --git a/desktop/options.c b/desktop/options.c index 5b1981b6e..ca9cc9cde 100644 --- a/desktop/options.c +++ b/desktop/options.c @@ -35,6 +35,11 @@ bool option_http_proxy = false; char *option_http_proxy_host = 0; /** Proxy port. */ int option_http_proxy_port = 8080; +/** Default font size / 0.1pt. */ +int option_font_size = 100; +/** Minimum font size. */ +int option_font_min_size = 70; + EXTRA_OPTION_DEFINE @@ -46,6 +51,8 @@ struct { { "http_proxy", OPTION_BOOL, &option_http_proxy }, { "http_proxy_host", OPTION_STRING, &option_http_proxy_host }, { "http_proxy_port", OPTION_INTEGER, &option_http_proxy_port }, + { "font_size", OPTION_INTEGER, &option_font_size }, + { "font_min_size", OPTION_INTEGER, &option_font_min_size }, EXTRA_OPTION_TABLE }; @@ -111,6 +118,15 @@ void options_read(const char *path) } fclose(fp); + + if (option_font_size < 50) + option_font_size = 50; + if (1000 < option_font_size) + option_font_size = 1000; + if (option_font_min_size < 10) + option_font_min_size = 10; + if (500 < option_font_min_size) + option_font_min_size = 500; } diff --git a/desktop/options.h b/desktop/options.h index 3c2acced9..4f8653554 100644 --- a/desktop/options.h +++ b/desktop/options.h @@ -27,6 +27,8 @@ extern bool option_http_proxy; extern char *option_http_proxy_host; extern int option_http_proxy_port; +extern int option_font_size; +extern int option_font_min_size; void options_read(const char *path); void options_write(const char *path); |