]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/gauge.cpp
don't use wxFileConfig to parse kdeglobals, it's not meant for such use. Fixes bug...
[wxWidgets.git] / src / gtk / gauge.cpp
index f180206c79e4f136fa745f4fada77190f5958dbe..accbf868897740be66a9be6542979a246ae99045 100644 (file)
@@ -7,10 +7,13 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 #pragma implementation "gauge.h"
 #endif
 
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
 #include "wx/gauge.h"
 
 #if wxUSE_GAUGE
@@ -53,7 +56,8 @@ bool wxGauge::Create( wxWindow *parent,
     m_parent->DoAddChild( this );
 
     PostCreation();
-
+    SetBestSize(size);
+    
     Show( TRUE );
 
     return TRUE;
@@ -68,6 +72,14 @@ void wxGauge::DoSetGauge()
                              m_rangeMax ? ((float)m_gaugePos)/m_rangeMax : 0.);
 }
 
+wxSize wxGauge::DoGetBestSize() const
+{
+    if (HasFlag(wxGA_HORIZONTAL))
+        return wxSize(100, 28);
+    else
+        return wxSize(28, 100);
+}
+
 void wxGauge::SetRange( int range )
 {
     m_rangeMax = range;