Opened 13 years ago
Closed 9 years ago
#10256 closed Patch - Feature (Fixed)
Animation support
Reported by: | Owned by: | Jonatan Lindblad | |
---|---|---|---|
Priority: | minor | Milestone: | 0.28 |
Component: | MythTV - User Interface Library | Version: | Master Head |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
The attached patch adds the possibility to animate the showing and hiding of windows. Supported parameters are position, alpha, zoom, and angle, plus duration and easing curve. It's partially based on the patch in #8975 that adds an Effects struct.
Extending this to support other events should be possible by using signals (i.e. TakingFocus?, LosingFocus?, etc.) and slots.
Here's an example of how to add a position and alpha animation to the popup dialog in Arclight:
<window name="MythPopupBox"> <area>1320,0,600,1080</area> <animation type="position" when="AboutToShow" start="1920,-1" end="-1,-1" easingcurve="OutQuart" duration="500"/> <animation type="alpha" when="AboutToShow" start="0" end="255" easingcurve="OutQuart" duration="500"/> <animation type="position" when="AboutToHide" end="1920,-1" start="-1,-1" easingcurve="InQuart" duration="500"/> <animation type="alpha" when="AboutToHide" end="0" start="255" easingcurve="InQuart" duration="500"/> ... </window>
Attachments (1)
Change History (8)
Changed 13 years ago by
Attachment: | animation.patch added |
---|
comment:1 Changed 13 years ago by
Milestone: | unknown → 0.25 |
---|---|
Version: | Unspecified → Trunk Head |
comment:2 Changed 13 years ago by
The more I look at this, the more I like it:)
My main concern is the fallback behaviour when the painter does not support animation (MythQtPainter? and MythQImagePainter). If a themer relies on a certain effect being in place and it is not available, it may effectively break the theme. (Largely thinking ahead - as it's unlikely to be a big issue until extended to individual ui types)
comment:3 Changed 13 years ago by
See f39fa3b626d98c06295 for initial commit.
Amongst other things, I still intend to rework the timing so that it is consistent between the OSD and main UI without reference to MythMainWindow?.
comment:4 Changed 13 years ago by
Milestone: | 0.25 → 0.26 |
---|---|
Owner: | changed from stuartm to Jonatan Lindblad |
Status: | new → assigned |
comment:5 Changed 13 years ago by
Milestone: | 0.26 → 0.27 |
---|
comment:6 Changed 12 years ago by
Milestone: | 0.27 → 0.28 |
---|
comment:7 Changed 9 years ago by
Resolution: | → Fixed |
---|---|
Status: | assigned → closed |
This is already done.
Thanks for the patch.
I once proposed a different xml markup for animations, I think it would be worth getting it right from the start. I don't have the original to hand but it went something like this:
I wonder if we can't find a more readily understandable names for easingcurve and it's various values, not essential since their meaning can be found through google but for example 'outQuart' could be 'decelerating' which no-one would need to google.