summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dw/fltkplatform.cc30
-rw-r--r--dw/fltkplatform.hh7
-rw-r--r--dw/layout.hh9
-rw-r--r--dw/platform.hh10
-rw-r--r--dw/style.cc20
-rw-r--r--dw/style.hh23
-rw-r--r--dw/textblock.cc14
-rw-r--r--src/form.cc10
-rw-r--r--src/html.cc13
-rw-r--r--src/plain.cc4
-rw-r--r--src/styleengine.cc28
-rw-r--r--src/web.cc4
-rw-r--r--test/dw_anchors_test.cc4
-rw-r--r--test/dw_border_test.cc10
-rw-r--r--test/dw_example.cc4
-rw-r--r--test/dw_find_test.cc4
-rw-r--r--test/dw_images_scaled.cc4
-rw-r--r--test/dw_images_scaled2.cc6
-rw-r--r--test/dw_images_simple.cc4
-rw-r--r--test/dw_links.cc6
-rw-r--r--test/dw_links2.cc6
-rw-r--r--test/dw_lists.cc8
-rw-r--r--test/dw_resource_test.cc4
-rw-r--r--test/dw_table.cc6
-rw-r--r--test/dw_table_aligned.cc6
-rw-r--r--test/dw_ui_test.cc4
26 files changed, 98 insertions, 150 deletions
diff --git a/dw/fltkplatform.cc b/dw/fltkplatform.cc
index 1d83dbb8..e054cad2 100644
--- a/dw/fltkplatform.cc
+++ b/dw/fltkplatform.cc
@@ -101,11 +101,9 @@ container::typed::HashTable <dw::core::style::ColorAttrs,
new container::typed::HashTable <dw::core::style::ColorAttrs,
FltkColor> (false, false);
-FltkColor::FltkColor (int color, core::style::Color::Type type):
- Color (color, type)
+FltkColor::FltkColor (int color): Color (color)
{
this->color = color;
- this->type = type;
/*
* fltk/setcolor.cxx:
@@ -123,13 +121,10 @@ FltkColor::FltkColor (int color, core::style::Color::Type type):
colors[SHADING_NORMAL] = ::fltk::BLACK;
if (!(colors[SHADING_INVERSE] = shadeColor (color, SHADING_INVERSE) << 8))
colors[SHADING_INVERSE] = ::fltk::BLACK;
-
- if(type == core::style::Color::TYPE_SHADED) {
- if (!(colors[SHADING_DARK] = shadeColor (color, SHADING_DARK) << 8))
- colors[SHADING_DARK] = ::fltk::BLACK;
- if (!(colors[SHADING_LIGHT] = shadeColor (color, SHADING_LIGHT) << 8))
- colors[SHADING_LIGHT] = ::fltk::BLACK;
- }
+ if (!(colors[SHADING_DARK] = shadeColor (color, SHADING_DARK) << 8))
+ colors[SHADING_DARK] = ::fltk::BLACK;
+ if (!(colors[SHADING_LIGHT] = shadeColor (color, SHADING_LIGHT) << 8))
+ colors[SHADING_LIGHT] = ::fltk::BLACK;
}
FltkColor::~FltkColor ()
@@ -137,13 +132,13 @@ FltkColor::~FltkColor ()
colorsTable->remove (this);
}
-FltkColor * FltkColor::create (int col, core::style::Color::Type type)
+FltkColor * FltkColor::create (int col)
{
- ColorAttrs attrs(col, type);
+ ColorAttrs attrs(col);
FltkColor *color = colorsTable->get (&attrs);
if (color == NULL) {
- color = new FltkColor (col, type);
+ color = new FltkColor (col);
colorsTable->put (color, color);
}
@@ -385,14 +380,9 @@ core::style::Font *FltkPlatform::createFont (core::style::FontAttrs
return FltkFont::create (attrs);
}
-core::style::Color *FltkPlatform::createSimpleColor (int color)
-{
- return FltkColor::create (color, core::style::Color::TYPE_SIMPLE);
-}
-
-core::style::Color *FltkPlatform::createShadedColor (int color)
+core::style::Color *FltkPlatform::createColor (int color)
{
- return FltkColor::create (color, core::style::Color::TYPE_SHADED);
+ return FltkColor::create (color);
}
void FltkPlatform::copySelection(const char *text)
diff --git a/dw/fltkplatform.hh b/dw/fltkplatform.hh
index e7493fba..e4600516 100644
--- a/dw/fltkplatform.hh
+++ b/dw/fltkplatform.hh
@@ -34,13 +34,13 @@ class FltkColor: public core::style::Color
static lout::container::typed::HashTable <dw::core::style::ColorAttrs,
FltkColor> *colorsTable;
- FltkColor (int color, core::style::Color::Type type);
+ FltkColor (int color);
~FltkColor ();
public:
int colors[SHADING_NUM];
- static FltkColor *create(int color, core::style::Color::Type type);
+ static FltkColor *create(int color);
};
@@ -133,8 +133,7 @@ public:
core::style::Font *createFont (core::style::FontAttrs *attrs,
bool tryEverything);
- core::style::Color *createSimpleColor (int color);
- core::style::Color *createShadedColor (int color);
+ core::style::Color *createColor (int color);
core::Imgbuf *createImgbuf (core::Imgbuf::Type type, int width, int height);
diff --git a/dw/layout.hh b/dw/layout.hh
index 292024a2..ce9786f1 100644
--- a/dw/layout.hh
+++ b/dw/layout.hh
@@ -231,14 +231,9 @@ public:
return platform->createFont (attrs, tryEverything);
}
- inline style::Color *createSimpleColor (int color)
+ inline style::Color *createColor (int color)
{
- return platform->createSimpleColor (color);
- }
-
- inline style::Color *createShadedColor (int color)
- {
- return platform->createShadedColor (color);
+ return platform->createColor (color);
}
inline Imgbuf *createImgbuf (Imgbuf::Type type, int width, int height)
diff --git a/dw/platform.hh b/dw/platform.hh
index 4dcb2681..156a602a 100644
--- a/dw/platform.hh
+++ b/dw/platform.hh
@@ -120,15 +120,9 @@ public:
bool tryEverything) = 0;
/**
- * \brief Create a simple color resource for a given 0xrrggbb value.
+ * \brief Create a color resource for a given 0xrrggbb value.
*/
- virtual style::Color *createSimpleColor (int color) = 0;
-
- /**
- * \brief Create a shaded color resource for a given 0xrrggbb value.
- */
- virtual style::Color *createShadedColor (int color) = 0;
-
+ virtual style::Color *createColor (int color) = 0;
/*
* --------------------
diff --git a/dw/style.cc b/dw/style.cc
index 1b340966..3faf1399 100644
--- a/dw/style.cc
+++ b/dw/style.cc
@@ -334,12 +334,12 @@ Font *Font::createFromList (Layout *layout, FontAttrs *attrs,
bool ColorAttrs::equals(object::Object *other)
{
ColorAttrs *oc = (ColorAttrs*)other;
- return this == oc || (color == oc->color && type == oc->type);
+ return this == oc || (color == oc->color);
}
int ColorAttrs::hashValue()
{
- return color ^ type;
+ return color;
}
Color::~Color ()
@@ -403,21 +403,11 @@ int Color::shadeColor (int color, Shading shading)
}
-Color *Color::create (Layout *layout, int col, Type type)
+Color *Color::create (Layout *layout, int col)
{
- ColorAttrs attrs(col, type);
- Color *color = NULL;
-
- switch (type) {
- case TYPE_SIMPLE:
- color = layout->createSimpleColor (col);
- break;
- case TYPE_SHADED:
- color = layout->createShadedColor (col);
- break;
- }
+ ColorAttrs attrs(col);
- return color;
+ return layout->createColor (col);
}
// ----------------------------------------------------------------------
diff --git a/dw/style.hh b/dw/style.hh
index 0dd7fbd4..9e6672bb 100644
--- a/dw/style.hh
+++ b/dw/style.hh
@@ -591,22 +591,16 @@ public:
*/
class ColorAttrs: public object::Object
{
-public:
- enum Type { TYPE_SIMPLE, TYPE_SHADED };
-
protected:
int color;
- Type type;
public:
- inline ColorAttrs(int color, Type type)
+ inline ColorAttrs(int color)
{
this->color = color;
- this->type = type;
}
inline int getColor () { return color; }
- inline Type getType () { return type; }
bool equals(object::Object *other);
int hashValue();
@@ -621,12 +615,11 @@ class Color: public ColorAttrs
private:
int refCount;
- static Color *create (Layout *layout, int color, Type type);
void remove(dw::core::Layout *layout);
- int shadeColor (int color, int d);
+ int shadeColor (int color, int d);
protected:
- inline Color (int color, Type type): ColorAttrs (color, type) {
+ inline Color (int color): ColorAttrs (color) {
refCount = 0; }
virtual ~Color ();
@@ -638,15 +631,7 @@ protected:
int shadeColor (int color, Shading shading);
public:
- inline static Color *createSimple (Layout *layout, int color)
- {
- return create (layout, color, TYPE_SIMPLE);
- }
-
- inline static Color *createShaded (Layout *layout, int color)
- {
- return create (layout, color, TYPE_SHADED);
- }
+ static Color *create (Layout *layout, int color);
inline void ref () { refCount++; }
inline void unref ()
diff --git a/dw/textblock.cc b/dw/textblock.cc
index d80a7ad4..3487c8f1 100644
--- a/dw/textblock.cc
+++ b/dw/textblock.cc
@@ -1921,14 +1921,14 @@ void Textblock::changeLinkColor (int link, int newColor)
case core::Content::TEXT:
{ core::style::Style *old_style = word->style;
styleAttrs = *old_style;
- styleAttrs.color = core::style::Color::createSimple (layout,
- newColor);
+ styleAttrs.color = core::style::Color::create (layout,
+ newColor);
word->style = core::style::Style::create (layout, &styleAttrs);
old_style->unref();
old_style = word->spaceStyle;
styleAttrs = *old_style;
- styleAttrs.color = core::style::Color::createSimple (layout,
- newColor);
+ styleAttrs.color = core::style::Color::create (layout,
+ newColor);
word->spaceStyle =
core::style::Style::create(layout, &styleAttrs);
old_style->unref();
@@ -1937,10 +1937,10 @@ void Textblock::changeLinkColor (int link, int newColor)
case core::Content::WIDGET:
{ core::Widget *widget = word->content.widget;
styleAttrs = *widget->getStyle();
- styleAttrs.color = core::style::Color::createSimple (layout,
- newColor);
+ styleAttrs.color = core::style::Color::create (layout,
+ newColor);
styleAttrs.setBorderColor(
- core::style::Color::createShaded(layout, newColor));
+ core::style::Color::create (layout, newColor));
widget->setStyle(
core::style::Style::create (layout, &styleAttrs));
break;
diff --git a/src/form.cc b/src/form.cc
index d822f9e4..b1f54c02 100644
--- a/src/form.cc
+++ b/src/form.cc
@@ -537,7 +537,7 @@ void Html_tag_open_input(DilloHtml *html, const char *tag, int tagsize)
if (prefs.standard_widget_colors)
bg = NULL;
else
- bg = Color::createShaded(HT2LT(html), S_TOP(html)->current_bg_color);
+ 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 ());
@@ -587,7 +587,7 @@ void Html_tag_open_isindex(DilloHtml *html, const char *tag, int tagsize)
if (prefs.standard_widget_colors)
bg = NULL;
else
- bg = Color::createShaded(HT2LT(html), S_TOP(html)->current_bg_color);
+ 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 ());
@@ -655,7 +655,7 @@ void Html_tag_open_textarea(DilloHtml *html, const char *tag, int tagsize)
if (prefs.standard_widget_colors)
bg = NULL;
else
- bg = Color::createShaded(HT2LT(html), S_TOP(html)->current_bg_color);
+ 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 ());
@@ -866,7 +866,7 @@ void Html_tag_open_button(DilloHtml *html, const char *tag, int tagsize)
style_attrs.borderWidth.setVal(0);
style_attrs.padding.setVal(0);
style_attrs.backgroundColor =
- Color::createShaded(HT2LT(html), S_TOP(html)->current_bg_color);
+ Color::create (HT2LT(html), S_TOP(html)->current_bg_color);
style = Style::create (HT2LT(html), &style_attrs);
page = new Textblock (prefs.limit_text_width);
@@ -1911,7 +1911,7 @@ static Embed *Html_input_image(DilloHtml *html, const char *tag, int tagsize)
style_attrs = *html->styleEngine->style ();
style_attrs.cursor = CURSOR_POINTER;
style_attrs.backgroundColor =
- style::Color::createShaded(HT2LT(html), S_TOP(html)->current_bg_color);
+ style::Color::create (HT2LT(html), S_TOP(html)->current_bg_color);
/* create new image and add it to the button */
if ((Image = a_Html_add_new_image(html, tag, tagsize, url, &style_attrs,
diff --git a/src/html.cc b/src/html.cc
index 72bc7cca..4cb05756 100644
--- a/src/html.cc
+++ b/src/html.cc
@@ -1766,9 +1766,9 @@ static void Html_tag_open_frame (DilloHtml *html, const char *tag, int tagsize)
if (a_Capi_get_flags(url) & CAPI_IsCached) { /* visited frame */
style_attrs.color =
- Color::createSimple (HT2LT(html), html->visited_color);
+ Color::create (HT2LT(html), html->visited_color);
} else { /* unvisited frame */
- style_attrs.color = Color::createSimple (HT2LT(html), html->link_color);
+ style_attrs.color = Color::create (HT2LT(html), html->link_color);
}
style_attrs.textDecoration |= TEXT_DECORATION_UNDERLINE;
style_attrs.x_link = Html_set_new_link(html, &url);
@@ -2136,10 +2136,10 @@ static void Html_tag_open_img(DilloHtml *html, const char *tag, int tagsize)
if (html->styleEngine->style ()->x_link != -1) {
/* In this case we can use the text color */
style_attrs.setBorderColor (
- Color::createShaded (HT2LT(html), style_attrs.color->getColor()));
+ Color::create (HT2LT(html), style_attrs.color->getColor()));
} else {
style_attrs.setBorderColor (
- Color::createShaded (HT2LT(html), html->link_color));
+ Color::create (HT2LT(html), html->link_color));
}
style_attrs.setBorderStyle (BORDER_SOLID);
style_attrs.borderWidth.setVal (border);
@@ -2336,7 +2336,7 @@ static void Html_tag_open_object(DilloHtml *html, const char *tag, int tagsize)
style_attrs = *html->styleEngine->style ();
if (a_Capi_get_flags(url) & CAPI_IsCached) {
- style_attrs.color = Color::createSimple (
+ style_attrs.color = Color::create (
HT2LT(html),
html->visited_color
/*
@@ -2348,8 +2348,7 @@ static void Html_tag_open_object(DilloHtml *html, const char *tag, int tagsize)
*/
);
} else {
- style_attrs.color = Color::createSimple(HT2LT(html),
- html->link_color);
+ style_attrs.color = Color::create (HT2LT(html), html->link_color);
}
style_attrs.textDecoration |= TEXT_DECORATION_UNDERLINE;
diff --git a/src/plain.cc b/src/plain.cc
index b75dbea5..8826dafe 100644
--- a/src/plain.cc
+++ b/src/plain.cc
@@ -108,9 +108,9 @@ DilloPlain::DilloPlain(BrowserWindow *p_bw, const DilloUrl *p_url)
styleAttrs.initValues ();
styleAttrs.margin.setVal (5);
styleAttrs.font = style::Font::create (layout, &fontAttrs);
- styleAttrs.color = style::Color::createSimple (layout, prefs.text_color);
+ styleAttrs.color = style::Color::create (layout, prefs.text_color);
styleAttrs.backgroundColor =
- style::Color::createSimple (layout, prefs.bg_color);
+ style::Color::create (layout, prefs.bg_color);
widgetStyle = style::Style::create (layout, &styleAttrs);
/* The context menu */
diff --git a/src/styleengine.cc b/src/styleengine.cc
index 79343e88..3f1df608 100644
--- a/src/styleengine.cc
+++ b/src/styleengine.cc
@@ -35,8 +35,8 @@ StyleEngine::StyleEngine (dw::core::Layout *layout) {
style_attrs.initValues ();
style_attrs.font = Font::create (layout, &font_attrs);
- style_attrs.color = Color::createSimple (layout, 0);
- style_attrs.backgroundColor = Color::createSimple (layout, 0xffffff);
+ style_attrs.color = Color::create (layout, 0);
+ style_attrs.backgroundColor = Color::create (layout, 0xffffff);
n->style = Style::create (layout, &style_attrs);
}
@@ -196,23 +196,23 @@ void StyleEngine::apply (StyleAttrs *attrs, CssPropertyList *props) {
/* \todo missing cases */
case CssProperty::CSS_PROPERTY_BACKGROUND_COLOR:
attrs->backgroundColor =
- Color::createSimple (layout, p->value.intVal);
+ Color::create (layout, p->value.intVal);
break;
case CssProperty::CSS_PROPERTY_BORDER_TOP_COLOR:
attrs->borderColor.top =
- Color::createShaded (layout, p->value.intVal);
+ Color::create (layout, p->value.intVal);
break;
case CssProperty::CSS_PROPERTY_BORDER_BOTTOM_COLOR:
attrs->borderColor.bottom =
- Color::createShaded (layout, p->value.intVal);
+ Color::create (layout, p->value.intVal);
break;
case CssProperty::CSS_PROPERTY_BORDER_LEFT_COLOR:
attrs->borderColor.left =
- Color::createShaded (layout, p->value.intVal);
+ Color::create (layout, p->value.intVal);
break;
case CssProperty::CSS_PROPERTY_BORDER_RIGHT_COLOR:
attrs->borderColor.right =
- Color::createShaded (layout, p->value.intVal);
+ Color::create (layout, p->value.intVal);
break;
case CssProperty::CSS_PROPERTY_BORDER_BOTTOM_STYLE:
attrs->borderStyle.bottom = (BorderStyle) p->value.intVal;
@@ -243,7 +243,7 @@ void StyleEngine::apply (StyleAttrs *attrs, CssPropertyList *props) {
computeValue (&attrs->vBorderSpacing, p->value.intVal, attrs->font);
break;
case CssProperty::CSS_PROPERTY_COLOR:
- attrs->color = Color::createSimple (layout, p->value.intVal);
+ attrs->color = Color::create (layout, p->value.intVal);
break;
case CssProperty::CSS_PROPERTY_CURSOR:
attrs->cursor = (Cursor) p->value.intVal;
@@ -307,17 +307,13 @@ void StyleEngine::apply (StyleAttrs *attrs, CssPropertyList *props) {
/* make sure border colors are set */
if (attrs->borderColor.top == NULL)
- attrs->borderColor.top = Color::createShaded (layout,
- attrs->color->getColor ());
+ attrs->borderColor.top = attrs->color;
if (attrs->borderColor.bottom == NULL)
- attrs->borderColor.bottom = Color::createShaded (layout,
- attrs->color->getColor ());
+ attrs->borderColor.bottom = attrs->color;
if (attrs->borderColor.left == NULL)
- attrs->borderColor.left = Color::createShaded (layout,
- attrs->color->getColor ());
+ attrs->borderColor.left = attrs->color;
if (attrs->borderColor.right == NULL)
- attrs->borderColor.right = Color::createShaded (layout,
- attrs->color->getColor ());
+ attrs->borderColor.right = attrs->color;
}
diff --git a/src/web.cc b/src/web.cc
index b9141913..ba5d90a1 100644
--- a/src/web.cc
+++ b/src/web.cc
@@ -80,9 +80,9 @@ int a_Web_dispatch_by_type (const char *Type, DilloWeb *Web,
styleAttrs.initValues ();
styleAttrs.margin.setVal (5);
styleAttrs.font = style::Font::create (layout, &fontAttrs);
- styleAttrs.color = style::Color::createSimple (layout, 0xff0000);
+ styleAttrs.color = style::Color::create (layout, 0xff0000);
styleAttrs.backgroundColor =
- style::Color::createSimple (layout, prefs.bg_color);
+ style::Color::create (layout, prefs.bg_color);
widgetStyle = style::Style::create (layout, &styleAttrs);
dw->setStyle (widgetStyle);
widgetStyle->unref ();
diff --git a/test/dw_anchors_test.cc b/test/dw_anchors_test.cc
index 8615439e..97ed3fb4 100644
--- a/test/dw_anchors_test.cc
+++ b/test/dw_anchors_test.cc
@@ -126,8 +126,8 @@ int main(int argc, char **argv)
styleAttrs.initValues ();
styleAttrs.font = Font::create (layout, &fontAttrs);
styleAttrs.margin.setVal (5);
- styleAttrs.color = Color::createSimple (layout, 0x000000);
- styleAttrs.backgroundColor = Color::createSimple (layout, 0xffffff);
+ styleAttrs.color = Color::create (layout, 0x000000);
+ styleAttrs.backgroundColor = Color::create (layout, 0xffffff);
topWidgetStyle = Style::create (layout, &styleAttrs);
styleAttrs.margin.left = 20;
diff --git a/test/dw_border_test.cc b/test/dw_border_test.cc
index 0c2b7783..f45c1a07 100644
--- a/test/dw_border_test.cc
+++ b/test/dw_border_test.cc
@@ -49,7 +49,7 @@ int main(int argc, char **argv)
styleAttrs.initValues ();
styleAttrs.margin.setVal (5);
styleAttrs.borderWidth.setVal (2);
- styleAttrs.setBorderColor (Color::createShaded (layout, 0xffffff));
+ styleAttrs.setBorderColor (Color::create (layout, 0xffffff));
styleAttrs.setBorderStyle (BORDER_INSET);
styleAttrs.padding.setVal (5);
@@ -60,15 +60,15 @@ int main(int argc, char **argv)
fontAttrs.style = FONT_STYLE_NORMAL;
styleAttrs.font = Font::create (layout, &fontAttrs);
- styleAttrs.color = Color::createSimple (layout, 0x000000);
- styleAttrs.backgroundColor = Color::createSimple (layout, 0xffffff);
+ styleAttrs.color = Color::create (layout, 0x000000);
+ styleAttrs.backgroundColor = Color::create (layout, 0xffffff);
Style *widgetStyle1 = Style::create (layout, &styleAttrs);
- styleAttrs.backgroundColor = Color::createSimple (layout, 0xffff80);
+ styleAttrs.backgroundColor = Color::create (layout, 0xffff80);
styleAttrs.margin.setVal (0);
styleAttrs.borderWidth.setVal (1);
- styleAttrs.setBorderColor (Color::createSimple (layout, 0x4040ff));
+ styleAttrs.setBorderColor (Color::create (layout, 0x4040ff));
styleAttrs.setBorderStyle (BORDER_SOLID);
styleAttrs.padding.setVal (1);
diff --git a/test/dw_example.cc b/test/dw_example.cc
index 75b891e2..ad570924 100644
--- a/test/dw_example.cc
+++ b/test/dw_example.cc
@@ -53,9 +53,9 @@ int main(int argc, char **argv)
styleAttrs.font = dw::core::style::Font::create (layout, &fontAttrs);
styleAttrs.color =
- dw::core::style::Color::createSimple (layout, 0x000000);
+ dw::core::style::Color::create (layout, 0x000000);
styleAttrs.backgroundColor =
- dw::core::style::Color::createSimple (layout, 0xffffff);
+ dw::core::style::Color::create (layout, 0xffffff);
dw::core::style::Style *widgetStyle =
dw::core::style::Style::create (layout, &styleAttrs);
diff --git a/test/dw_find_test.cc b/test/dw_find_test.cc
index a43b4e59..651ca653 100644
--- a/test/dw_find_test.cc
+++ b/test/dw_find_test.cc
@@ -99,8 +99,8 @@ int main(int argc, char **argv)
styleAttrs.initValues ();
styleAttrs.font = Font::create (layout, &fontAttrs);
styleAttrs.margin.setVal (10);
- styleAttrs.color = Color::createSimple (layout, 0x000000);
- styleAttrs.backgroundColor = Color::createSimple (layout, 0xffffff);
+ styleAttrs.color = Color::create (layout, 0x000000);
+ styleAttrs.backgroundColor = Color::create (layout, 0xffffff);
Style *topWidgetStyle = Style::create (layout, &styleAttrs);
styleAttrs.margin.setVal (0);
diff --git a/test/dw_images_scaled.cc b/test/dw_images_scaled.cc
index dfaf57b9..da53a6fd 100644
--- a/test/dw_images_scaled.cc
+++ b/test/dw_images_scaled.cc
@@ -115,8 +115,8 @@ int main(int argc, char **argv)
fontAttrs.style = FONT_STYLE_NORMAL;
styleAttrs.font = Font::create (layout, &fontAttrs);
- styleAttrs.color = Color::createSimple (layout, 0x000000);
- styleAttrs.backgroundColor = Color::createSimple (layout, 0xffffff);
+ styleAttrs.color = Color::create (layout, 0x000000);
+ styleAttrs.backgroundColor = Color::create (layout, 0xffffff);
Style *widgetStyle = Style::create (layout, &styleAttrs);
diff --git a/test/dw_images_scaled2.cc b/test/dw_images_scaled2.cc
index 39c55046..aea724f0 100644
--- a/test/dw_images_scaled2.cc
+++ b/test/dw_images_scaled2.cc
@@ -90,8 +90,8 @@ int main(int argc, char **argv)
fontAttrs.style = FONT_STYLE_NORMAL;
styleAttrs.font = Font::create (layout, &fontAttrs);
- styleAttrs.color = Color::createSimple (layout, 0x000000);
- styleAttrs.backgroundColor = Color::createSimple (layout, 0xffffff);
+ styleAttrs.color = Color::create (layout, 0x000000);
+ styleAttrs.backgroundColor = Color::create (layout, 0xffffff);
Style *widgetStyle = Style::create (layout, &styleAttrs);
@@ -109,7 +109,7 @@ int main(int argc, char **argv)
Style *wordStyle = Style::create (layout, &styleAttrs);
styleAttrs.borderWidth.setVal (1);
- styleAttrs.setBorderColor (Color::createShaded (layout, 0x000080));
+ styleAttrs.setBorderColor (Color::create (layout, 0x000080));
styleAttrs.setBorderStyle (BORDER_SOLID);
styleAttrs.padding.setVal (1);
styleAttrs.backgroundColor = NULL;
diff --git a/test/dw_images_simple.cc b/test/dw_images_simple.cc
index 78629d55..62f25cf7 100644
--- a/test/dw_images_simple.cc
+++ b/test/dw_images_simple.cc
@@ -113,8 +113,8 @@ int main(int argc, char **argv)
fontAttrs.style = FONT_STYLE_NORMAL;
styleAttrs.font = Font::create (layout, &fontAttrs);
- styleAttrs.color = Color::createSimple (layout, 0x000000);
- styleAttrs.backgroundColor = Color::createSimple (layout, 0xffffff);
+ styleAttrs.color = Color::create (layout, 0x000000);
+ styleAttrs.backgroundColor = Color::create (layout, 0xffffff);
Style *widgetStyle = Style::create (layout, &styleAttrs);
diff --git a/test/dw_links.cc b/test/dw_links.cc
index 4d15d520..08428e88 100644
--- a/test/dw_links.cc
+++ b/test/dw_links.cc
@@ -91,8 +91,8 @@ int main(int argc, char **argv)
fontAttrs.style = FONT_STYLE_NORMAL;
styleAttrs.font = Font::create (layout, &fontAttrs);
- styleAttrs.color = Color::createSimple (layout, 0x000000);
- styleAttrs.backgroundColor = Color::createSimple (layout, 0xffffff);
+ styleAttrs.color = Color::create (layout, 0x000000);
+ styleAttrs.backgroundColor = Color::create (layout, 0xffffff);
Style *widgetStyle = Style::create (layout, &styleAttrs);
@@ -110,7 +110,7 @@ int main(int argc, char **argv)
Style *wordStyle = Style::create (layout, &styleAttrs);
- styleAttrs.color = Color::createSimple (layout, 0x0000ff);
+ styleAttrs.color = Color::create (layout, 0x0000ff);
styleAttrs.textDecoration = TEXT_DECORATION_UNDERLINE;
styleAttrs.cursor = CURSOR_POINTER;
diff --git a/test/dw_links2.cc b/test/dw_links2.cc
index e1db9011..ea2d4d40 100644
--- a/test/dw_links2.cc
+++ b/test/dw_links2.cc
@@ -119,8 +119,8 @@ int main(int argc, char **argv)
fontAttrs.style = FONT_STYLE_NORMAL;
styleAttrs.font = Font::create (layout, &fontAttrs);
- styleAttrs.color = Color::createSimple (layout, 0x000000);
- styleAttrs.backgroundColor = Color::createSimple (layout, 0xffffff);
+ styleAttrs.color = Color::create (layout, 0x000000);
+ styleAttrs.backgroundColor = Color::create (layout, 0xffffff);
Style *widgetStyle = Style::create (layout, &styleAttrs);
@@ -138,7 +138,7 @@ int main(int argc, char **argv)
Style *wordStyle = Style::create (layout, &styleAttrs);
- styleAttrs.color = Color::createSimple (layout, 0x0000ff);
+ styleAttrs.color = Color::create (layout, 0x0000ff);
styleAttrs.textDecoration = TEXT_DECORATION_UNDERLINE;
styleAttrs.cursor = CURSOR_POINTER;
diff --git a/test/dw_lists.cc b/test/dw_lists.cc
index 99e78149..2d546f63 100644
--- a/test/dw_lists.cc
+++ b/test/dw_lists.cc
@@ -56,8 +56,8 @@ int main(int argc, char **argv)
fontAttrs.style = FONT_STYLE_NORMAL;
styleAttrs.font = Font::create (layout, &fontAttrs);
- styleAttrs.color = Color::createSimple (layout, 0x000000);
- styleAttrs.backgroundColor = Color::createSimple (layout, 0xffffff);
+ styleAttrs.color = Color::create (layout, 0x000000);
+ styleAttrs.backgroundColor = Color::create (layout, 0xffffff);
Style *widgetStyle = Style::create (layout, &styleAttrs);
@@ -75,8 +75,8 @@ int main(int argc, char **argv)
styleAttrs.margin.setVal (5);
styleAttrs.padding.setVal (5);
- styleAttrs.backgroundColor = Color::createSimple (layout, 0xffff40);
- styleAttrs.setBorderColor (Color::createSimple (layout, 0x000000));
+ styleAttrs.backgroundColor = Color::create (layout, 0xffff40);
+ styleAttrs.setBorderColor (Color::create (layout, 0x000000));
styleAttrs.setBorderStyle (BORDER_SOLID);
styleAttrs.borderWidth.setVal (1);
diff --git a/test/dw_resource_test.cc b/test/dw_resource_test.cc
index fc825836..2c90d3ce 100644
--- a/test/dw_resource_test.cc
+++ b/test/dw_resource_test.cc
@@ -57,8 +57,8 @@ int main(int argc, char **argv)
fontAttrs.style = FONT_STYLE_NORMAL;
styleAttrs.font = Font::create (layout, &fontAttrs);
- styleAttrs.color = Color::createSimple (layout, 0x000000);
- styleAttrs.backgroundColor = Color::createSimple (layout, 0xffffff);
+ styleAttrs.color = Color::create (layout, 0x000000);
+ styleAttrs.backgroundColor = Color::create (layout, 0xffffff);
Style *widgetStyle = Style::create (layout, &styleAttrs);
diff --git a/test/dw_table.cc b/test/dw_table.cc
index d269d551..87ed8360 100644
--- a/test/dw_table.cc
+++ b/test/dw_table.cc
@@ -51,9 +51,9 @@ int main(int argc, char **argv)
styleAttrs.padding.setVal (0);
styleAttrs.borderWidth.setVal (1);
styleAttrs.setBorderStyle (BORDER_OUTSET);
- styleAttrs.setBorderColor (Color::createShaded (layout, 0xffffff));
- styleAttrs.color = Color::createSimple (layout, 0x000000);
- styleAttrs.backgroundColor = Color::createSimple (layout, 0xffffff);
+ styleAttrs.setBorderColor (Color::create (layout, 0xffffff));
+ styleAttrs.color = Color::create (layout, 0x000000);
+ styleAttrs.backgroundColor = Color::create (layout, 0xffffff);
styleAttrs.hBorderSpacing = 5;
styleAttrs.vBorderSpacing = 5;
diff --git a/test/dw_table_aligned.cc b/test/dw_table_aligned.cc
index beb8525d..5fa94874 100644
--- a/test/dw_table_aligned.cc
+++ b/test/dw_table_aligned.cc
@@ -50,7 +50,7 @@ int main(int argc, char **argv)
styleAttrs.margin.setVal (5);
styleAttrs.borderWidth.setVal (1);
styleAttrs.setBorderStyle (BORDER_OUTSET);
- styleAttrs.setBorderColor (Color::createShaded (layout, 0x808080));
+ styleAttrs.setBorderColor (Color::create (layout, 0x808080));
FontAttrs fontAttrs;
fontAttrs.name = "Bitstream Charter";
@@ -59,8 +59,8 @@ int main(int argc, char **argv)
fontAttrs.style = FONT_STYLE_NORMAL;
styleAttrs.font = Font::create (layout, &fontAttrs);
- styleAttrs.color = Color::createSimple (layout, 0x000000);
- styleAttrs.backgroundColor = Color::createSimple (layout, 0xa0a0a0);
+ styleAttrs.color = Color::create (layout, 0x000000);
+ styleAttrs.backgroundColor = Color::create (layout, 0xa0a0a0);
styleAttrs.hBorderSpacing = 5;
styleAttrs.vBorderSpacing = 5;
diff --git a/test/dw_ui_test.cc b/test/dw_ui_test.cc
index 5ce949ef..22d541b5 100644
--- a/test/dw_ui_test.cc
+++ b/test/dw_ui_test.cc
@@ -53,8 +53,8 @@ int main(int argc, char **argv)
StyleAttrs styleAttrs;
styleAttrs.initValues ();
styleAttrs.margin.setVal (5);
- styleAttrs.color = Color::createSimple (layout, 0x000000);
- styleAttrs.backgroundColor = Color::createSimple (layout, 0xffffff);
+ styleAttrs.color = Color::create (layout, 0x000000);
+ styleAttrs.backgroundColor = Color::create (layout, 0xffffff);
FontAttrs fontAttrs;
fontAttrs.name = "Helvetica";