summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2013-05-31 19:34:22 +0100
committerChris Young <chris@unsatisfactorysoftware.co.uk>2013-05-31 19:34:22 +0100
commitac1865f36181d3b25045d0ab284b70b697b6a2ed (patch)
tree6b04e13b54737e74ccf2449968dbbfa9d6e4af60
parentb2aa0c129c73201b7e1e466d9996e5e491464592 (diff)
downloadnetsurf-ac1865f36181d3b25045d0ab284b70b697b6a2ed.tar.gz
netsurf-ac1865f36181d3b25045d0ab284b70b697b6a2ed.tar.bz2
Set more sensible default window size
-rw-r--r--amiga/gui.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/amiga/gui.c b/amiga/gui.c
index af6a6d8ee..b1786ce46 100644
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -443,6 +443,22 @@ colour_option_from_pen(struct nsoption_s *opts,
return NSERROR_OK;
}
+static void ami_set_screen_defaults(struct Screen *scrn)
+{
+ if((nsoption_int(window_x) == 0) &&
+ (nsoption_int(window_y) == 0) &&
+ (nsoption_int(window_width) == 0) &&
+ (nsoption_int(window_height) == 0)) {
+ nsoption_set_int(window_x, 0);
+ nsoption_set_int(window_y, scrn->BarHeight + 1);
+ nsoption_set_int(window_width, scrn->Width);
+ nsoption_set_int(window_height, scrn->Height - scrn->BarHeight - 1);
+ }
+
+ /* TODO: Update screen colour defaults here */
+}
+
+
/**
* Set option defaults for amiga frontend
*
@@ -531,9 +547,6 @@ static nserror ami_set_options(struct nsoption_s *defaults)
tree_set_icon_dir(strdup("ENV:Sys"));
- if(!nsoption_int(window_width)) nsoption_set_int(window_width, 800);
- if(!nsoption_int(window_height)) nsoption_set_int(window_height, 600);
-
#ifndef __amigaos4__
nsoption_set_bool(download_notify, false);
nsoption_set_bool(context_menu, false);
@@ -745,10 +758,7 @@ void ami_openscreen(void)
dri = GetScreenDrawInfo(scrn);
ami_font_setdevicedpi(id);
-/* TODO: Reset system colours so they are correct for the new screen
- gui_system_colour_finalize();
- gui_system_colour_init();
-*/
+ ami_set_screen_defaults(scrn);
//ami_help_new_screen(scrn);
}