X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/713e92905e4c463be1cd8b2b626aec8ffa166420..795160b7f64e8e70e90e1ad49689e6af280ab5f1:/src/common/dcbase.cpp?ds=sidebyside diff --git a/src/common/dcbase.cpp b/src/common/dcbase.cpp index 1742bf8dad..3427fe362e 100644 --- a/src/common/dcbase.cpp +++ b/src/common/dcbase.cpp @@ -1115,7 +1115,8 @@ void wxDCImpl::InheritAttributes(wxWindow *win) SetFont(win->GetFont()); SetTextForeground(win->GetForegroundColour()); SetTextBackground(win->GetBackgroundColour()); - SetBackground(wxBrush(win->GetBackgroundColour())); + SetBackground(win->GetBackgroundColour()); + SetLayoutDirection(win->GetLayoutDirection()); } //----------------------------------------------------------------------------- @@ -1124,6 +1125,15 @@ void wxDCImpl::InheritAttributes(wxWindow *win) IMPLEMENT_ABSTRACT_CLASS(wxDC, wxObject) +void wxDC::CopyAttributes(const wxDC& dc) +{ + SetFont(dc.GetFont()); + SetTextForeground(dc.GetTextForeground()); + SetTextBackground(dc.GetTextBackground()); + SetBackground(dc.GetBackground()); + SetLayoutDirection(dc.GetLayoutDirection()); +} + void wxDC::DrawLabel(const wxString& text, const wxBitmap& bitmap, const wxRect& rect,