X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9d2c19f1367399be8d3220fa1c0fcdcb0ff6b6ae..c7c6e54baed01937426239dd38164ee0326fa172:/src/gtk/gauge.cpp diff --git a/src/gtk/gauge.cpp b/src/gtk/gauge.cpp index 25beb33bbe..7fb1828e14 100644 --- a/src/gtk/gauge.cpp +++ b/src/gtk/gauge.cpp @@ -49,10 +49,13 @@ bool wxGauge::Create( wxWindow *parent, GTK_PROGRESS_BOTTOM_TO_TOP ); } + // when using the gauge in indeterminate mode, we need this: + gtk_progress_bar_set_pulse_step(GTK_PROGRESS_BAR (m_widget), 0.05); + m_parent->DoAddChild( this ); PostCreation(size); - SetBestSize(size); + SetInitialSize(size); return true; } @@ -105,6 +108,11 @@ int wxGauge::GetValue() const return m_gaugePos; } +void wxGauge::Pulse() +{ + gtk_progress_bar_pulse(GTK_PROGRESS_BAR (m_widget)); +} + wxVisualAttributes wxGauge::GetDefaultAttributes() const { // Visible gauge colours use a different colour state