aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dillo.cc4
-rw-r--r--src/prefs.c2
-rw-r--r--src/prefs.h2
-rw-r--r--src/prefsparser.cc2
-rw-r--r--src/table.cc5
5 files changed, 13 insertions, 2 deletions
diff --git a/src/dillo.cc b/src/dillo.cc
index 4d96988f..90eecdd7 100644
--- a/src/dillo.cc
+++ b/src/dillo.cc
@@ -56,7 +56,9 @@
#include "lout/debug.hh"
#include "dw/fltkcore.hh"
+#include "dw/widget.hh"
#include "dw/textblock.hh"
+#include "dw/table.hh"
/*
* Command line options structure
@@ -483,6 +485,8 @@ int main(int argc, char **argv)
a_UIcmd_init();
StyleEngine::init();
+ dw::core::Widget::setAdjustMinWidth (prefs.adjust_min_width);
+ dw::Table::setAdjustTableMinWidth (prefs.adjust_table_min_width);
dw::Textblock::setPenaltyHyphen (prefs.penalty_hyphen);
dw::Textblock::setPenaltyHyphen2 (prefs.penalty_hyphen_2);
dw::Textblock::setPenaltyEmDashLeft (prefs.penalty_em_dash_left);
diff --git a/src/prefs.c b/src/prefs.c
index 56e02006..67cbaa79 100644
--- a/src/prefs.c
+++ b/src/prefs.c
@@ -68,6 +68,8 @@ void a_Prefs_init(void)
prefs.http_referer = dStrdup(PREFS_HTTP_REFERER);
prefs.http_user_agent = dStrdup(PREFS_HTTP_USER_AGENT);
prefs.limit_text_width = FALSE;
+ prefs.adjust_min_width = FALSE;
+ prefs.adjust_table_min_width = TRUE;
prefs.load_images=TRUE;
prefs.load_background_images=FALSE;
prefs.load_stylesheets=TRUE;
diff --git a/src/prefs.h b/src/prefs.h
index 0e54e0fc..ac52786e 100644
--- a/src/prefs.h
+++ b/src/prefs.h
@@ -66,6 +66,8 @@ typedef struct {
int panel_size;
bool_t small_icons;
bool_t limit_text_width;
+ bool_t adjust_min_width;
+ bool_t adjust_table_min_width;
bool_t w3c_plus_heuristics;
bool_t focus_new_tab;
double font_factor;
diff --git a/src/prefsparser.cc b/src/prefsparser.cc
index ce420eac..d54d017b 100644
--- a/src/prefsparser.cc
+++ b/src/prefsparser.cc
@@ -79,6 +79,8 @@ int PrefsParser::parseOption(char *name, char *value)
{ "http_referer", &prefs.http_referer, PREFS_STRING },
{ "http_user_agent", &prefs.http_user_agent, PREFS_STRING },
{ "limit_text_width", &prefs.limit_text_width, PREFS_BOOL },
+ { "adjust_min_width", &prefs.adjust_min_width, PREFS_BOOL },
+ { "adjust_table_min_width", &prefs.adjust_table_min_width, PREFS_BOOL },
{ "load_images", &prefs.load_images, PREFS_BOOL },
{ "load_background_images", &prefs.load_background_images, PREFS_BOOL },
{ "load_stylesheets", &prefs.load_stylesheets, PREFS_BOOL },
diff --git a/src/table.cc b/src/table.cc
index a3002ebf..29b5fbc9 100644
--- a/src/table.cc
+++ b/src/table.cc
@@ -15,6 +15,7 @@
#include "dw/style.hh"
#include "dw/textblock.hh"
#include "dw/table.hh"
+#include "dw/simpletablecell.hh"
#include "prefs.h"
#include "msg.h"
@@ -445,11 +446,11 @@ static void Html_tag_content_table_cell(DilloHtml *html,
rowspan = MAX(1, strtol (attrbuf, NULL, 10));
if (html->style ()->textAlign
== TEXT_ALIGN_STRING)
- col_tb = new dw::TableCell (
+ col_tb = new AlignedTableCell (
((dw::Table*)S_TOP(html)->table)->getCellRef (),
prefs.limit_text_width);
else
- col_tb = new Textblock (prefs.limit_text_width);
+ col_tb = new SimpleTableCell (prefs.limit_text_width);
if (html->style()->borderCollapse == BORDER_MODEL_COLLAPSE){
Html_set_collapsing_border_model(html, col_tb);