- if ( maximum > 0 )
- {
- int gauge_style = wxGA_HORIZONTAL;
- if ( style & wxPD_SMOOTH )
- gauge_style |= wxGA_SMOOTH;
- m_gauge = new wxGauge
- (
- this,
- wxID_ANY,
- m_maximum,
- wxDefaultPosition,
- // make the progress bar sufficiently long
- wxSize(wxMin(wxGetClientDisplayRect().width/3, 300), -1),
- gauge_style
- );
-
- sizerTop->Add(m_gauge, 0, wxLEFT | wxRIGHT | wxTOP | wxEXPAND, 2*LAYOUT_MARGIN);
- m_gauge->SetValue(0);
- }
- else
- {
- m_gauge = NULL;
- }
+ int gauge_style = wxGA_HORIZONTAL;
+ if ( style & wxPD_SMOOTH )
+ gauge_style |= wxGA_SMOOTH;
+
+#ifdef __WXMSW__
+ maximum /= m_factor;
+#endif
+
+ m_gauge = new wxGauge
+ (
+ this,
+ wxID_ANY,
+ maximum,
+ wxDefaultPosition,
+ // make the progress bar sufficiently long
+ wxSize(wxMin(wxGetClientDisplayRect().width/3, 300), -1),
+ gauge_style
+ );
+
+ sizerTop->Add(m_gauge, 0, wxLEFT | wxRIGHT | wxTOP | wxEXPAND, 2*LAYOUT_MARGIN);
+ m_gauge->SetValue(0);