]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/gauge.cpp
wxFrame::size There is always a hack to solve your problems.
[wxWidgets.git] / src / motif / gauge.cpp
index e80910d2762c64d40744618cbd8d53d8f70d8779..d47c8d976a7b686323b176094b5aa9622d9a0172 100644 (file)
@@ -85,6 +85,8 @@ bool wxGauge::Create(wxWindow *parent, wxWindowID id,
     SetValidator(validator);
     m_rangeMax = range;
     m_windowStyle = style;
+    m_backgroundColour = parent->GetBackgroundColour();
+    m_foregroundColour = parent->GetForegroundColour();
 
     if (parent) parent->AddChild(this);
 
@@ -121,11 +123,13 @@ bool wxGauge::Create(wxWindow *parent, wxWindowID id,
     if (height == -1)
         height = 80;
 
+    m_windowFont = parent->GetFont();
+    ChangeFont(FALSE);
+
     SetCanAddEventHandler(TRUE);
     AttachWidget (parent, m_mainWidget, (WXWidget) NULL, x, y, width, height);
 
-    SetFont(* parent->GetFont());
-    ChangeColour(m_mainWidget);
+    ChangeBackgroundColour();
 
     return TRUE;
 }
@@ -186,6 +190,21 @@ int wxGauge::GetValue() const
 //    return m_gaugePos;
 }
 
+void wxGauge::ChangeFont(bool keepOriginalSize)
+{
+    wxWindow::ChangeFont(keepOriginalSize);
+}
+
+void wxGauge::ChangeBackgroundColour()
+{
+    wxWindow::ChangeBackgroundColour();
+}
+
+void wxGauge::ChangeForegroundColour()
+{
+    wxWindow::ChangeForegroundColour();
+}
+
 //// PRIVATE DECLARATIONS FOR XMGAUGE
 
 #include <Xm/PrimitiveP.h>