aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcorvid <corvid@lavabit.com>2009-03-06 09:31:29 +0100
committercorvid <corvid@lavabit.com>2009-03-06 09:31:29 +0100
commit9514cc5f1a0bc7e8ba63791edd62d2d9e69821f8 (patch)
treea0b5673a28fcf19597c889240c62c530bd5d6adf /src
parentaa70b2f628549b2426693572baf96fc71341c404 (diff)
remove standard_widget_colors dillorc option
Form widgets by default use the background color of their parent. To get more conservative widget colors, you can add a line button, select, input {background-color: #e0e0e0} to ~/.dillo/style.css.
Diffstat (limited to 'src')
-rw-r--r--src/form.cc38
-rw-r--r--src/prefs.c2
-rw-r--r--src/prefs.h1
3 files changed, 4 insertions, 37 deletions
diff --git a/src/form.cc b/src/form.cc
index e2f01ccc..9e4df408 100644
--- a/src/form.cc
+++ b/src/form.cc
@@ -542,14 +542,7 @@ void Html_tag_open_input(DilloHtml *html, const char *tag, int tagsize)
// gtk_entry_set_max_length(GTK_ENTRY(widget),
// strtol(attrbuf, NULL, 10));
}
- Color *bg;
- if (prefs.standard_widget_colors)
- bg = NULL;
- else
- bg = Color::create (HT2LT(html), S_TOP(html)->current_bg_color);
- HTML_SET_TOP_ATTR(html, backgroundColor, bg);
-
- DW2TB(html->dw)->addWidget (embed, html->styleEngine->style ());
+ DW2TB(html->dw)->addWidget (embed, html->styleEngine->backgroundStyle());
}
dFree(type);
dFree(name);
@@ -592,13 +585,7 @@ void Html_tag_open_isindex(DilloHtml *html, const char *tag, int tagsize)
embed = new Embed (entryResource);
Html_add_input(html, DILLO_HTML_INPUT_INDEX, embed, NULL, NULL, FALSE);
- Color *bg;
- if (prefs.standard_widget_colors)
- bg = NULL;
- else
- bg = Color::create (HT2LT(html), S_TOP(html)->current_bg_color);
- HTML_SET_TOP_ATTR(html, backgroundColor, bg);
- DW2TB(html->dw)->addWidget (embed, html->styleEngine->style ());
+ DW2TB(html->dw)->addWidget (embed, html->styleEngine->backgroundStyle ());
a_Url_free(action);
html->InFlags &= ~IN_FORM;
@@ -666,14 +653,7 @@ void Html_tag_open_textarea(DilloHtml *html, const char *tag, int tagsize)
textres->setEditable(false);
Html_add_input(html, DILLO_HTML_INPUT_TEXTAREA, embed, name, NULL, false);
- Color *bg;
- if (prefs.standard_widget_colors)
- bg = NULL;
- else
- bg = Color::create (HT2LT(html), S_TOP(html)->current_bg_color);
- HTML_SET_TOP_ATTR(html, backgroundColor, bg);
-
- DW2TB(html->dw)->addWidget (embed, html->styleEngine->style ());
+ DW2TB(html->dw)->addWidget (embed, html->styleEngine->backgroundStyle ());
dFree(name);
}
@@ -757,17 +737,7 @@ void Html_tag_open_select(DilloHtml *html, const char *tag, int tagsize)
}
Embed *embed = new Embed(res);
- int bg;
- if (prefs.standard_widget_colors) {
- /* Valid colors required; SELECT can contain other elements (BUG) */
- HTML_SET_TOP_ATTR(html, color, Color::createSimple (HT2LT(html), 0));
- bg = 0xffffff;
- } else {
- bg = S_TOP(html)->current_bg_color;
- }
- HTML_SET_TOP_ATTR(html, backgroundColor,
- Color::createShaded (HT2LT(html), bg));
- DW2TB(html->dw)->addWidget (embed, html->styleEngine->style ());
+ DW2TB(html->dw)->addWidget (embed, html->styleEngine->backgroundStyle ());
Html_add_input(html, type, embed, name, NULL, false);
a_Html_stash_init(html);
diff --git a/src/prefs.c b/src/prefs.c
index b9680819..815262c0 100644
--- a/src/prefs.c
+++ b/src/prefs.c
@@ -204,7 +204,6 @@ static int Prefs_parse_dillorc(void)
{ "show_tooltip", &prefs.show_tooltip, PREFS_BOOL },
{ "show_url", &prefs.show_url, PREFS_BOOL },
{ "small_icons", &prefs.small_icons, PREFS_BOOL },
- { "standard_widget_colors", &prefs.standard_widget_colors, PREFS_BOOL },
{ "start_page", &prefs.start_page, PREFS_URL },
{ "text_color", &prefs.text_color, PREFS_COLOR },
{ "visited_color", &prefs.visited_color, PREFS_COLOR },
@@ -316,7 +315,6 @@ void a_Prefs_init(void)
prefs.show_tooltip = TRUE;
prefs.show_url=TRUE;
prefs.small_icons = FALSE;
- prefs.standard_widget_colors = FALSE;
prefs.start_page = a_Url_new(DILLO_START_PAGE, NULL);
prefs.text_color = DW_COLOR_DEFAULT_TEXT;
prefs.visited_color = DW_COLOR_DEFAULT_VLINK;
diff --git a/src/prefs.h b/src/prefs.h
index a50b5585..1c15c147 100644
--- a/src/prefs.h
+++ b/src/prefs.h
@@ -36,7 +36,6 @@ struct _DilloPrefs {
bool_t allow_white_bg;
bool_t force_my_colors;
bool_t contrast_visited_color;
- bool_t standard_widget_colors;
bool_t show_tooltip;
int panel_size;
bool_t small_icons;