X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/77ffb5937e89927b621128789401db8921fe580f..d504085d5b906ecf764d64a95f3b5df0075ea8fb:/src/gtk/slider.cpp diff --git a/src/gtk/slider.cpp b/src/gtk/slider.cpp index 582a6d53d7..93ec5c8fff 100644 --- a/src/gtk/slider.cpp +++ b/src/gtk/slider.cpp @@ -4,7 +4,7 @@ // Author: Robert Roebling // Id: $Id$ // Copyright: (c) 1998 Robert Roebling -// Licence: wxWidgets licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) @@ -19,9 +19,7 @@ #if wxUSE_SLIDER #include "wx/utils.h" - -#include - +#include "wx/math.h" #include "wx/gtk/private.h" //----------------------------------------------------------------------------- @@ -134,6 +132,11 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id, m_adjust = gtk_range_get_adjustment( GTK_RANGE(m_widget) ); +#ifdef __WXGTK20__ + if (style & wxSL_INVERSE) + gtk_range_set_inverted( GTK_RANGE(m_widget), TRUE ); +#endif + GtkEnableEvents(); SetRange( minValue, maxValue ); @@ -265,12 +268,6 @@ bool wxSlider::IsOwnGtkWindow( GdkWindow *window ) #endif } -void wxSlider::ApplyWidgetStyle() -{ - SetWidgetStyle(); - gtk_widget_set_style( m_widget, m_widgetStyle ); -} - void wxSlider::GtkDisableEvents() { gtk_signal_disconnect_by_func( GTK_OBJECT(m_adjust),