Home » U++ Library support » U++ Core » Animate does not really animate
Re: Animate does not really animate [message #28624 is a reply to message #28565] |
Wed, 08 September 2010 13:39   |
frankdeprins
Messages: 99 Registered: September 2008 Location: Antwerp - Belgium
|
Member |
|
|
Hello again,
I managed to fix the second problem (the flash at the end of the animation) as well and now I have a very smooth experience in the popup using slide effect.
I may have overlooked something (remember; I am not so proficient in the Ultimate internals), but I modified a part of ColorPopup::Popup, like so:
/******
if(GUI_PopUpEffect()) {
Ctrl popup;
popup.Add(BottomPos(0, rt.Height()).LeftPos(0, rt.Width()));
popup.SetRect(RectC(rt.left, rt.top, 3, 3));
popup.PopUp(owner, true, true, GUI_GlobalStyle() >= GUISTYLE_XP);
SetFocus();
Ctrl::ProcessEvents();
Animate(popup, rt, GUIEFFECT_SLIDE);
}
SetRect(rt);
Ctrl::PopUp(owner, true, true, true);
**********/
if(GUI_PopUpEffect()) {
//Ctrl popup;
//popup.Add(BottomPos(0, rt.Height()).LeftPos(0, rt.Width()));
SetRect(RectC(rt.left, rt.top, 3, 3));
Ctrl::PopUp(owner, true, true, GUI_GlobalStyle() >= GUISTYLE_XP);
SetFocus();
Ctrl::ProcessEvents();
Animate(*this, rt, GUIEFFECT_SLIDE);
}
else
{
SetRect(rt);
Ctrl::PopUp(owner, true, true, true);
}
The commented out code is the original version and the rest is my modification. As you can see, my intention was to avoid the use of the separate control to do the popping up and use the control itself, directly.
I works like a charm and so, now, I wonder why this indirection is used in the Popup procedures of most (many/all?) controls?
If there is nothing wrong with this modification, could you please consider it for applying? It gives a much more pleasant user experience on Windows where sliding is in effect.
Best regards,
frank
PS: I used the new GridCtrlTest project to do my testing.
|
|
|
Goto Forum:
Current Time: Sat Aug 23 17:28:46 CEST 2025
Total time taken to generate the page: 0.06446 seconds
|