Bug 315565 - concurrent scope parsing (still?) broken, see comment #9
Summary: concurrent scope parsing (still?) broken, see comment #9
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: scripting (show other bugs)
Version: 4.10.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-21 10:12 UTC by Kai Uwe Broulik
Modified: 2021-08-14 01:26 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
main.js of effect (2.88 KB, text/javascript)
2013-02-21 11:31 UTC, Kai Uwe Broulik
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kai Uwe Broulik 2013-02-21 10:12:52 UTC
Now that I've discovered the awesomeness of KWin's scripting and effect scripting capabilities, I wrote a little effect. It animates the opacity and scale of a given window.
I wanted to apply an easing curve so the animation looks more natural. The curve property has no effect, however.

    animate({
            window: window,
            duration: zoominEffect.duration,
            curve: QEasingCurve.InOutQuad,
            animations: [{
                type: Effect.Opacity,
                from: 0.0,
                to: 1.0
            }, {
                type: Effect.Scale,
                curve: QEasingCurve.InOutQUad,
                from: 0.75,
                to: 1.0
            }]
        });

Did I overlook something? Are not all properties of QEasingCurve exported to JS? Is it not possible on the global animate level?

Reproducible: Always
Comment 1 Thomas Lübking 2013-02-21 10:17:19 UTC
- curve: QEasingCurve.InOutQuad,
+ curve: 3,

At least the stock scripted effects use integers. No idea whether the enum is accessible from QtScript
Comment 2 Martin Flöser 2013-02-21 10:26:44 UTC
> At least the stock scripted effects use integers. No idea whether the enum is accessible from QtScript
it should be, at least I think I exported the bits, will check
Comment 3 Kai Uwe Broulik 2013-02-21 10:29:44 UTC
Tried it with curve: 3, didn't help
Comment 4 Martin Flöser 2013-02-21 10:30:09 UTC
yeah QEasingCurve is exported:
m_engine->globalObject().setProperty("QEasingCurve", m_engine->newQMetaObject(&QEasingCurve::staticMetaObject))
Comment 5 Thomas Lübking 2013-02-21 11:05:42 UTC
Hod did you perceive it doesn't work? Tried to raise animationTime and with a curve that is more aggressive (InOutExpo) or excentric (InOutElastic)?
Comment 6 Kai Uwe Broulik 2013-02-21 11:08:56 UTC
Exactly :-) Raised the animation time to 4 seconds and tried with both
curve: 31 and curve: QEasingCurve.InOutElastic
no effect
Comment 7 Thomas Lübking 2013-02-21 11:26:42 UTC
Please attach the complete script for inspection.
Comment 8 Kai Uwe Broulik 2013-02-21 11:31:35 UTC
Created attachment 77484 [details]
main.js of effect
Comment 9 Thomas Lübking 2013-02-21 11:59:08 UTC
Wild shot: Try placing the curve only inside the animation settings /only/ ie 

animate({
            window: window,
            duration: loginEffect.duration,
            animations: [{
                type: Effect.Opacity,
                from: 1.0,
                to: 0.0,
                curve: QEasingCurve.InOutQuad
            }, {
                type: Effect.Scale,
                from: 1.0,
                to: 1.5,
                curve: QEasingCurve.InOutQuad
            }]
        });

Reasonable test later  ;-)
Comment 10 Kai Uwe Broulik 2013-02-21 12:11:24 UTC
That worked. :)
Comment 11 Thomas Lübking 2013-10-12 17:51:30 UTC
We should test whether commit b7eb49ad0966a5a2164a775c8c72d59346bcfd30 fixed this.
Comment 12 Andrew Crouthamel 2018-11-10 03:11:12 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 13 Andrew Crouthamel 2018-11-20 03:58:49 UTC
Dear Bug Submitter,

This is a reminder that this bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? This bug will be moved back to REPORTED Status for manual review later, which may take a while. If you are able to, please lend us a hand.

Thank you for helping us make KDE software even better for everyone!