X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f40fdaa339e19bbdf60c9c065c82daae4ca77b36..18e989043be8f46e5744735fbf2d56840d2c34a7:/src/gtk/gauge.cpp diff --git a/src/gtk/gauge.cpp b/src/gtk/gauge.cpp index 90aad2ca5b..dcff39dc23 100644 --- a/src/gtk/gauge.cpp +++ b/src/gtk/gauge.cpp @@ -7,10 +7,6 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "gauge.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -57,7 +53,7 @@ bool wxGauge::Create( wxWindow *parent, PostCreation(size); SetBestSize(size); - + return TRUE; } @@ -66,16 +62,19 @@ void wxGauge::DoSetGauge() wxASSERT_MSG( 0 <= m_gaugePos && m_gaugePos <= m_rangeMax, _T("invalid gauge position in DoSetGauge()") ); - gtk_progress_bar_update( GTK_PROGRESS_BAR(m_widget), - m_rangeMax ? ((float)m_gaugePos)/m_rangeMax : 0.); + gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (m_widget), + m_rangeMax ? ((float)m_gaugePos)/m_rangeMax : 0.); } wxSize wxGauge::DoGetBestSize() const { + wxSize best; if (HasFlag(wxGA_VERTICAL)) - return wxSize(28, 100); + best = wxSize(28, 100); else - return wxSize(100, 28); + best = wxSize(100, 28); + CacheBestSize(best); + return best; } void wxGauge::SetRange( int range )