[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

[XaraXtreme-commits] Commit Complete



Commit by  : alex
Repository : xara
Revision   : 1510
Date       : Mon Jul 24 17:10:31 BST 2006

Changed paths:
   M /Trunk/XaraLX/wxOil/dlgevt.cpp
   M /Trunk/XaraLX/wxOil/dlgmgr.cpp
   M /Trunk/XaraLX/wxXtra/slidercombo.cpp
   M /Trunk/XaraLX/wxXtra/xh_slidrcombo.cpp

More popup slider work


Diff:
Index: Trunk/XaraLX/wxXtra/slidercombo.cpp
===================================================================
--- Trunk/XaraLX/wxXtra/slidercombo.cpp	(revision 1509)
+++ Trunk/XaraLX/wxXtra/slidercombo.cpp	(revision 1510)
@@ -64,6 +64,8 @@
                           event.GetOrientation() );
         ev.SetEventObject( m_combo );
         m_combo->GetEventHandler()->ProcessEvent( ev );
+        if (event.GetEventType() == wxEVT_SCROLL_THUMBRELEASE)
+            m_combo->HidePopup();
     }
 
 private:
Index: Trunk/XaraLX/wxXtra/xh_slidrcombo.cpp
===================================================================
--- Trunk/XaraLX/wxXtra/xh_slidrcombo.cpp	(revision 1509)
+++ Trunk/XaraLX/wxXtra/xh_slidrcombo.cpp	(revision 1510)
@@ -30,7 +30,6 @@
                         :wxXmlResourceHandler()
 {
     XRC_ADD_STYLE(wxCB_READONLY);
-    XRC_ADD_STYLE(wxCB_DROPDOWN);
     XRC_ADD_STYLE(wxTE_PROCESS_ENTER);
     XRC_ADD_STYLE(wxSL_HORIZONTAL);
     XRC_ADD_STYLE(wxSL_VERTICAL);
@@ -50,6 +49,11 @@
                     GetStyle(),
                     GetName());
 
+    wxSize ButtonSize=GetSize(wxT("buttonsize"));
+
+    if (ButtonSize != wxDefaultSize)
+    control->SetButtonPosition(ButtonSize.GetWidth(), ButtonSize.GetHeight());
+
     SetupWindow(control);
 
     return control;
Index: Trunk/XaraLX/wxOil/dlgevt.cpp
===================================================================
--- Trunk/XaraLX/wxOil/dlgevt.cpp	(revision 1509)
+++ Trunk/XaraLX/wxOil/dlgevt.cpp	(revision 1510)
@@ -570,6 +570,7 @@
 	// as more controls come online). If so just return allowing focus to stay
 	wxWindow*	pWnd = (wxWindow*)event.GetEventObject();
 	if( pWnd->IsKindOf( CLASSINFO(wxTextCtrl) ) ||
+		pWnd->IsKindOf( CLASSINFO(wxSliderCombo) ) ||
 		pWnd->IsKindOf( CLASSINFO(wxComboBox) ) ||
 		pWnd->IsKindOf( CLASSINFO(wxOwnerDrawnComboBox) ) ||
 		pWnd->IsKindOf( CLASSINFO(wxComboCtrl) ) )
Index: Trunk/XaraLX/wxOil/dlgmgr.cpp
===================================================================
--- Trunk/XaraLX/wxOil/dlgmgr.cpp	(revision 1509)
+++ Trunk/XaraLX/wxOil/dlgmgr.cpp	(revision 1510)
@@ -2796,6 +2796,12 @@
 		return TRUE;
 	}
 
+	if ( pGadget->IsKindOf(CLASSINFO(wxSliderCombo)) )
+	{
+		((wxSliderCombo *)pGadget)->SetValue(String);
+		return TRUE;
+	}
+
 	pGadget->SetLabel(String);
 
 	return TRUE;
@@ -4136,6 +4142,12 @@
 		goto out;
 	}
 
+	if ( pGadget->IsKindOf(CLASSINFO(wxSliderCombo)) )
+	{
+		String = ((wxSliderCombo *)pGadget)->GetValue();
+		goto out;
+	}
+
 	String = pGadget->GetLabel();
 
 out:


Xara