Fix widgets borders using the "sunken_normal" SkinTheme part

Now the background color of the parent widget is used to draw the borders.
This commit is contained in:
David Capello 2013-03-30 13:27:38 -03:00
parent a437a954f2
commit 3171bd5ce7
2 changed files with 10 additions and 1 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

View File

@ -985,6 +985,9 @@ void SkinTheme::paintEntry(PaintEvent& ev)
widget->getEntryThemeInfo(&scroll, &caret, &state, &selbeg, &selend);
// Outside borders
jdraw_rectfill(widget->rc, BGCOLOR);
// Main pos
x1 = widget->rc->x1;
y1 = widget->rc->y1;
@ -1483,7 +1486,10 @@ void SkinTheme::draw_combobox_entry(Entry* widget, JRect clip)
widget->getEntryThemeInfo(&scroll, &caret, &state, &selbeg, &selend);
/* main pos */
// Outside borders
jdraw_rectfill(widget->rc, BGCOLOR);
// Main pos
x1 = widget->rc->x1;
y1 = widget->rc->y1;
x2 = widget->rc->x2-1;
@ -1601,6 +1607,9 @@ void SkinTheme::paintView(PaintEvent& ev)
Graphics* g = ev.getGraphics();
View* widget = static_cast<View*>(ev.getSource());
// Outside borders
jdraw_rectfill(widget->rc, BGCOLOR);
draw_bounds_nw(g, widget->getClientBounds(),
widget->hasFocus() ? PART_SUNKEN_FOCUSED_NW:
PART_SUNKEN_NORMAL_NW,