[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]
[XaraXtreme-commits] Commit Complete
Commit by : alex
Repository : xara
Revision : 1570
Date : Thu Jul 27 15:05:59 BST 2006
Changed paths:
M /Trunk/XaraLX/wxOil/dlgmgr.cpp
Call SetLineSize() appropriately when setting slider range
Diff:
Index: Trunk/XaraLX/wxOil/dlgmgr.cpp
===================================================================
--- Trunk/XaraLX/wxOil/dlgmgr.cpp (revision 1569)
+++ Trunk/XaraLX/wxOil/dlgmgr.cpp (revision 1570)
@@ -3185,6 +3185,13 @@
wxWindow * pGadget = GetGadget(WindowID, Gadget);
if (!pGadget) return FALSE;
+ INT32 LineIncr = (Max-Min+50)/100;
+// Don't set PgIncr for now
+// if (LineIncr>PgIncr/2)
+// LineIncr = PgIncr/2;
+ if (LineIncr<1)
+ LineIncr=1;
+
if ( pGadget->IsKindOf(CLASSINFO(wxScrollBar)) )
{
wxScrollBar * pScroll = (wxScrollBar *)pGadget;
@@ -3196,12 +3203,14 @@
if ( pGadget->IsKindOf(CLASSINFO(wxSlider)) )
{
((wxSlider *)(pGadget))->SetRange(Min, Max);
+ ((wxSlider *)(pGadget))->SetLineSize(LineIncr);
return TRUE;
}
if ( pGadget->IsKindOf(CLASSINFO(wxSliderCombo)) )
{
((wxSliderCombo *)(pGadget))->SetRange(Min, Max);
+ ((wxSliderCombo *)(pGadget))->SetLineSize(LineIncr);
return TRUE;
}
Xara