summaryrefslogtreecommitdiff
path: root/amiga
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2011-05-02 16:18:00 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2011-05-02 16:18:00 +0000
commite77b1a29550e4753f771848705975295a6ebe99e (patch)
treea9bedfc132b1a35831524cff69b8863644df367a /amiga
parentda206053859a1d770947c6b7c960660632255153 (diff)
downloadnetsurf-e77b1a29550e4753f771848705975295a6ebe99e.tar.gz
netsurf-e77b1a29550e4753f771848705975295a6ebe99e.tar.bz2
Allow the user to set screen resolution in DPI in preferences
svn path=/trunk/netsurf/; revision=12269
Diffstat (limited to 'amiga')
-rwxr-xr-xamiga/dist/NetSurf.guide4
-rwxr-xr-xamiga/gui_options.c41
2 files changed, 40 insertions, 5 deletions
diff --git a/amiga/dist/NetSurf.guide b/amiga/dist/NetSurf.guide
index 87742f0fe..2824334a8 100755
--- a/amiga/dist/NetSurf.guide
+++ b/amiga/dist/NetSurf.guide
@@ -44,7 +44,6 @@ There are a couple of Amiga-specific options which can only be changed directly
@{b}printer_unit@{ub} Specifies which printer.device unit to print to
@{b}drag_save_icons@{ub} Enables displaying Workbench-style transparent icons under the pointer when performing drag saves (ctrl-drag of objects available if NetSurf is running on the Workbench screen) and text selection drags. If set to 0 the pointer style will change instead. OS 4.0 users may want to set this to 0 as icons will appear opaque and obscure the drop position.
@{b}cairo_renderer@{ub} Set rendering engine (SObjs version only). 0 = graphics.library, 1 = Cairo/graphics.library mixed (recommended), 2 = Full Cairo.
-@{b}amiga_ydpi@{ub} Set vertical screen resolution in DPI (horizontal resolution is calculated automatically). To find the correct value, divide the number of pixels on the screen vertically by the physical height of the screen in inches. Default = 72
@{b}url_file@{ub} Path to URL database file
@{b}hotlist_file@{ub} Path to Hotlist file
@@ -68,6 +67,9 @@ If the font NetSurf is trying to use does not contain a specific character used
For most users, installing and selecting @{"Code2000" rxs "address netsurf 'open http://www.code2000.net'"} or @{"Bitstream Cyberbit" rxs "address netsurf 'open http://ftp.netscape.com/pub/communicator/extras/fonts/windows/'"} is the best option.
+@{b}Font sizes@{ub}
+
+The default and minimum font sizes can also be set. NB: The resolution setting on the "Rendering" tab in NetSurf's preferences affects how big text appears on screen (the conversion between point and pixel sizes) amongst other things. To find the correct value, divide the number of pixels on the screen vertically by the physical height of the screen in inches (horizontal resolution is calculated automatically if NetSurf is running on a custom screen, square pixels are assumed on all other screens).
@endnode
@node Themes
diff --git a/amiga/gui_options.c b/amiga/gui_options.c
index 2afe5c6eb..83963257b 100755
--- a/amiga/gui_options.c
+++ b/amiga/gui_options.c
@@ -97,6 +97,7 @@ enum
GID_OPTS_SCALEQ,
GID_OPTS_ANIMSPEED,
GID_OPTS_ANIMDISABLE,
+ GID_OPTS_DPI_Y,
GID_OPTS_FONT_SANS,
GID_OPTS_FONT_SERIF,
GID_OPTS_FONT_MONO,
@@ -150,6 +151,7 @@ enum
GRP_OPTS_FETCHING,
GRP_OPTS_IMAGES,
GRP_OPTS_ANIMS,
+ GRP_OPTS_DPI,
GRP_OPTS_FONTFACES,
GRP_OPTS_FONTSIZE,
GRP_OPTS_MEMCACHE,
@@ -176,6 +178,7 @@ enum
LAB_OPTS_PT,
LAB_OPTS_MB,
LAB_OPTS_MM,
+ LAB_OPTS_DPI,
LAB_OPTS_LAST
};
@@ -259,6 +262,7 @@ void ami_gui_opts_setup(void)
gadlab[GID_OPTS_NATIVEBM] = (char *)ami_utf8_easy((char *)messages_get("CacheNative"));
gadlab[GID_OPTS_SCALEQ] = (char *)ami_utf8_easy((char *)messages_get("ScaleQuality"));
gadlab[GID_OPTS_ANIMSPEED] = (char *)ami_utf8_easy((char *)messages_get("AnimSpeedLimit"));
+ gadlab[GID_OPTS_DPI_Y] = (char *)ami_utf8_easy((char *)messages_get("ResolutionY"));
gadlab[GID_OPTS_ANIMDISABLE] = (char *)ami_utf8_easy((char *)messages_get("AnimDisable"));
gadlab[GID_OPTS_FONT_SANS] = (char *)ami_utf8_easy((char *)messages_get("FontSans"));
gadlab[GID_OPTS_FONT_SERIF] = (char *)ami_utf8_easy((char *)messages_get("FontSerif"));
@@ -304,6 +308,7 @@ void ami_gui_opts_setup(void)
gadlab[LAB_OPTS_PT] = (char *)ami_utf8_easy((char *)messages_get("Pt"));
gadlab[LAB_OPTS_MM] = (char *)ami_utf8_easy((char *)messages_get("MM"));
gadlab[LAB_OPTS_MB] = (char *)ami_utf8_easy((char *)messages_get("MBytes"));
+ gadlab[LAB_OPTS_DPI] = (char *)ami_utf8_easy((char *)messages_get("DPI"));
gadlab[GRP_OPTS_HOMEPAGE] = (char *)ami_utf8_easy((char *)messages_get("Home"));
gadlab[GRP_OPTS_CONTENTBLOCKING] = (char *)ami_utf8_easy((char *)messages_get("ContentBlocking"));
@@ -317,6 +322,7 @@ void ami_gui_opts_setup(void)
gadlab[GRP_OPTS_FETCHING] = (char *)ami_utf8_easy((char *)messages_get("Fetching"));
gadlab[GRP_OPTS_IMAGES] = (char *)ami_utf8_easy((char *)messages_get("Images"));
gadlab[GRP_OPTS_ANIMS] = (char *)ami_utf8_easy((char *)messages_get("Animations"));
+ gadlab[GRP_OPTS_DPI] = (char *)ami_utf8_easy((char *)messages_get("Resolution"));
gadlab[GRP_OPTS_FONTFACES] = (char *)ami_utf8_easy((char *)messages_get("FontFamilies"));
gadlab[GRP_OPTS_FONTSIZE] = (char *)ami_utf8_easy((char *)messages_get("FontSize"));
gadlab[GRP_OPTS_MEMCACHE] = (char *)ami_utf8_easy((char *)messages_get("CacheMemory"));
@@ -851,6 +857,30 @@ void ami_gui_opts_open(void)
CheckBoxEnd,
LayoutEnd, //animations
CHILD_WeightedHeight, 0,
+ LAYOUT_AddChild,VGroupObject,
+ LAYOUT_SpaceOuter, TRUE,
+ LAYOUT_BevelStyle, BVS_GROUP,
+ LAYOUT_Label, gadlab[GRP_OPTS_DPI],
+ LAYOUT_AddChild, HGroupObject,
+ LAYOUT_LabelColumn, PLACETEXT_RIGHT,
+ LAYOUT_AddChild, gow->objects[GID_OPTS_DPI_Y] = IntegerObject,
+ GA_ID, GID_OPTS_DPI_Y,
+ GA_RelVerify, TRUE,
+ INTEGER_Number, option_amiga_ydpi,
+ INTEGER_Minimum, 60,
+ INTEGER_Maximum, 150,
+ INTEGER_Arrows, TRUE,
+ IntegerEnd,
+ CHILD_WeightedWidth, 0,
+ CHILD_Label, LabelObject,
+ LABEL_Text, gadlab[LAB_OPTS_DPI],
+ LabelEnd,
+ LayoutEnd,
+ CHILD_Label, LabelObject,
+ LABEL_Text, gadlab[GID_OPTS_DPI_Y],
+ LabelEnd,
+ LayoutEnd, //animations
+ CHILD_WeightedHeight, 0,
LayoutEnd, // page vgroup
CHILD_WeightedHeight, 0,
PageEnd, // page object
@@ -1354,7 +1384,7 @@ void ami_gui_opts_open(void)
void ami_gui_opts_use(void)
{
- ULONG data;
+ ULONG data, id = 0;
float animspeed;
struct TextAttr *tattr;
char *dot;
@@ -1401,12 +1431,12 @@ void ami_gui_opts_use(void)
break;
}
- GetAttr(GETSCREENMODE_DisplayID,gow->objects[GID_OPTS_SCREENMODE],(ULONG *)&data);
- if(data)
+ GetAttr(GETSCREENMODE_DisplayID, gow->objects[GID_OPTS_SCREENMODE], (ULONG *)&id);
+ if(id)
{
if(option_modeid) free(option_modeid);
option_modeid = malloc(20);
- sprintf(option_modeid,"0x%lx",data);
+ sprintf(option_modeid,"0x%lx", id);
}
GetAttr(GETFILE_Drawer,gow->objects[GID_OPTS_THEME],(ULONG *)&data);
@@ -1464,6 +1494,9 @@ void ami_gui_opts_use(void)
if(data) option_animate_images = false;
else option_animate_images = true;
+ GetAttr(INTEGER_Number,gow->objects[GID_OPTS_DPI_Y],(ULONG *)&option_amiga_ydpi);
+ ami_font_setdevicedpi(id); // id set above
+
GetAttr(GETFONT_TextAttr,gow->objects[GID_OPTS_FONT_SANS],(ULONG *)&data);
tattr = (struct TextAttr *)data;
if(option_font_sans) free(option_font_sans);