Common code for the same handling of wxSL_INVERSE.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32044 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -80,10 +80,19 @@ public:
|
||||
virtual int GetSelStart() const { return GetMax(); }
|
||||
virtual void SetSelection(int WXUNUSED(min), int WXUNUSED(max)) { }
|
||||
|
||||
|
||||
virtual void ApplyParentThemeBackground(const wxColour& bg)
|
||||
{ SetBackgroundColour(bg); }
|
||||
|
||||
protected:
|
||||
|
||||
// adjust value according to wxSL_INVERSE style
|
||||
virtual int ValueInvertOrNot(int value) const
|
||||
{
|
||||
if (HasFlag(wxSL_INVERSE))
|
||||
return (GetMax() + GetMin()) - value;
|
||||
else
|
||||
return value;
|
||||
}
|
||||
|
||||
private:
|
||||
DECLARE_NO_COPY_CLASS(wxSliderBase)
|
||||
|
Reference in New Issue
Block a user