Patch : 2.1 nopatch (linux)

Files :

Bug 0000092

 Lo sfondo dei campi quando non hanno il focus viene disegnato in grigio


git-svn-id: svn://10.65.10.50/trunk@12156 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 2004-06-07 08:56:31 +00:00
parent 8a53433249
commit dbc82a780d

View File

@ -2183,6 +2183,29 @@ void xvt_dwin_draw_text(WINDOW win, int x, int y, const char *s, int len)
str.Truncate(len);
wxDC& dc = tdc.GetDC(); // Prima getto il DC ...
const int delta = tdc.GetFontDelta(); // ... poi faccio la GetFontDelta!
#ifdef LINUX
if (tdc._dct.opaque_text)
{
RCT back;
back.left = x;
back.right = x + xvt_dwin_get_text_width(win, str, -1);
back.top = y - delta;
back.bottom = y;
CAST_COLOR(tdc._dct.back_color, brush_color);
wxBrush* brush = wxTheBrushList->FindOrCreateBrush(brush_color, wxSOLID);
wxBrush & old_brush = dc.GetBrush();
wxPen & old_pen = dc.GetPen();
const wxRect rct = NormalizeRCT(&back);
dc.SetBrush(*brush);
dc.SetPen(*wxTRANSPARENT_PEN);
dc.DrawRectangle(rct);
dc.SetBrush(old_brush);
dc.SetPen(old_pen);
}
#endif
dc.DrawText(str, x, y-delta);
}
}