diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-02-11 17:36:55 +0100 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-02-11 17:36:55 +0100 |
commit | 420f14386fb2ac0d5de8427ef6be5cc9c25c85c1 (patch) | |
tree | ffa8210ef481dc734a95278d5c9d8cf338188d72 | |
parent | bc26fde9419c305ffc8e2bf69086d3d74bad23d7 (diff) |
add "font_min_size" dillorc option
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | dillorc | 5 | ||||
-rw-r--r-- | src/prefs.c | 2 | ||||
-rw-r--r-- | src/prefs.h | 1 | ||||
-rw-r--r-- | src/styleengine.cc | 4 |
5 files changed, 12 insertions, 1 deletions
@@ -50,6 +50,7 @@ dillo-2.1 +- Reduced warnings with gcc-4.3. Patch: Thomas Orgis +- Made the parser recognize "[^ ]/>"-terminated XML elements. + - Added "font_min_size" dillorc option. Patch: Johannes Hofmann +- Added the "middle_click_drags_page" dillorc option. Patch: Jorge Arellano Cid, Thomas Orgis @@ -49,10 +49,13 @@ #font_fantasy="DejaVu Sans" #font_monospace="DejaVu Sans Mono" -# All fontsizes are scaled by this value +# All font sizes are scaled by this value # font_factor=1.5 #font_factor=1.0 +# Minimum font size +#font_min_size=6 + # Show tooltip popup for images? # Note: We use the "title" attribute and not "alt". # More info at: http://bugzilla.mozilla.org/show_bug.cgi?id=25537 diff --git a/src/prefs.c b/src/prefs.c index 177eb7e9..6167085c 100644 --- a/src/prefs.c +++ b/src/prefs.c @@ -163,6 +163,7 @@ static int Prefs_parse_dillorc(void) { "font_cursive", &prefs.font_cursive, PREFS_STRING }, { "font_factor", &prefs.font_factor, PREFS_DOUBLE }, { "font_fantasy", &prefs.font_fantasy, PREFS_STRING }, + { "font_min_size", &prefs.font_min_size, PREFS_INT32 }, { "font_monospace", &prefs.font_monospace, PREFS_STRING }, { "font_sans_serif", &prefs.font_sans_serif, PREFS_STRING }, { "font_serif", &prefs.font_serif, PREFS_STRING }, @@ -267,6 +268,7 @@ void a_Prefs_init(void) prefs.focus_new_tab = TRUE; prefs.font_cursive = dStrdup(D_FONT_CURSIVE); prefs.font_factor = 1.0; + prefs.font_min_size = 6; prefs.font_fantasy = dStrdup(D_FONT_FANTASY); prefs.font_monospace = dStrdup(D_FONT_MONOSPACE); prefs.font_sans_serif = dStrdup(D_FONT_SANS_SERIF); diff --git a/src/prefs.h b/src/prefs.h index 75d102f6..f4c70bb1 100644 --- a/src/prefs.h +++ b/src/prefs.h @@ -44,6 +44,7 @@ struct _DilloPrefs { bool_t w3c_plus_heuristics; bool_t focus_new_tab; double font_factor; + int32_t font_min_size; bool_t show_back; bool_t show_forw; bool_t show_home; diff --git a/src/styleengine.cc b/src/styleengine.cc index c7d8a39e..81054a06 100644 --- a/src/styleengine.cc +++ b/src/styleengine.cc @@ -222,6 +222,10 @@ void StyleEngine::apply (StyleAttrs *attrs, CssPropertyList *props) { computeValue (&fontAttrs.size, p->value.intVal, parentFont, parentFont->size); } + + if (fontAttrs.size < prefs.font_min_size) + fontAttrs.size = prefs.font_min_size; + break; case CSS_PROPERTY_FONT_STYLE: fontAttrs.style = (FontStyle) p->value.intVal; |