X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a4294b7832a5aed3c1cccc06aecd227d43da8830..82540ef2327daaf6ae78189139a669afc9edf9d9:/src/motif/statbmp.cpp?ds=inline diff --git a/src/motif/statbmp.cpp b/src/motif/statbmp.cpp index 5dc08a3296..20d46299d5 100644 --- a/src/motif/statbmp.cpp +++ b/src/motif/statbmp.cpp @@ -39,6 +39,8 @@ bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID id, { m_messageBitmap = bitmap; SetName(name); + m_backgroundColour = parent->GetBackgroundColour(); + m_foregroundColour = parent->GetForegroundColour(); if (parent) parent->AddChild(this); if ( id == -1 ) @@ -64,12 +66,13 @@ bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID id, XmNlabelType, XmPIXMAP, NULL); + m_windowFont = parent->GetFont(); + ChangeFont(FALSE); + SetCanAddEventHandler(TRUE); AttachWidget (parent, m_mainWidget, (WXWidget) NULL, pos.x, pos.y, size.x, size.y); - SetFont(* parent->GetFont()); - - ChangeColour (m_mainWidget); + ChangeBackgroundColour (); return TRUE; } @@ -112,8 +115,23 @@ void wxStaticBitmap::SetBitmap(const wxBitmap& bitmap) // since it is no longer valid. XtVaSetValues (widget, XmNlabelType, XmSTRING, - XmNlabelPixmap, NULL, // TODO: Does this work? + XmNlabelPixmap, XmUNSPECIFIED_PIXMAP, NULL); } } +void wxStaticBitmap::ChangeFont(bool keepOriginalSize) +{ + wxWindow::ChangeFont(keepOriginalSize); +} + +void wxStaticBitmap::ChangeBackgroundColour() +{ + wxWindow::ChangeBackgroundColour(); +} + +void wxStaticBitmap::ChangeForegroundColour() +{ + wxWindow::ChangeForegroundColour(); +} +