aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjcid <devnull@localhost>2008-06-23 23:41:09 +0200
committerjcid <devnull@localhost>2008-06-23 23:41:09 +0200
commit7add00a49f2514e029c5537bc4c27e26185927c2 (patch)
tree4f689e81bc16f93f518910f06623b990d7e942a7 /src
parentdd0cc1931cb614e7ca911295898202af1ee7d01c (diff)
- Fixed a segfault bug by providing standar colors for the SELECT element.
Diffstat (limited to 'src')
-rw-r--r--src/form.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/form.cc b/src/form.cc
index 053e60ad..9104d841 100644
--- a/src/form.cc
+++ b/src/form.cc
@@ -711,15 +711,18 @@ void Html_tag_open_select(DilloHtml *html, const char *tag, int tagsize)
dw::core::ui::SelectionResource *res;
if (a_Html_get_attr(html, tag, tagsize, "multiple")) {
type = DILLO_HTML_INPUT_SEL_LIST;
- res = factory->createListResource (dw::core::ui::ListResource::SELECTION_MULTIPLE);
+ res = factory->createListResource (
+ dw::core::ui::ListResource::SELECTION_MULTIPLE);
} else {
type = DILLO_HTML_INPUT_SELECT;
res = factory->createOptionMenuResource ();
}
dw::core::ui::Embed *embed = new dw::core::ui::Embed(res);
if (prefs.standard_widget_colors) {
- HTML_SET_TOP_ATTR(html, color, NULL);
- HTML_SET_TOP_ATTR(html, backgroundColor, NULL);
+ /* Colors cannot be NULL because SELECT can contain other elements */
+ HTML_SET_TOP_ATTR(html, color, Color::createSimple (HT2LT(html), 0));
+ HTML_SET_TOP_ATTR(html, backgroundColor,
+ Color::createShaded (HT2LT(html), 0xffffff));
}
DW2TB(html->dw)->addWidget (embed, S_TOP(html)->style);